Re: Connect PPP Script
Re: Connect PPP Script
- Subject: Re: Connect PPP Script
- From: Kai Edwards <email@hidden>
- Date: Tue, 01 Jan 2002 23:46:08 +0100
>
Date: Mon, 31 Dec 2001 23:54:21 -0800
>
To: email@hidden
>
From: Terry Graham <email@hidden>
>
Subject: Connect PPP Script
>
>
Hi People,
>
>
New to the field; I've been trying to create my first script and have failed
>
on every attempt. I'm using an 040 Quad and 7.6.
>
Inspired by the challenge of unexplored application, I've been trying to
>
1. Edit the existing PPPConnect script so that upon clicking on it I don't
>
then have to fill in password, username and ISP phone number.
>
In this existing script the text is called a "sample". What does THAT mean?
>
Is it just dummy text?
I dug out a copy of a PPP Connect script. In the description box it reads
"This script contains an example of using the "PPP connect" AppleScript
command." Is that what you're referring to? If so, it simply means that the
script contains the "PPP connect" command.
>
Is this script a "run-only" and as such uneditable?
No. If a script has been saved as a run-only application, you shouldn't be
able to open it with Script Editor. (If you try, a dialog will tell you
something to that effect.)
>
2. I've tried a "save as" of this script; typing in my own details
>
(password etc.).
It's usually easier for others on the list to suggest what might be going
wrong if you include details of your modified script. Does your modification
look anything like the version below? (I can't test anything on 7.6 right
now, but you might try adapting and running it anyway...)
(Watch out for any rogue line wraps)
-- START SCRIPT -------------------------------------
property kRANoError : 0
property kRAPortBusy : -7114
on run
set t to "12345"-- enter your ISP's telephone number
set u to "username"-- enter your username
set p to "password"-- enter your password
try
PPP connect address t user name u password p
on error errmsg number errnum
if (errnum kRANoError) and (errnum kRAPortBusy) then
display dialog "Error " & errnum & " was encountered."
end if
end try
end run
-- END SCRIPT -------------------------------------
>
3. I've tried opening a new script, pressing record, then going through
>
the motions.
>
First time using the PPP control panel (where I don't have to type
>
anything in)
>
Second try, pressing record; then opening the PPP Connetc Script and
>
typing
>
everything in and waiting for established connection.
There's a difference between an application that's recordable and one that
is scriptable. The Finder is recordable up to a point but, AFAIK, there
aren't that many other situations in which you can record actions using
Script Editor. Generally, as you tried earlier, your best bet is to find a
script that's close and modify that.
>
4. Early on I dragged the PPP Connect script over the Editor icon and a
>
script
>
icon on a page icon was created and the orig. PPP Connect disappeared.
>
I restored the original from CD copy and started over with moves 1, 2
>
& 3. above.
Sorry, I can't help with an explanation there. (However, to avoid similar
problems in future, you might try duplicating the original file in the
Finder and then renaming the copy - instead of opening the original and
saving as.)
>
I know that prior to any of these moves that the Script Editor must first
>
be on. . . .
>
but I am stuck.
The first attempts are the hardest. But hang in there, and some of it should
begin to make sense before too long.
Good luck!
--
**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************