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 Mar 21, 2008, 10:26 PM   #1
BounceTigger
macrumors newbie
 
Join Date: Mar 2008
New to Programming - is this possible?

Hi all! I'm looking for a script either through Automator or Apple Script - but I'm not sure if the following script is too complex:
Essentially, my wireless connection requires me to enter a numeric password (lets say its 665544) to get on the internet. When I launch Safari, it redirects me to a welcome page. On the page I click a link that says "Enter password" and then enter the password in a textbox.
So, in English terms, I want to run the following:
Open Safari
Click "Enter Password"
Enter 665544
Click "Enter" (or just press return)

Ideally, I'd like to run this at start-up, but I'm fairly certain I can just throw it into "Log-in items."

Is it possible? And, if its not too difficult, could someone write it for me?
(I'm running 10.5.2 if that matters)

Thanks so much!
BounceTigger is offline   0 Reply With Quote
Old Mar 22, 2008, 05:14 AM   #2
lazydog
macrumors 6502a
 
Join Date: Sep 2005
Location: Cramlington, UK
Send a message via MSN to lazydog
Hi

If your router is using a simple post for the password screen, then you will be able to use Automator. All you need to do is set up an action that passes an url to Safari which is the same as the one generated from clicking enter on the router's password screen. For example it might be something like this:- http://192.168.2.1/login?password=665544. Have a look at the html source and look for a form element to see what attribute names it uses.

Hope this helps!

b e n
lazydog is offline   0 Reply With Quote
Old Mar 22, 2008, 09:20 AM   #3
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
As lazydog said, it's really all in how it works. If you can figure out what GET/POST string is sent, it should be trivial. You should even be able to make a shell script that runs on startup that's a one liner, such as:
Code:
curl http://192.168.2.1/login?password=665544
To decipher what the address should be, on the page you enter the password there should be a form element that has a target attributed. That target is the page that the information will be sent to. It will also have some sub-elements called input. Each of those input elements can be added to the query string, along with the values you would enter in the field. If you need help, perhaps you could post the form element and everything inside of it, and we could help you craft the string. obviously you should not send the actual password, etc. but we should be able to point you in the right direction.
lee1210 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

Similar Threads
thread Thread Starter Forum Replies Last Post
Airport Extreme & "remote streaming" to Plex - is this possible? NazgulRR Mac Peripherals 4 Oct 13, 2010 05:18 PM
Itunes Smartlist - Top 25 Most Played - 25 Individual Artists - Is this possible Hoffsteader Mac Applications and Mac App Store 1 Jul 26, 2010 09:51 PM
Documents To Go for iPad and VGA Out - Is this possible? biosci iPad Apps 2 Jun 3, 2010 05:03 AM
Disk Utility - Format to FAT32 in Applescript - is this possible? steevg Mac Programming 5 Jul 27, 2009 02:29 PM
Purchase Program - is this legit? illumin8 Macintosh Computers 8 May 8, 2003 12:52 PM


All times are GMT -5. The time now is 09:47 PM.

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

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