Jump to content

Keystrokes in Web Viewer go VERY Slowly

Recommended Posts

So... after a lot of trial and error, I finally have something working in the Web Viewer. The task I'm doing requires me to go to multiple web pages, tab through some fields, enter data in a field, and then press a button. Some other things happen, but that is the gist of it.

I have to tab 29 times to get to the correct field, and then I have to enter a 4 digit number (or something similar). Each of the tabs and each of the digits seems to take a bit more than a second to happen, which is agonizingly slow. I'm wondering if there is any known way to speed it up.

Here is the AppleScript that I've put into the Perform AppleScript command:

"--this script assumes that we're already ON the web page where we can add an item to our wanted list¶" & 

"set LegoRecordID to " & gracelego::ID & " as string¶" & 
"--this sets a local variable in AppleScript to SetID, unfortunately have to do quantity later, had trouble in AppleScript¶" & 

"tell application \"System Events\"¶" & 
"   repeat 28 times¶" & 
"      keystroke tab¶" & 
"      --this gets us to the right input field so we can input the ID¶" & 
"   end repeat¶" & 
"   repeat with n from 1 to length of MyRecordID¶" & 
"      keystroke character n of MyRecordID¶" & 
"      delay .01¶" & 
"      --doing it this way because it seems like it sometimes drops a number all at once, add delays if nec¶" & 
"   end repeat¶" & 
"end tell¶" & 


This definitely used to execute faster in older versions of FM, but in 17 (and 16 and 18?), it crawls. :(

Is there a better way to write this code?

Also, it seems like certain urls won't load into the Web Viewer unless I am already on the correct domain. I.e., when I'm loading a new page into the Web Viewer, if I am already on a page in the same domain, then the new one will load. If I'm not, then it won't. Obviously this is a different problem, but I'm mentioning it here in case it is somehow related.

Thanks in advance for any help!

Link to post
Share on other sites
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

That would be awesome, but I don't know of one. I think there is something from Monkey_Somebody softward, but it's not free and I'm not sure how it works. Still, sending tabs to AppleScript should be dead simple; not sure why it slows to a crawl. :(

Link to post
Share on other sites

No, we're not talking about the same thing.  MonkeyBreadSoftware (MBS) is a plugin and I'm sure it can also automate keystrokes to simulate a user typing in stuff.  What I am talking about is an API provided by the web site / service that you are sending the data to.  It would be strange if the recipient does not have an API to send the data to in either JSON or XML format.

FM is particularly good at this kind of integrations.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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

Important Information

By using this site, you agree to our Terms of Use.