6d5 < $expdone=false; 12,103d10 < $types = ["video/mp4","image/svg","audio/wav","audio/x-wav","audio/x-pn-realaudio","audio/x-mpegurl","audio/x-aiff","audio/mpeg","audio/mid", < "audio/basic","audio/ogg","video/x-sgi-movie","video/x-msvideo","video/quicktime","audio/mp3","video/mp4","video/mpeg", < "video/x-la-asf","video/ogg","video/webm","audio/mp4", "image/jpeg", "image/jpeg", "image/png", "image/gif", "image/bmp", "image/tif", < "text/html", "text/html", "text/html", "text/javascript", "text/css", "text/plain", "text/xml", "text/csv", < "application/vnd.ms-word", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/x-php", "application/pdf", < "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.ms-powerpoint", < "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]; < $exts = [".mp4",".svg",".wav",".wav",".ram",".m3u",".aiff",".mp3",".rmi", < ".snd",".ogg",".movie",".avi",".mov",".mp3",".m4v",".mpeg", < ".lsx",".ogv",".webm",".m4a", ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif", < ".htm", ".html", ".htmls", ".js", ".css", ".txt", ".xml", ".csv", < ".doc", ".docx", ".php", ".pdf", < ".pptx", ".ppt", < ".xls", ".xlsx"]; < < function expdata($inout) { < global $incopy, $pathbit, $basebit, $mampfilelist, $mampfs, $expdone, $exts, $types; < $lf=''; < $jvb=''; < $xdata="data"; < if ($incopy == '') { < $basebit=basename($inout); < $pathbit=explode($basebit, $inout)[0]; < $incopy=$inout; < } < $xmampfs=$mampfs; < for ($imn=0; $imn exec("echo " . $pbit . $thingo . " | pbcopy"); 180,210c85 < if ($afters != '') { < sleep(5); < exec($afters); < exec("echo \"\" | pbcopy"); < if (5 == 7) { < sleep(2); < exec("echo \"" . expdata($pbit . $thingo) . "\" | pbcopy"); < sleep(5); < $retis=shell_exec("osascript -e 'tell application \"System Events\" < # Get the name of the current application (which is likely the Script Editor or Automator) < set currentApp to name of current application < < # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost < if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then < set visible of process currentApp to false < # Wait a moment for the target app to become active < delay 0.1 < end if < < # Simulate the Command+V keystroke in the now frontmost application < keystroke \"v\" using command down < < # (Optional) Unhide the script application afterward < if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then < set visible of process currentApp to true < end if < end tell < '"); < } < $afters=''; < } --- > if ($afters != '') { sleep(5); exec($afters); $afters=''; } 407,409c282 < if (!$expdone) { < exec("echo \"\n" . $pbit . $thingo . "\n" . expdata($pbit . $thingo) . "\" | pbcopy"); < } --- > exec("echo " . $pbit . $thingo . " | pbcopy"); 441,471c314 < if ($afters != '') { < sleep(5); < exec($afters); < exec("echo \"\" | pbcopy"); < if (5 == 7) { < sleep(2); < exec("echo \"" . expdata($pbit . $thingo) . "\" | pbcopy"); < sleep(5); < $retis=shell_exec("osascript -e 'tell application \"System Events\" < # Get the name of the current application (which is likely the Script Editor or Automator) < set currentApp to name of current application < < # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost < if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then < set visible of process currentApp to false < # Wait a moment for the target app to become active < delay 0.1 < end if < < # Simulate the Command+V keystroke in the now frontmost application < keystroke \"v\" using command down < < # (Optional) Unhide the script application afterward < if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then < set visible of process currentApp to true < end if < end tell < '"); < } < $afters=''; < } --- > if ($afters != '') { sleep(5); exec($afters); $afters=''; } 608,610c451 < if (!$expdone) { < exec("echo \"\n" . $pbit . $thingo . "\n" . expdata($pbit . $thingo) . "\" | pbcopy"); < } --- > exec("echo " . $pbit . $thingo . " | pbcopy"); 642,672c483 < if ($afters != '') { < sleep(5); < exec($afters); < exec("echo \"\" | pbcopy"); < if (5 == 7) { < sleep(2); < exec("echo \"" . expdata($pbit . $thingo) . "\" | pbcopy"); < sleep(5); < $retis=shell_exec("osascript -e 'tell application \"System Events\" < # Get the name of the current application (which is likely the Script Editor or Automator) < set currentApp to name of current application < < # Check if the current app is one of the script runners and hide it to allow the target app to become frontmost < if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then < set visible of process currentApp to false < # Wait a moment for the target app to become active < delay 0.1 < end if < < # Simulate the Command+V keystroke in the now frontmost application < keystroke \"v\" using command down < < # (Optional) Unhide the script application afterward < if currentApp is in {\"Script Editor\", \"Automator\", \"Script Debugger\"} then < set visible of process currentApp to true < end if < end tell < '"); < } < $afters=''; < } --- > if ($afters != '') { sleep(5); exec($afters); $afters=''; }