Scripting Internet Connect in 10.3, A Lost Cause?

I’m trying to script Internet Connect to use a variable phone number for a fixed configuration. Meaning that I have the user name and password entered in a configuration in Internet Connect, but the phone number is variable based on user input. I’ve read the past discussion here and elsewhere on scripting Internet Connect in Panther, but nothing seems to work.

The problem is this, I see the phone number entered into Internet Connect, but when I tell it to connect it tells me no phone number has been entered. Subsequent manual (non-scripted) clicks of the Connect button also fail. It isn’t until the phone number field is changed (even if just adding a space) that it will “see” the phone number. I’m using System Events to set the value of the text field containing the phone number. Clearly what is happening here is that when a user enters a phone number into the text field the program sees this an stores this number in memory. When System Events is used however, the program doesn’t detect the activity and store the data internally. Shame, shame on Apple for not pulling the info directly from the text field when sending the command to pppd to connect.

Anyway, I’m wondering if anyone has any new ideas on how to accomplish this miracle, which was trivial on 10.2 (THANKS APPLE!).

Briefly the intention of this script is that we have Verizon DSL for Business, which comes with free unlimited dial-up, so when people are on the road they can still have access. So, I thought, great, I’ll write a script that searches a file (I’ve extracted all the cities and numbers from the Verizon PDF file) for the city and then supplies the number to Internet Connect. So now everything works, except Internet Connect is a pain in the butt!

OK, I’m at a complete loss as to why you’re trying to use System Events to type in a new phone number.

What’s wrong with:

[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

I can’t tell whether this works or not since I don’t use dialup, but the dictionary implies this should work.

I am trying to use System Events precisely because Internet Connect does not work as the dictionary implies. You can test this out (assuming you have a modem), dial up or no. If it works, Internet Connect will tell you there is no dial tone, if it fails (and it does on my AlBook) Internet Connect will tell you that you didn’t enter a phone number.

I’m sorry to change subject a bit, but since you’re scripting “Internet Connect” you might know about other things that seem not to work properly. For example, I’m getting a 0 when I ask for speed, bytes received/sent, state, etc:

tell app "Internet Connect"
	get speed of status of current configuration
		-> returns 0
	-- and so on with the rest...
end tell

This was allready a bug in Jaguar, and seems to be one still in Panther (10.3)
Anyway, sorry I can’t help you (I must agree with Camelot though, but if you say it doesn’t work… I haven’t tried, but will do the next time I connect if I remember), and thanks for your time.

Please, who can connect with “Internet Connect”? Some people have posted the code

tell application "Internet Connect" 
connect PPP configuration 1 to telephone number "18885551212" 
end tell

I am trying

connect PPPoE configuration 1

but nothing happens on my computer! Please, any help?

Model: iMac
AppleScript: 1.9.3
Browser: Safari 312
Operating System: Mac OS X (10.3.9)