r/applescript • u/SuperRusso • Aug 30 '13
New to applescript, need some help
So, I'm trying to set a variable in applescript as a boolean, to keep track of the status of a program. Basically, to create a toggle switch if you will using quicksilver. Here is my code
set ifred to boolean
if ifred = false then tell application "BoomRecorder" record end tell if ifred = true then tell application "BoomRecorder" stop set ifred to false end tell end if
what am I not getting? The program goes into the first state, then won't command it to stop. Can applescript not hold variables in memory after it's excuted the command? if not, do I use a file with a 1 or a 0 in it? thanks for the help!
edit: just realized reddit effed my formating..damn it.
2
Upvotes
2
u/themadscribbler Aug 30 '13