Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 1, 2012, 03:15 PM   #1
GerritV
macrumors 6502
 
Join Date: May 2012
My first Applescript

Like the title says...

Looking for a way to script the following:
- open Netextender
- tab to the 3rd field in the dialog box
- enter a text value
- confirm

My questions:
- do I use AppleScript or Automator, perhaps TextWrangler?
- what would this applescript look like, in rough syntax?

TNX
__________________
MacBook Pro 15" iPad 3 iPhone 4S
GerritV is offline   0 Reply With Quote
Old Jun 1, 2012, 03:58 PM   #2
aarond12
macrumors 6502a
 
aarond12's Avatar
 
Join Date: May 2002
Location: Dallas, TX USA
Automator will be your easiest way to make your AppleScript. Choose the application on the left, then the function, and drag it to the right side. It takes a bit of searching for specific functions (especially the Finder functions), but with a little practice, it's quite useful and fun!
__________________
Voted "Most likely to start his own cult" by my high school class.
aarond12 is offline   1 Reply With Quote
Old Jun 1, 2012, 10:19 PM   #3
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
If the attached tumbnail is the right application and the red arrow points to the right field then try this :

Code:
activate application "NetExtender"
tell application "System Events"
	tell process "NetExtender"
		-- insert GUI Scripting statements here
		delay 3
		keystroke tab
		keystroke tab
		keystroke "your password"
		click button "Connect" of window "SonicWALL NetExtender"
	end tell
end tell
Attached Thumbnails
Click image for larger version

Name:	Picture 2.png
Views:	5
Size:	65.8 KB
ID:	341555  
kryten2 is offline   0 Reply With Quote
Old Jun 2, 2012, 01:14 AM   #4
GerritV
Thread Starter
macrumors 6502
 
Join Date: May 2012
@ aarond12
Thanks for pointing me to Automator. I got as far as to start the app, but from there on I recorded my actions and in the end got it to work. From what I've read so far, perhaps NetExtender doesn't support much more.
There's a long road ahead of me I'm afraid

@kryten2
Your script is exactly what I was after, so thanks! It really helps me to study scripts like yours, trying to understand the syntax. BTW, I'm in Belgium myself.

Again, thank you both.
__________________
MacBook Pro 15" iPad 3 iPhone 4S
GerritV is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT -5. The time now is 11:55 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC