 |
 |
remote access connect
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
There's a script that comes on the OS9 cd that activates remote access. I tried to change it so it wouldn't ask for my username and password everytime, and it works fine, except for that it can only be done once without a reboot. I think it has something to do with opening and closing the database that holds all of the remote access configurations, but I can't figure out what's going wrong. Any ideas?
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Oct 1999
Location: Meredith, NH, USA
Status:
Offline
|
|
All you need in your script is the line
RA connect
and remote access will start a PPP connection and use your stored username and password. (Stored in remote access control panel)
To disconnect use
RA disconnect
Works for me, repeatedly; no reboots.
good luck.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
Yeah, the RA Connect works, but it brings up that annoying window. Is there anyway to make it connect in the background? In the RA Connect library file, it makes reference to a boolean "hide" or something, but I can't seem to get that to work either. It's a small thing, but I'd like to try and get it to work.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 1999
Location: Decatur, GA
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Oct 1999
Location: Edmonton, Alberta, Canada
Status:
Offline
|
|
try:
RA connect with quiet mode without show status
anytime you see a boolean option
the option is either a true or false option
ie with quiet mode
without show status
or sometimes it may be reffferenced
in the form of a record
ie: thePesudoBooleanOption:False
hope this helps, myself i cant check as i'm on DSL
------------------
PGP key: http://www.geocities.com/maccanada/pgpkey.html
-30-
|
|
-- An idea is salvation by imagination.
-- Frank Lloyd Wright
-- 30 --
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
Thanks, that works great. The one thing is that it doesn't let you do anything else whlie it's connecting, but I guess you can't have it all.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 1999
Location: Minneapolis
Status:
Offline
|
|
Make it into an application, and then hide it in the backround while connecting, that should work.
------------------
-See Yea!
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
I did turn it into an application, but it won't allow me to hide it in the background, as it just holds up the whole system.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Oct 1999
Location: Minneapolis
Status:
Offline
|
|
try adding
Code:
tell application "finder" to activate
to the end of the script
------------------
-See Yea!
[This message has been edited by oscar (edited 06-02-2000).]
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
Still locks up the system, and then when it's finished connecting, it activates the finder. I just got a book on applescript, so hopefully, I'll be able to figure this out by myself.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status:
Offline
|
|
Hi 6116,
Just wanted to suggest that, if you haven't already found a workaround on your own, you could try oscar's suggestion again but this time adding the command (to activate the Finder) at the beginning of the applet script rather than at the end. That way, you might be able to continue working in the Finder and other applications while the applet continues working in the background, as long as you never switch back to the applet.
However, if that approach doesn't work for you, there are some other general methods that you could use to get an applet to launch directly into the background and stay there. Most comprehensive AppleScript books should discuss this issue in detail; possible solutions range from using a dedicated script-runner utility to using the features of the AppleScript language itself. Actually, Apple's own older "AppleScript Language Guide" manual for AppleScript 1.3.7 (available via their official AppleScript for Scripters web page) describes a rather obscure trick in the 'Calling a Script Application From a Script' section on page 310; although it isn't explicitly mentioned there, the 'launch / run' combination can also be used by one applet to launch another applet into the background without activating it. [Also, see the Speaker volume script thread in this Forum for a few suggestions.] Correction (2000/06/13): Sweet irony! I just did some tests and, in this particular case, it's necessary to use " with show status" if the applet is launched into the background by another applet via 'launch / run' (the dialog will appear, but in the background, and you'll be able to continue working in any other app). Otherwise, the applet would still lock up the machine. Go figure. ;-)
Regards,
--Paul
[This message has been edited by Paul Crawford (edited 06-13-2000).]
|
|
|
| |
|
|
|
 |
|
 |
|
Blobby
|
|
(*I did it like this using Akua's input state*)
tell application "Finder"
activate
select file "Remote Access" of folder "Control Panels" of folder "System Folder" of startup disk
open selection
input state {pointer location:{730, 190}}(*The button position- where is yours.This is RA CDEV top right collapsed @800x600 change to suit*)
input state {button down:true}
input state {keys down:"Q", transient keys:"C"}
end tell
--HEY it toggles
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
I found a reasonably simple solution to my problem without having to worry about launching scripts from other scripts. Take a look:
try -- a few thing that will stop a few errors
tell application "Network Setup Scripting"
end transaction
end tell
end try
try
tell application "Network Setup Scripting"
close database
end tell
end try
tell application "Network Setup Scripting"
open database
begin transaction
connect Remote Access configuration "the name of your configuration"
end transaction
close database
end tell
The name of your configuration can be found in the title of your Remote Access Control Panel.
Thanks to everybody for all their help.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status:
Offline
|
|
Hi again 6116,
Thanks for sharing your workaround for the original issue that you had with the Network Setup Scripting (NSS) script. Apple has been strongly encouraging everyone to migrate to the NSS model, but I'd always been a bit wary of NSS, especially after reading about the occasional conflicts between NSS and Eudora 4.x (my main email client). It's still a bit unsettling that NSS can't seem to properly end its transactions or close its own database [;-)], but perhaps now I'll start using NSS more, instead of the legacy RA commands.
BTW, I think that NSS supposedly lets you operate on whatever's the currently active configuration without having to hard-code its name. There's some sample code in the 'Switch Active Network Set' script (in the 'Network Extras : OT Extras : Sample AppleScripts :' subfolder within the 'CD Extras' folder on most recent Mac OS CD-ROMS, or available via Apple's OT EXtras 2.0.3 download). The code to dynamically obtain the name is something like:-
Code:
tell application "Network Setup Scripting"
open database
[...]
set theActiveConfigSets to (every configuration set where its active is true)
set theActiveConfigSetName to (name of (item 1 of theActiveConfigSets))
[...]
close database
end tell
Unfortunately, I've found that the above code isn't exactly reliable on my machine, and tends to yield the name of a nonexistent configuration ("My Network Settings"); maybe it's because of my Multiple Users setup? Anyway, I'll keep investigating NSS, and we'll see how things go.
Regards,
--Paul
[This message has been edited by Paul Crawford (edited 07-11-2000).]
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: May 2000
Location: NY, NY, USA
Status:
Offline
|
|
Yeah, I actually tried to do the same thing, but I found it didn't work that well, and figured hard coding would be easier. I'll keep trying though.
|
|
|
| |
|
|
|
 |
|
 |
|
Blobby
|
|
Thanks for sharing you guys, I've been using 6116's code in a toggling script which launches and quits apps.
Running 8.6, no "thing that will stop a few errors" or errors.
I played with getting a global config to work without joy too.
Cheers
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|