Apple Script/ Automator

Brossy

Registered
Hi,

I'm a beginner and I need to do an automatic operation and I think the better way Is do it with Apple Script or Automator.

What I want to do is start an application when it's an specific hour. I want to start the application and I want it to stay "sleep/not running" until the time I want.
The other thing I need to do is make a click on a button of "OK", but not one I create, one of a program I've installed and it's not one of Apple. I have to open the program at one hour, done by the above, and click a button to start the operations of the program.

If someone can help me, thank you very much.

Mario, from Spain
 
Hi,

The program is the Nikon Capture, and I know how to open it automatically, but I need to do it at one hour of the day, exactly, and then in the program there is a button on the left side that i must clilck on to run the program.

Again thank you very much.

Mario, from Spain.
 
I do not have that particular application; nor, is a demo of it available.

You can edit 'crontab' (MacOS X 10.0.0 - 10.4.7) [or create a 'LaunchDaemons' file, MacOS X 10.4.x] to have an AppleScript applet (application) executed at a specific time. Use 'VersionTracker.com' (or equivalent) to find utilities that can schedule events.

The applet would contain code such as ...

tell application "Nikon Capture" to activate

tell application "System Events"
tell process "Nikon Capture"

keystroke return -- Applies only if 'OK' button is default button, or something like ...

click button "OK" of ... of window 1

end tell
end tell
 
Hi,

I'm gonna try using crontab to run the application at one hour of the day, but this will be on monday, so until then I won't do anything.

Thank you very much for your help and I will keep you informate.

Mario.
 
Hi,
I've tried to use crontab but i can not make it run, but what you told me about tell application "System Events", tell process "Nikon Capture", and click button "OK" of ... of window 1 almost works, what happens is that at the moment of executing the script an error called NSReceiverEvaluationScriptError:4 ppers and don't let my click the button.
The script i've made is

tell applicaction "Capture Control"
activate
delay 10

tell application "System events"

click button "Shoot" of window "Capture Control"

end tell

end tell

But i don't know how to write the propierty of click button, because i've seen i can call a window by window or shhet or tab and i don't know how to use it.

Thanks again, Mario.
 
Back
Top