Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An AppleScript to start Internet Connect at login Apps
I'm not a very good with Apple script, but I made this script to start my internet connection when I log on, rather than turning it on manually. If you can improve on it, please do.
tell application "Internet Connect"
  activate
  connect
  quit
end tell
Then all I did, was open System Preferences: Accounts. Under the Start-up items entry, I added the script. There you go, whenever you log on, the internet starts for you.

[robg adds: It's a simple script, but I don't think we've directly covered a way of starting the internet connection at login before (I'm sure someone will correct me if I'm wrong).]
    •    
  • Currently 1.25 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[11,073 views]  

An AppleScript to start Internet Connect at login | 7 comments | Create New Account
Click here to return to the 'An AppleScript to start Internet Connect at login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to start Internet Connect at login
Authored by: fracai on Mar 09, '05 01:50:09PM

you might have problems with this script if you have multiple network devices (ethernet, wireless, modem, etc). I use a similar script to disconnect and found that I had to reference a specific device or disconnect all devices.

I'm not sure how this translates to connecting (does it connect based on the ordered priority?).

---
i am jack's amusing sig file



[ Reply to This | # ]
An AppleScript to start Internet Connect at login (for different locations)
Authored by: Anonymous on Mar 10, '05 05:47:50PM

I am new to OS X and have never written Apple Script before.

I use my iBook's wireless connection in two different places daily. One is at home, where I can just connect to the wireless network and surf the web. The other is at Uni, where I need to use a proxy to get to external sites.

At the moment I have to change my "Location" from "Home" to "Uni". I'm just wondering how good the "Automatic" is for this as I haven't had and luck and whether I could get an Apple Script to check if the proxy is needed and enable it if it is.

Also, how do I set the preferences to automatically join a network?



[ Reply to This | # ]
An AppleScript to start Internet Connect at login
Authored by: taxi on Mar 10, '05 06:01:16PM

I have something similar to this set up for when I am working on my PC, and need to tell my Mac (which is my gateway) to connect (I'm on dialup).

What you do need to do is be able to telnet/ssh into your Mac, and run an applescript like this. The key is that you may need to 'sudo' the command, as you cannot run AppleScripts as a non-active user. (Switched out, for example).

I'll post some more details when I get home tonight - what the script is called, for instance.



[ Reply to This | # ]
An AppleScript to start Internet Connect at login
Authored by: pecosbill on Mar 14, '05 07:14:38PM
I would do something like this (not tested)

tell application "Internet Connect"
  launch -- starts in background
  try
    connect
    -- if it fails to connect, it will go to the error section skipping the next message
    display dialog 'Connected to the Internet'
  on error
    display dialog 'FAILED to connect to the Net'
    -- there are fun and fancy things to do here that I don't have with me like showing the actual error returned.
  end try
  quit
end tell

---
Pecos Bill

[ Reply to This | # ]

An AppleScript to start Internet Connect at login
Authored by: asalerni on Mar 18, '05 08:26:50AM
Do you know something to launch a connection different than default???? I tried
connect configuration name to telephone number tel as user usr with password psw
like the documentation suggest, but it doesn't work

[ Reply to This | # ]
An AppleScript to start Internet Connect at login
Authored by: Tilman on Mar 12, '06 11:06:00PM
use
connect current configuration to telephone number tel as user usr with password psw

instead of
connect configuration name to telephone number tel as user usr with password psw

---
Tilman

[ Reply to This | # ]

An AppleScript to start Internet Connect at login
Authored by: Tilman on Mar 26, '06 10:17:54PM

use
connect current configuration to telephone number tel as user usr with password psw

instead of
connect configuration name to telephone number tel as user usr with password psw


---
Tilman



[ Reply to This | # ]