Automator won't continue to next step...

I have a lengthy watched folder workflow which works a treat, but I am trying to let the user know to not touch his Mac when the workflow runs.

I wanted to do this by dimming his display to almost, but not quite, black with the http://www.charcoaldesign.co.uk/shades Shades pref pane and hotkeys (Alt - [minus]) with System Events.

The AppleScript runs fine on its own, and also runs properly as the first step in the workflow.
However, Automator does not proceed onto the next step, which is to rename and open the dropped files, etc. etc.

I even saved the Shades AppleScript as an application and tried to have it as the first step of the workflow, but still Automator won’t proceed past it.

Any suggestions?

Any ideas folks?

Can anyone offer a suggestion?

Seriously, I’m open to any suggestions.

Nobody able to help?

Here’s the script that runs.

tell application “Shades”
activate
repeat with x from 1 to 5
tell application “System Events” to key code 27 using control down --key code for ‘-’
end repeat
end tell

As was pointed out in another forum the repeat scripting, although it worked, was not right. So I now have:

tell application “Shades”
activate
repeat 7 times
tell application “System Events” to key code 27 using control down --key code for ‘-’
end repeat
end tell

(and at the end of the workflow)

tell application “Shades”
activate
tell application “System Events” to key code 53 using option down --key code for ‘esc’
end tell

I will be trying this out in my workflow later.

Oh, BTW, I use ‘Shades’ as it works with non-Mac monitors.
With Apple displays, I would use the ‘com.app.preferences.displays’ and set the slider value.

It seems that almost anything besides an Automator ‘Files & Folders’ action or a ‘Pause’ seems to interrupt the folder action.