Hello,
I'm trying to set up Clockwork to create new Stopwatches on the fly, based on X-10 trigger actions from Indigo. It seems like this should be a very simple task. Trouble is, everything I've tried to enter a timer name fails. It's critical that my script is able to supply the name of the remote trigger device that started the timer.
Naturally our consideration for the purchase of Clockwork hinges on this use, so I'm trying to get this answered within the 30 day trial timeframe.
Currently, I get a new unnamed timer for every event trigger. All I need now is to assign the name, which will be a known value in the script. Grrr! Any thoughts would be greatly appreciated.
Here's my script so far. Thanks in advance.
-George
--Add a new stopwatch to the window...
activate application "Clockwork"
tell application "System Events"
tell process "Clockwork"
tell menu bar 1
tell menu bar item "File"
tell menu 1
tell menu item "New"
tell menu 1
click menu item "Stopwatch"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
-- Still trying to get the name right...
activate application "Clockwork"
tell application "System Events"
tell process "Clockwork"
tell window "Clockwork"
tell group 1
tell scroll area 1
tell table 1
tell row 2
tell text field 1
--this, in theory, should enter the table number and start the timer. But nooooo...
set value to "Table 1"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
--Start me up!
activate application "Clockwork"
tell application "System Events"
tell process "Clockwork"
tell menu bar 1
tell menu bar item "Timer"
tell menu 1
click menu item "Start"
end tell
end tell
end tell
end tell
end tell
I think you are trying to do
I think you are trying to do things the hard way. Instead of using "System Events" use Clockworks built in scripting support. I think this will do what you want.
tell application "Clockwork"
set s to make timer with properties {mode:stopwatch, name:"some name"}
s start
end tell