I am brand new to this board and very new to AppleScript. I have been working, with help from another group, on a script to be place in my startup folder to check email each morning when the computer starts up. At the end it should disconnect from the dial-up connection.
Here is the script we have devised. Can you offer suggestions and/or improvements?
Thanks for your assistance,
Ross Huter
…
set t to (current date)'s time
if t > 24900 and t < 25500 then – 6:55 to 7:05am
with timeout of 1000000 seconds
tell application “Eudora” to connect with checking
end timeout
tell application “Network Setup Scripting”
try – (just a precaution in case the db should still be open)
close database
end try
open database
set c to Remote Access configurations whose active = true
disconnect c’s item 1
close database
end tell
end if
I’m sorry that I can’t test any of this but I don’t have the necessary elements. It might need a full reference to the Remote Access configuration, such as:
disconnect Remote Access configuration c
Or some variant of it. Or maybe even:
disconnect Remote Access configurations whose active is true
I watched the PPP connection this morning as the script ran. Although I still get the error, the phone was disconnected.
The error hightlight was on the line:
disconnect c’s item 1
Ross Hunter
Here’s the original script again:
set t to (current date)'s time
if t > 24900 and t < 25500 then
with timeout of 1000000 seconds
tell application “Eudora” to connect with checking
end timeout
tell application “Network Setup Scripting”
try – (just a precaution in case the db should still be open)
close database
end try
open database
set c to Remote Access configurations whose active = true
disconnect c’s item 1
close database
end tell
end if
I wish I knew the answer to your question. This part of the code was given to by someone who was trying to help disconnect the PPP connection. I’ve written him, but no answer so far.