• 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
My Bad, Idle Handler question fixed & asked again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My Bad, Idle Handler question fixed & asked again


  • Subject: My Bad, Idle Handler question fixed & asked again
  • From: "Brandon Carpenter" <email@hidden>
  • Date: Fri, 6 Dec 2002 08:20:09 -0600

I corrected the script (thanks to Ted Wood) and will ask the question
again. The idle handler again only runs once then the script stops.
The purpose of the script is to determine if a CD in the drive,
continually, and will then determine if it is a multi session cd.

property DiskStatus : false

on run
idle of me
end run

on idle
set idleTime to 60
CheckDiskStatus()
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

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: Check if it is a number
  • Next by Date: Script the UNSCRIPTABLE
  • Previous by thread: Re: Coercing a long point
  • Next by thread: Re: My Bad, Idle Handler question fixed & asked again
  • Index(es):
    • Date
    • Thread