• 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
Script Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script Objects


  • Subject: Script Objects
  • From: "Steve Suranie" <email@hidden>
  • Date: Wed, 16 Oct 2002 09:58:10 -0400
  • Thread-topic: Script Objects

Hi

I'm trying to run this script:

script checkServerStatus

property serverName : ""

to checkThisServer to thisServer

set serverName to thisServer

if not (disk thisServer exists) then

beep
display dialog "The " & thisServer & "needs to be mounted in order for this script to function."

end if

end checkThisServer

end script

tell checkServerStatus
set thisServer to "StorageServer"
tell checkServerStatus to checkThisServer to thisServer
end tell

but I keep getting the following error message:

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

Any help would be appreciated. I'm trying to check if certain servers are mounted before I continue with a script. Since on most of the scripts I write I have to check servers I thought I would just write a script object and pass along to it which server(s) I am checking. Am I not understanding the concept of the script object? Is there another way to do this? 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
end tell

Thanks

Steve
_______________________________________________
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: How to list local volumes ...
  • Next by Date: Re: How to list local volumes ...
  • Previous by thread: Re: How to list local volumes ...
  • Next by thread: Re: Script Objects
  • Index(es):
    • Date
    • Thread