Jump to content
dougaitken

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

Share this post


Link to post

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.

Share this post


Link to post

Alternatively you can use Fake, http://fakeapp.com/ , by the developer of Fluid, which lets you use Applescript to control browser interactions.  I use this in a lot of workflows to semi-automate interactions with Blackboard courseware.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...