image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old August 10th, 2006, 06:53 AM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Brossy is on a distinguished road
Apple Script/ Automator

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
Reply With Quote
  #2  
Old August 10th, 2006, 08:32 AM
Registered User
 
Join Date: May 2005
Posts: 1,339
Thanks: 0
Thanked 1 Time in 1 Post
barhar is on a distinguished road
Please provide the name of the non-Apple application, and where its 'OK' button is.
Reply With Quote
  #3  
Old August 10th, 2006, 02:41 PM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Brossy is on a distinguished road
Program and button

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.
Reply With Quote
  #4  
Old August 11th, 2006, 10:40 AM
Registered User
 
Join Date: May 2005
Posts: 1,339
Thanks: 0
Thanked 1 Time in 1 Post
barhar is on a distinguished road
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

Last edited by barhar; August 14th, 2006 at 07:33 PM.
Reply With Quote
  #5  
Old August 12th, 2006, 04:49 AM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Brossy is on a distinguished road
Cron Tab

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.
Reply With Quote
  #6  
Old August 17th, 2006, 12:39 PM
Registered User
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Brossy is on a distinguished road
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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automator/Apple script question... neuby Software Programming & Web Scripting 3 March 9th, 2006 04:02 PM
Apple Script anuraj Mac OS X System & Mac Software 1 January 11th, 2006 08:14 AM
Automator to Execute a Script After Successful Vpn Connection? bugman Networking & Compatibility 0 November 1st, 2005 01:30 PM
Start script in Terminal via Automator? AppleWatcher Unix & X11 0 October 25th, 2005 05:18 AM
Apple-supplied example project for Apple Script Studio - an image editor rharder Software Programming & Web Scripting 0 February 13th, 2002 02:19 PM


All times are GMT -5. The time now is 07:31 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.