Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Mar 21, 2008, 10:26 PM   #1
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
macrumors 6502a
Join Date: Sep 2005
Location: Cramlington, UK
Send a message via MSN to lazydog

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:- 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 online now   0 Reply With Quote
Old Mar 22, 2008, 09:20 AM   #3
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:
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

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
Mac programming should be more like iOS programming. moonman239 Mac Programming 13 Feb 17, 2014 01:37 PM
Help with C programming. Meitou Mac Programming 2 Sep 21, 2012 01:36 PM
C++ programming jmfel1926 Mac Programming 4 Sep 14, 2012 07:21 PM

Forum Jump

All times are GMT -5. The time now is 05:30 AM.

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

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