I need to run script which is in separate file, how to do that?
What to do with script size limitation if apple script editor says my script is too large?
P.S.
why these Apple thinx so sux?
Windows guy!
I need to run script which is in separate file, how to do that?
What to do with script size limitation if apple script editor says my script is too large?
P.S.
why these Apple thinx so sux?
Windows guy!
Look at the dictionary for the ‘Standard Additions’ scripting addition for more details on this.
run script file "path:to:file"
Script Editor 2 does not have the same size limits as previous versions. You might want to give it a try. If that isn’t a suitable solution, you can also consider Script Debugger or Smile.
This type of comment might cut down on the number of helpful replies that you get when asking for assistance here. 8)
Thank You Rob so much, It is exactly I am looking for.
Well, i am sorry if it is touches Mac guys too much. :twisted:
On a related note:
How do you call the open handler of another script file, taking advantage of the global properties of the script file that contains the open handler.
Kevin
set otherScript to load script "path:to:other script"
-- call the doSomething() handler in the other script:
tell otherScript to doSomething()
--or
set myResult to otherScript's doSomething()
-- get a property named 'someProp'
set myProp to otherScript's someProp
-- or set the other script's property to a new value
set otherScript's someProp to "newValue"
--if you change the other script's properties, make sure you save it when you're done:
store script otherScript in file "path:to:other script" replacing yes