• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Objects


  • Subject: Re: Script Objects
  • From: Emmanuel <email@hidden>
  • Date: Wed, 16 Oct 2002 19:29:16 +0200

At 9:58 AM -0400 16/10/02, Steve Suranie wrote:

if not (disk thisServer exists) then

<<checkServerStatus>> doesn't understand the disk message

"disk" belongs to the Finder:

tell application "Finder" to disk thisServer exists
if result then ...

Alternately, without using the Finder (thus, faster) you can test for "alias thisServer":

try
alias thisServer
-- handle existence
on error
-- handle absence
end

Any help would be appreciated.

Aaaah.

Also, how would I call the script object from another script - do you use the path to the script something like this:
tell desktop folder:AppleScripts:scriptObjects:checkServerStatus
set thisServer to "StorageServer"
tell checkServerStatus to checkThisServer to thisServer

Requires a little tweaking, but you are very close. A correct reference for "tell" is "application "BlaBla"", where "BlaBla" may be the full path of the application, or its name.

Emmanuel
_______________________________________________
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.

  • Prev by Date: Scripting Internet Connect VPN
  • Next by Date: Re: Script Objects
  • Previous by thread: Script Objects
  • Next by thread: Re: Script Objects
  • Index(es):
    • Date
    • Thread