Wednesday, November 22, 2017

#1 2012-01-08 04:29:23 am

Registered: 2011-12-09
Posts: 15

Making applescript save variables?

I have a problem where i need to pass the variable from one script to another.
This problem solves easily in applescript editor using this code:
main.scpt(sets the var. info)


display dialog "sdg" buttons {"yes", "no"}
if button returned of the result is "yes" then
   set info to "black" as string
end if

shower.scpt(displays the var. info)


set loader to load script ("/Users/Mardanov/Desktop/")
--> Set your path    
set final to POSIX path of loader's info

display dialog final

But same thing (exept for the paths) doesn't work for ASS.

I have notised that in order to make it work in applescript editor i need to:
-  run the "main.scpt"
-  save "main.scpt"
So this two things are automaticaly done by mac if ill just save this script as an app and then run it.

But ASS doesnt save the variable after closing and "shower.scpt" says "cant make the info in to type reference"

So what should i do?
May be there someother ways to pass the variables?

Filed under: ASS pasing variable



#2 2012-02-12 07:03:55 am

Registered: 2006-06-03
Posts: 4

Re: Making applescript save variables?

Not sure if it will be of any help since it's not directly related to ASS but have a look here: I've been using this method to set variables in a plist file and passing them between different scripts.



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)