Jump to content

auto keystrokes after url is opened ?


Recommended Posts

Posted

I regularly check a website truecall.co.uk and I can open it using an Alfred hotkey.  The site is set up knowing my login details, so all I have to do is click on"enter" or press <return> to log in. But then I have to click on a menu selection (or press <tab> 7 times followed by <return> to get the page I want.

 

Is there a way to do this entirely within a workflow?

 

(I'm OK with computers, but new to Alfred. Some knowledge of elementary AppleScript)

 

Thanks

Posted

If you don't want to use AppleScript to simulate events, you can add "Dispatch Key Combo" objects which will post key events. These could be wired after an Open URL action. You can chain inline Delay utility objects to wait for moments in between.

 

As Dean says, this may prove unreliable as you don't know what the underlying browser has done or if the key event worked.

Posted

Thanks for the responses.  I tried Andrew's suggestion - "Despatch Key Combo"

a) with no Delay items. This failed to operate correctly

B) with 2 seconds Delay after every keystroke. This worked, but was slow (9 keystroke items)

c) with 0 seconds delay after each of the 7 Tab keystrokes.  This worked very well.

 

I understand that the procedure may be erratic (presumably from 'lost' keystrokes, but such a failure is 'soft' and easily recoverable manually.

 

Thank you again - I have what I wanted, and am wiser than I was.

 

David

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...