Created
October 10, 2016 22:18
-
-
Save unforswearing/ca87127c3b1d4abdaa47ec325b9351d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set _Path to "<<enter path to your script folder here>>" | |
set scriptLaunch to text returned of (display dialog "Enter name of script to run" default answer "" buttons "OK" default button "OK") | |
if scriptLaunch contains "" then | |
error number -128 | |
else if scriptLaunch contains scriptLaunch then | |
try | |
set scriptRun to _Path & "/" & scriptLaunch & ".scpt" | |
run script scriptRun | |
on error | |
display alert "Your script failed to launch." | |
end try | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I combined both of your ideas: https://gist.github.com/dnnsmnstrr/c02ae3d5be5ab484b595cb8aea6cf65b