• 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: Idle handler question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idle handler question


  • Subject: Re: Idle handler question
  • From: email@hidden
  • Date: Fri, 06 Dec 2002 3:11:19 GMT

[demime could not interpret encoding binary - treating as plain text]
Heres what I use:

on idle
tell application "Finder"
if disk "CogentR" exists then --do nothing
else
mount volume B
"afp://207.127.235.86/CogentR/" as user
name "CogentR" with password "password"
end if
end tell
return 540 -- number of seconds before "on idle" is called
again
end idle

My server times out at 10 minutes so finder accesses the server every 9

On Thu, 5 Dec 2002 17:28:10 -0600 "Brandon Carpenter" wrote:

> Could anyone tell me what I am doing wrong with this idle script?
> The
> script just runs once never continues with the idle.
> This is a watered down version of the original script I am working
> on.
>
> property DiskStatus : false
> on run
> CheckDiskStatus()
> end run
>
> on idle
> set idleTime to 60
> try
> if DiskStatus is true then
> display dialog "there is a disk"
> else if DiskStatus is false then
> display dialog "No Disk Found"
> end if
> on error errMsg number errNum from errFrom partial result
> errResult
> to errTo
> display dialog errMsg as text
> end try
> return idleTime
> end idle
>
> on CheckDiskStatus()
> tell application "Finder"
> -- Check for Disks
> if (exists (some disk whose (ejectable is true))) then
> set DiskStatus to true
> else
> --Check later for Disks
> set idleTime to idleTime + 60
> return idle of me
> end if
> end tell
> end CheckDiskStatus
> Brandon Carpenter
> 806-352-6370 X 107
>
> I find it ironic that I am surrounded by all these wonderful
> gadgets that were supposed to make my life easier.
> What life?
> _______________________________________________
> 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.
_______________________________________________
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: Re: Strange text item delimiter effect
  • Next by Date: Mount Firewire Drive with AS?
  • Previous by thread: Idle handler question
  • Next by thread: Re: System Folder Path - Mac OS 9
  • Index(es):
    • Date
    • Thread