• 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: Option Key Down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Option Key Down


  • Subject: Re: Option Key Down
  • From: Fuller Luther <email@hidden>
  • Date: Thu, 18 Dec 2008 09:44:58 -0600

I modified Robert Poland's script:

on optionKeyDown()
try
tell application "System Events"
if not ((some process whose name contains "KeyboardViewerServer") exists) then
tell application "KeyboardViewerServer" to activate
end if
end tell
on error
try
tell application "KeyboardViewerServer" to activate
on error
return false
end try
end try
tell application "System Events"
return (get value of checkbox "⌥" of window 1 of application process "KeyboardViewerServer") as boolean
end tell
end optionKeyDown

For users who don't want or know about the alternate 'option key down' behavior, this works. The problem with this handler is that I CAN get it to work properly, so I know what's involved in rewriting the documentation so that my user will know how to get the alternate behavior, and it's not something I want any user to have to read. It's just confusing.

Standard behavior is to begin processing files with a limit of about 5 min. Alternate behavior is to allow file processing for about an hour, if the user has the files and the time. The problem with the handler, above, is that if it does not work (detect option key), the user can't know it until 5 min later, but expecting the process to run for an hour the user may no longer be in front of his computer. Not good!

I am now looking into having the user open a folder associated with my application and testing for existence of its window. Too bad the option key isn't available, it would so nice and simple!

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Option Key Down (From: Fuller Luther <email@hidden>)
 >Re: Option Key Down (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Calling shell script, returning results.
  • Next by Date: Re: ersatz list-mom moment (was Re: Tell Blocks Considered Harmful)
  • Previous by thread: Re: Option Key Down
  • Next by thread: Re: Option Key Down
  • Index(es):
    • Date
    • Thread