Hey,
I've been trying to convert this launchbar script into an Alfred Workflow. The script is meant to take the current selection of Alfred, and activate the window behind, open the "Go To Folder" dialogue, paste in the path and press enter.
I got it working in the AppleScript Editor, but for some reason I can't get it to perform on through Alfred. It even opens up the "Go To Folder" dialogue but stops there each time. Do you guys have any ideas?
on alfred_script(q)
set filePath to POSIX file of q
tell application "System Events"
set theApplication to application processes whose frontmost is true
set target to item 1 of theApplication
set target to a reference to front window of target
set target to a reference to front sheet of target
delay 0.5
tell target to keystroke "g" using {command down, shift down} -- Activate goto field
tell target
try
set value of text field 1 to filePath
delay 0.5
key code 36 -- simulate pressing the Enter key
end try
end tell
end tell
end alfred_script