29d28 < $afters=''; 49,60d47 < } else { < //file_put_contents('x.xx', $pathbit . "\n" . $basebit . "\n" . $thingo . "\n" . "osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class optd»)'"); < exec("echo " . $pbit . $thingo . " | pbcopy"); < $afters=("osascript -e 'tell application \"Finder\" < set thesong to \"" . $pbit . $thingo . "\" as string < end tell < < tell application \"QuickTime Player\" < activate < open thesong < play document 1 < end tell'"); 85d71 < if ($afters != '') { sleep(5); exec($afters); $afters=''; } 120c106 < //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'x.xx', $subjsuff . "\n" . $_SERVER['QUERY_STRING']); --- > file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'x.xx', $subjsuff . "\n" . $_SERVER['QUERY_STRING']); 123c109 < //file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'x.xx', $subjsuff . "\n" . $_SERVER['QUERY_STRING']); --- > file_put_contents($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'x.xx', $subjsuff . "\n" . $_SERVER['QUERY_STRING']); 280,337d265 < } else { // exec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class optd»)'"); < if (PHP_OS == 'Darwin') { < exec("echo " . $pbit . $thingo . " | pbcopy"); < $afters=("osascript -e 'tell application \"Finder\" < set thesong to \"" . $pbit . $thingo . "\" as string < end tell < < tell application \"QuickTime Player\" < activate < open thesong < play document 1 < end tell'"); < sleep(5); < // Thanks to https://www.google.com/search?q=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&rlz=1C5OZZY_en&oq=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTQ3NDg4ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8 < $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 < '"); < if ($afters != '') { sleep(5); exec($afters); $afters=''; } < } else { < //$fp = fopen($thingo, 'r'); < //$gcont=fread($fp, filesize($thingo)); < //fclose($fp); < $fp = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'stop_extravaganza.bzt', 'x'); < fwrite($fp, "powershell.exe -windowstyle hidden -Command \"Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::Fromfile('" . $thingo . "'))\" & erase " . str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR) . 'stop_extravaganza.b*t'); < fclose($fp); < if (isset($_GET['mailto'])) { < sleep(65); < } < } < if (isset($_GET['mailto'])) { < $parstuff=''; < if (strlen($_GET['mailto']) > 1) { < $mto=str_replace('please.change@email.address',str_replace('+',' ',urldecode($_GET['mailto'])),$mto); < $parstuff=" parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.textShadow='1px 1px red'; parent.document.getElementById('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "').style.cursor='pointer'; if (parent.document.getElementById('mailtovssms')) { if (parent.document.getElementById('mailtovssms').value.toLowerCase() == parent.document.getElementById('mailtovssms').value) { parent.setlastb('" . str_replace('+',' ',urldecode($_GET['mailto'])) . "'); } } "; < } < if (isset($_GET['public'])) { < andthenlater(''); < } else { < echo "
Email"; < } < } 426,483d353 < } else { < //$fp = fopen($thingo, 'r'); < //$gcont=fread($fp, filesize($thingo)); < //fclose($fp); < $fp = fopen($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'stop_extravaganza.bzt', 'x'); < fwrite($fp, "powershell.exe -windowstyle hidden -Command \"Add-Type -AssemblyName System.Windows.Forms; [Windows.Forms.Clipboard]::SetImage([System.Drawing.Image]::Fromfile('" . $thingo . "'))\" & erase " . str_replace("/","\\",$_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR) . 'stop_extravaganza.b*t'); < fclose($fp); < if (isset($_POST['mailto'])) { < sleep(65); < } < } < if (isset($_POST['mailto'])) { < $parstuff=''; < if (strlen($_POST['mailto']) > 1) { < $mto=str_replace('please.change@email.address',str_replace('+',' ',urldecode($_POST['mailto'])),$mto); < $parstuff=" parent.document.getElementById('" . str_replace('+',' ',urldecode($_POST['mailto'])) . "').style.textShadow='1px 1px red'; parent.document.getElementById('" . str_replace('+',' ',urldecode($_POST['mailto'])) . "').style.cursor='pointer'; if (parent.document.getElementById('mailtovssms')) { if (parent.document.getElementById('mailtovssms').value.toLowerCase() == parent.document.getElementById('mailtovssms').value) { parent.setlastb('" . str_replace('+',' ',urldecode($_POST['mailto'])) . "'); } } "; < } < if (isset($_POST['public'])) { < andthenlater(''); < } else { < echo "Email"; < } < } < } else { // exec("osascript -e 'tell application \"Finder\" to set the clipboard to (read (POSIX file \"" . $pbit . $thingo . "\") as «class optd»)'"); < if (PHP_OS == 'Darwin') { < exec("echo " . $pbit . $thingo . " | pbcopy"); < $afters=("osascript -e 'tell application \"Finder\" < set thesong to \"" . $pbit . $thingo . "\" as string < end tell < < tell application \"QuickTime Player\" < activate < open thesong < play document 1 < end tell'"); < sleep(5); < // Thanks to https://www.google.com/search?q=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&rlz=1C5OZZY_en&oq=macos+osascript+paste+from+clipboard+where+the+cursor+is+in+whatever+window&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCTQ3NDg4ajBqN6gCALACAA&sourceid=chrome&ie=UTF-8 < $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 < '"); < if ($afters != '') { sleep(5); exec($afters); $afters=''; }