Hello all, this is my first time here and thanks for any advice.
I have written some workflow scripts with Automator and they keyboard shortcuts all work except when I start or restart the machine. Then I must drop the services menu down and hover over the scripts with the mouse. I can then close the menu without executing the scripts and the keystrokes will then execute the script. Below is the code which hides/unhides all desktop icons but leaves any mounted disk icons visable.
on run
set spacechar to ASCII character 32
do shell script “ls -Ol ~/Desktop/” – Read chflags in ls
if result contains “staff” & spacechar & spacechar & “hidden” then
do shell script “chflags nohidden ~/Desktop/"
else
do shell script "chflags hidden ~/Desktop/”
end if
end run

I have some screenshots but cannot find where to upload them.
Model: iMac (27-inch, Mid 2011)
Browser: Safari 601.2.7
Operating System: Mac OS X (10.10)
Thanks for responding, so is the problem with Automator or with the code and if I paste this code into FastScripts and use that workflow will it be reliable in the services menu?
Model: iMac (27-inch, Mid 2011)
Browser: Safari 601.2.7
Operating System: Mac OS X (10.10)
Please only quote a relevant bit of someone else’s post that informs your own text. (Their full post is already on the forum for all to see.)
The problem is Apple’s poor support for keyboard shortcuts “ from their own software no less.
You don’t paste code into FastScripts “ FastScripts is an AppleScript/Shell-Script menu on steroids that supports app-specific and global keyboard shortcuts.
You create an AppleScript or shell script, put it in an app-specific or global folder, give it a keyboard shortcut in FastScripts’ preferences, and go-to-town.