System Events Display Dialog

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

System Events Display Dialog Wed Mar 12, 2014 2:07 pm • by mpa15
Hi,

I have a script that opens a user dialog asking you to tag files from a few options:

Code: Select all
tell application "System Events"
   set theName to name of theFile
   choose from list {"PBL", "DPAS", "INDE", "FMPR", "CV", "Admin", "iPad", "Other"} with prompt "Please tag: " & theName default items "test1"
   set theTag to the result
   if theTag = {"Other"} then
      display dialog "Enter new tag: " default answer ""
      set theTag to text returned of result
   end if
   
   return {hazelExportTokens:{test:theTag}}
end tell


Lately, I've noticed that it gets stuck - I drop a file in the folder and nothing happens. What fixes it usually is manually going into AppleScript and running a display dialog:

Code: Select all
tell application "System Events"
display dialog "test"
end tell


At this point, all of the previous dialogs that were called spring forward.

Any idea as to how to fix this? I suspect there's probably an easy fix?

Thanks!

M
mpa15
 
Posts: 13
Joined: Wed May 11, 2011 1:24 am

Re: System Events Display Dialog Thu Mar 13, 2014 2:15 pm • by Mr_Noodle
I suggest checking the logs to see if there are any errors there. Also, is it possible the dialog was hidden behind other windows?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support