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

Idle handler question


  • Subject: Idle handler question
  • From: "Brandon Carpenter" <email@hidden>
  • Date: Thu, 5 Dec 2002 17:28:10 -0600

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.

  • Prev by Date: Re: Run and AppleScript from within and AppleScript
  • Next by Date: RE: another Quark scripting question
  • Previous by thread: Re: Cloning Users
  • Next by thread: Re: Idle handler question
  • Index(es):
    • Date
    • Thread