panther Internet Connect -problem

Did you try this?

Jon


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

yes. it doesn’t work. syntax is fine but you start the script but nothing happens.

If you connect manually then run this script:

What are your results?

Jon


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

no results. the script doesn’t return anything. No error, no code … nothing I don’t believe it is a syntax problem.

i beieve the AS-solution fails for the same reason as the shell-version where i tried to call pppd directly. but i don’t know how it can be solved

This script returns the following:

"status of PPPoE configuration “Built-in Ethernet” of application “Internet Connect”

tell application "Internet Connect"
	connect [PPP/PPPoE/...] configuration "Device Name"
end tell

It works for me with Panther DP build 7B49…

thanks jon.

may last replay was nonsense. i didn’t read yor script carfully enough.

Internet connect returns the following (same as rongold, wxceot i’m running a german system):

This would lead to the conclusion that


tell application "Internet Connect" to connect PPPoE configuration "Ethernet (integriert)"

should connect

Nevertheless it won’t connect.
your suggestion was my starting point. see above

thanks anyways. i believe it works fine with modemdialup. When using modem dialup you might as well use the commend that you get from


ps -xaww | grep pppd

The following script fails to connect via Internet Connect. If I substitute disconnect for connect then the script to disconnect me from DSL/Ethernet connection.

tell application “Internet Connect”
connect PPPoE configuration “Built-in Ethernet”
end tell

If I substitute "PPP configuration “Internal Modem” in the above script, then it connects (and disconnects) me without problem.

System Profiler gives “Built-In Ethernet” as the configuration name for ethernet connect, yet the script doesn’t work.

cat weed. are you connectingto PPPoE or another device?

I’m kind of new to Applescript. I had the same problem with a script to connect my ADSL connection that broke after I updated to Panther. After some research I came to the conclusion that we must now control Internet Connect with GUI scripts. I found this info on the Apple website http://www.apple.com/applescript/uiscripting/index.html

So I have written a new script that works well for me; it makes my connection, opens and hides Mail, opens the NetNewsWire application and closes the window, because I use the app from the dock, and opens a weather bug for my menubar called Meteorology.

I saved the script as an application without the startup screen and placed it in my login items. Now all those little things I like when I finally sit down at the computer to work in the morning, all happen behind the scene once again in Panther, the way they used to in Jaguar!

Feel free to uses it as you like!

tell application “Internet Connect”
activate
end tell

tell application “System Events”
tell process “Internet Connect”
tell menu bar 1
tell menu bar item “Connect”
tell menu “Connect”
click menu item “Connect”
end tell
end tell
end tell
end tell
end tell
delay 30

tell application “Internet Connect”
quit
end tell

tell application “Mail” to activate
tell application “System Events”
tell process “Mail”
tell menu bar 1
tell menu bar item “Mail”
tell menu “Mail”
click menu item “Hide Mail”
end tell
end tell
end tell
end tell
end tell

tell application “NetNewsWire” to activate
tell application “System Events”
tell process “NetNewsWire”
tell menu bar 1
tell menu bar item “Window”
tell menu “Window”
click menu item “Close”
end tell
end tell
end tell
end tell
end tell
delay 10

tell application “Meteorologist” to activate

thanks for the info. very helpful.

David,

I can’t help with Internet Connect but here’s some code for Mail and NNW that doesn’t rely on scripting the UI.

tell application "Mail" to launch
tell application "System Events" to set visible of process "Mail" to false

tell application "NetNewsWire" to ¬
	try
		close front window
	end try

Tested with Mail 1.2.5, NNW 1.0.8 and OS X 10.2.8.

– Rob

Rob,
I tested your suggestions and had no success getting them to work in Panther. Panther changed a lot of stuff in AppleScript!

That strikes me as odd since it’s very basic AppleScript code.

– Rob

But Rob, you seem to be missing the whole point of this thread. There have been scripts that have worked for many of us in the past. The script that I used to use with each of those programs I like to open at start-up; Internet Connect, Mail, etc, I copied directly from someone else’s post. However, upgrading to Panther broke it. I couldn’t get hardly any of the individual pieces to work. What has been basic scripting in the past has been changed, by Apple Computer, and will require some relearning. Or in my case, because I am just now learning AppleScript, I will be learning things that acomplish for me in Panther what I need and it will perhaps be different than the way you can acomplish it in Jaguar.

It is not rude, just true, someone’s suggestions about how to accomplish something in 10.2.x is likely not going to be useful to someone working in 10.3.x. And the Jaguar person won’t understand it until they upgrade and see for themself. Then like me they can wander Apple’s AppleScript website and find out the changes they have made and the new way to do things.

Thanks for trying to help.

I tested Rob’s code in Mac OS X 10.3.2 using Mail 1.3.3 (v612) and NNW 1.0.8 and it worked flawlessly. While there have been changes in AppleScript from 10.2.x to 10.3.x, in many cases the changes require no modifications to scripts (especially when scripting third-party applications that haven’t changed) or very minor tweaks, not major reworking. Rob is correct that very basic code like this (and it is very basic) has not changed.

Jon

Sorry, I copied it directly from the webpage, dropped it in place of my previous code, it compiled and then I got continual error messages every time I ran the script.

This will be my last post to this page. I posted to offer info to the guys who were having trouble with Internet Connect. I had the same problem and solved it.

I’m not interested in a battle of any kind.

I’m curious, what is it in my post (or Rob’s) that seems antagonistic to you? I assure you, there is no battle going on here, just a conversation with suggestions from strangers on how to make things easier.

Thank you for posting your code to help others, try to take the help Rob posted (and I corroborated) in the same spirit.

Jon

David,

I’m positive that no one is trying to start a battle. We spend hundreds of hours every year trying to help the visitors of these forums, so there’s little time for battles or foolishness. It seems that there must be a problem that’s preventing simple code from working on your setup (and on other computers as well). If we can determine what the problem is, it will be helpful to you and the others. In the end, finding a solution is beneficial to all of us.

Sometimes when I get unexpected results/errors from simple scripts that should not fail (which happened about an hour ago), I reboot my computer and the problem disappears. Other problems can sometimes be eliminated by repairing permissions. Finally, on the extreme end of troubleshooting, a reinstall of the OS seems to fix some issues.

One issue that can cause problems is that Safari sometimes butchers code when copying and pasting. It’s sometimes necessary to inspect the code closely and tweak as needed.

If you don’t wish to participate, that’s your call, but it seems that you might benefit by doing so.

– Rob

Thank you for this. It works fine in my OS10.2. Would you know how to embed it with an error handler to deal with a connection failure dialogue box?