Jump to content

Applescript Translation Troubles


Recommended Posts

I've got a couple things I'm trying to accomplish, and Applescript is the only way I've found out how to do it. Unfortunately, it apparently doesn't translate into the languages Alfred uses, so I need an interpreter.  :unsure:

 

This is what I want it to do with a hotkey:

 

on run {input, parameters}

 

    tell application "System Events"


        keystroke "SAMPLE_TEXT"


        keystroke tab


        keystroke "SAMPLE_TEXT"


        keystroke return


    end tell   


    return input


end run

 

Any and all help would be greatly appreciated!

Link to comment

I've got a couple things I'm trying to accomplish, and Applescript is the only way I've found out how to do it. Unfortunately, it apparently doesn't translate into the languages Alfred uses, so I need an interpreter.  :unsure:

 

This is what I want it to do with a hotkey:

 

 

Any and all help would be greatly appreciated!

Did you try a 'Actions > Run NSAppleScript' object, or a 'Actions > Run Script' with the language set to 'osascript'? For the NSAppleScript, I think you need to wrap your code in 'on alfred_script q … end alfred_script' instead of 'on run … end run'

Link to comment

Did you try a 'Actions > Run NSAppleScript' object, or a 'Actions > Run Script' with the language set to 'osascript'? For the NSAppleScript, I think you need to wrap your code in 'on alfred_script q … end alfred_script' instead of 'on run … end run'

 

BEAUTIFUL!!  :D  Thanks!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...