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 6502a
 
GerritV's Avatar
 
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:	13
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 6502a
 
GerritV's Avatar
 
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

Similar Threads
thread Thread Starter Forum Replies Last Post
Why so much Applescript? Dranix Mac Programming 25 May 2, 2014 01:05 AM
help with applescript andrewisgod Mac Programming 0 Apr 18, 2014 07:58 AM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 28, 2013 11:32 PM
Help with an Applescript Theydonboi Mac Applications and Mac App Store 2 Nov 5, 2012 11:52 AM

Forum Jump

All times are GMT -5. The time now is 04:53 PM.

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

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