Jump to content

Focus in a browser text field


Recommended Posts

I'm looking to have a workflow where I can set a keyword and on triggering it, it opens a site and focuses on a certain textfield then pastes the contents of my clipboard into that text field then optionally press the button beside the text field.


I cannot for the life of me find out how to focus on the text field. I'm using AppleScript

 

I've tried this but it's probably missing things since it throws errors.

set focused of text field to true

 

Any help would be amazing.

 

Thanks

Link to comment

Welcome @dougaitken,

 

2 hours ago, dougaitken said:

I cannot for the life of me find out how to focus on the text field. I'm using AppleScript

 

AppleScript has no concept of what’s inside the webpage. What you need is to use AppleScript → to tell the browser → to tell the frontmost tab → to execute JavaScript → to focus the field.

 

If you want more specific help, you’ll need to give us those details.

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