hi everyone! i started to take my first steps on ASS, after doing some lousy apps on AS
P), and i need some help.
My goal is to make an application that, when i press the button "start" it starts a loop. when i press the button "stop" it stops the loop.
this is what i got so far (i took the "if ChosenButton..." from here
but with this script, i get a -1708 error
i had something different (on idle handler and a variable that only started the on idle if i pressed the start button, but i was never able to make it stop the loop).
Anyone has any ideas?
Thanks, Keytachi
P.S.
For testing purposes i'm using TextEdit and "a"
and yes, i do have assistive devices allowed
My goal is to make an application that, when i press the button "start" it starts a loop. when i press the button "stop" it stops the loop.
this is what i got so far (i took the "if ChosenButton..." from here
Code:
on clicked theObject
set ChosenButton to the name of theObject
if ChosenButton is {"Start"} then
repeat
tell window of theObject
tell application "System Events"
tell application "TextEdit" to activate
keystroke " "
delay 10
end tell
end tell
end repeat
end if
if ChosenButton is {"Stop"} then
exit repeat
end if
end clicked
but with this script, i get a -1708 error
i had something different (on idle handler and a variable that only started the on idle if i pressed the start button, but i was never able to make it stop the loop).
Anyone has any ideas?
Thanks, Keytachi
P.S.
For testing purposes i'm using TextEdit and "a"
and yes, i do have assistive devices allowed