Been trying to get the following to work:
1st script saved as an application:
on run {var, var2}
display dialog var & var2 end run
When I run the next script from the script editor:
run script "Mac OS X:Users:cpalma:Desktop:test" given paramenters:{"Hello", "World"}
or
run application "Mac OS X:Users:cpalma:Desktop:test" given paramenters:{"Hello", "World"}
they both fail… any thoughts? or suggestions…
Thanks,
I have had the same problem in the past. I found that depending on the version of the OS, or probably the version AppleScript, that you had to code it differently. Below is a snippet of code for you to look at. OSVer has been set previously to the version of the Operating System.
if OSver < 9 then --use codes that work with system versions less than 9
tell application AppToUse
launch
set {SpecList, GenSpec, ErrorList} to (run {PBarPage, SpecList, GenSpec})
end tell --application
else --use codes that work with system 9
set {SpecList, GenSpec, ErrorList} to run script AppToUse with parameters {PBarPage, SpecList, GenSpec}
end if
Thanks!
I finally got it to work using this code:
tell application “Mac OS X:Users:cpalma:Desktop:test” launch run script with parameters {“Hello”, “World”} end tell
Claudio