When I need to do this, I just store the information in a text file on the computer and have each script read/write it as needed. I use JSON formatting for the files to keep it clear, but you can use whatever.
Using Dropbox or a shared drive or that sort of thing, you can share data not only between scripts, but between computers.
I agree that a text file is the best way to do this. An alternative might be to use a property in the first script and to modify it by way of a second script as in the following:
set myApplet to "/Users/peavine/ScriptOne.app/"
set newValue to true
set scriptCopy to load script POSIX file myApplet
set scriptCopy's theProperty to newValue
store script scriptCopy in POSIX file myApplet with replacing
I’ve never done this with an stay-open applet and don’t know if it would work OK.
Thanks for the suggestions.
I was also considering the possibility to include in the APPLET, outside of the on idle / end idle code, several commands like those:
on setSendBooleanTrue()
set SendBoolean to true
end setSendBooleanTrue
on setSendBooleanFalse()
set SendBoolean to false
end setSendBooleanFalse
on SendBooleanStatus()
return SendBooleanStatus
end SendBooleanStatus
Then I can trigger from the second script, by using
tell Application "my_APPLET"
setSendBooleanTrue
end tell
a bit like adding a custom dictionary to my APPLET. And thus let the APPLET do all the job.
Thanks anyway, I will check also your suggestions.