home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 August / CHIP_CD_2004-08.iso / macos / pack1 / files / keycue1.0.dmg / KeyCue.app / Contents / Resources / GetShortcuts.applescript < prev    next >
Encoding:
Text File  |  2004-05-21  |  548 b   |  23 lines

  1. set frontProcess to ""
  2. tell application "System Events"
  3.     if UI elements enabled then
  4.         set frontProcess to item 1 in (every process where frontmost = true)
  5.         get every menu item of every menu of menu bar 1 of frontProcess
  6.     else
  7.         return {"", "UI Scripting off"}
  8.     end if
  9. end tell
  10. if frontProcess ¡ "" then
  11.     try
  12.         with timeout of 5 seconds
  13.             tell application (name of frontProcess)
  14.                 return ╟event [KQ]Cuts╚ -- KeyCue shortcuts
  15.             end tell
  16.         end timeout
  17.     on error
  18.         return {"", "no response"}
  19.     end try
  20. else
  21.     return {"", "no front process"}
  22. end if
  23.