Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > to switch Appletalk on/off?

to switch Appletalk on/off?
Thread Tools
dvs
Guest
Status:
Reply With Quote
Jun 9, 2000, 09:59 PM
 
Hi, I'm a newie to applescript and I'm trying to write a script that will check Appletalk and make it Active if it is Inactive. The reason for is Premiere turns off appletalk while capturing and but sometimes forgets to reactivate it afterwards. Any suggestions would be appreciated. (I can get the Conntrol panel open but don't know how to get it to change the state)
Thanks in advance
     
Blobby
Guest
Status:
Reply With Quote
Jun 10, 2000, 05:18 AM
 
thanks to the prompt you get opening the control panel with Appletalk inactive a quick and easy way would be to script open the control panel , 'enter ' keystroke and close.
     
Junior Member
Join Date: Mar 2000
Location: Salem, OR, USA
Status: Offline
Reply With Quote
Jun 10, 2000, 05:24 AM
 
If you are using something like
tell application "Finder"
open "HD:System Folder:Control Panels:Appletalk"
then you are going about it the wrong way.

What you need to use is Network Setup Scripting addition.

*********
tell application "Network Setup Scripting"
try
open database
begin transaction
set AppleTalk active of AppleTalk options "AppleTalk Globals" to true
end transaction
close database
on error
abort transaction
close database
end try
end tell
**********

It took me a couple of hours to track this down. NSS is not well documented.

Any other questions just post a reply here.

Numero
     
Dedicated MacNNer
Join Date: May 2000
Location: Chattanooga, TN
Status: Offline
Reply With Quote
Jun 10, 2000, 09:28 AM
 
Another suggestion would be setting up 2 Location Manager sets (one with AT on, and one off). Then script Location Manager to toggle between sets. Or you could use this addition: http://www.osaxen.com/home.taf?id=appletalk_access
which lets you turn AT on and off. BTW isn't it strange that TCP/IP is scriptable , but AppleTalk isn't?
     
Junior Member
Join Date: Oct 1999
Location: Edmonton, Alberta, Canada
Status: Offline
Reply With Quote
Jun 10, 2000, 11:33 AM
 
AppleTalk Access OSAX
is a "toggle" to turn AT on and off

Their Code;
appletalk on -- Turns On
appletalk status -- Gets Status
appletalk off -- Turns Off


hope this helps

------------------
PGP key: http://www.geocities.com/maccanada/pgpkey.html
-30-
-- An idea is salvation by imagination.
-- Frank Lloyd Wright
-- 30 --
     
dvs
Guest
Status:
Reply With Quote
Jun 10, 2000, 04:10 PM
 
Thanks everyone!! I had just found out about the Apple's Network scripting guide module, installed it, followed it (even begining to understand it) but unfortunately the problem has compounded as for some reason I don't seem to have "Network Setup Scripting" dictionary and the script doesn't get past the first line. I'm running OS 9.04 (international english) on G4 450. Once I track the dictionary down i guess it will work. cheers!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:05 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2