Re: Newbie; scripting additions missing?
Re: Newbie; scripting additions missing?
- Subject: Re: Newbie; scripting additions missing?
- From: Andy Wylie <email@hidden>
- Date: Thu, 04 Jul 2002 20:20:35 +1200
on 4/7/02 2:09 PM +1200: Peter Suter wrote:
>
I'm using Applescript to give me some system level information that I can't
>
easily get at with my main app.
>
This info is passed by the app back to our support team so that the users
>
don't need to be experts at much at all.
>
I was checking out the various aspects of system info that would/could be
>
useful for the app to tell us about.
>
Thanks to your tip I'm making some progress and at least I know Network
>
Scripting is alive.
>
now this script is returning an understandable error; previously it was
>
giving 'end of line' or "dictionary" errors - probably me asking the
>
"Finder"
>
>
tell application "Network Setup Scripting"
>
return AppleTalk active
>
end tell
>
Wrapping it in a 'try block' may be more useful...
try
--something that doesn't work
on error m number n
error {n, m}
end try
>
So, since it's convoluted and your far from the novice scripter that I am,
>
how do I get info out of the AppleTalk suite?
>
There's a bunch of guidebook modules avaialble from Apple including a
Network one which contains the following gem...
----------
tell application "Finder"
if (computer "atlk") is 0 then
return false
else
return true
end if
end tell
----------
(sure to be simpler than NSS;)
http://www.apple.com/applescript/help_mods.html
>
What do you use instead?
Anything:) NSS is difficult so like the Guidebook authors I'd look elsewhere
first,Akua Sweets which I use for many tasks has a large network suite so
I'd start there.
>
The bubbles worked fine, thanks, but:
but? eh? ;)
>
How do I use the commands in the 'Network Info' scripting addition?
run 'network information' and it returns a record, to get the part you
want...
(network information)'s AppleTalk loaded
-- false
or ...
AppleTalk loaded of (network information)
-- false
>
So far, the #1 question I expected to find in the FAQ's but didn't - is how
>
to use the commands in various scripting additions.
I just suck it and see, running it in a Smile text window puts the result in
the same window.
>
Some are used as if they were part of the finder dictionary, others you need
>
to 'tell' and others seem to respond to something else again.
I know of only 2 type codes: 'osax' and 'APPL', only the latter needs to be
told and they are rare, osax commands inside an application tell block are
generally best avoided because of the potential for terminology conflicts
and also rare, the only ones that come to mind are involved with application
interfaces and seem logical.
>
How do you(I) know which technique to use, and how many different methods
>
are there for using/telling/calling these additions.
Check it's type or there should be a reference to application near the top
of it's dictionary if it's type 'APPL'
_____________________________ Andy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.