Unable to recognize TAB

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
Posts: 4
Joined: Thu Jan 23, 2020 8:55 pm

Unable to recognize TAB

Post by claremc » Fri Jan 24, 2020 4:50 pm

I am automating the way files are saved in a specific folder at the moment, however, when I go to tab through the file explorer pop-up my TAB function no longer works.

Here is the code I am referring to:

//find file on PDF editor (there is no shortcut for this on the specific program I am working with)
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\image_18.bmp,WINDOW:Doc.It PDF Editor 4.5,0.7,1,XArr,YArr,NumFound,CCOEFF

//tab to save as and select it, this portion works
Press TAB * 2
Press Enter

//Tab to get to the folders portion of my screen, this works when I manually do it but the code does not.
Press TAB * 10

//select desired folder
Press Down

//enter into that folder before saving
Press Enter

//tab to return to file name portion in order to rename file (unclear if this is working or not as I am unable to
get to this point.
Press TAB * 2

Any ideas as to why this isn't working would be greatly appreciated! :)

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1113
Joined: Sun Nov 03, 2002 3:19 am

Re: Unable to recognize TAB

Post by Dorian (MJT support) » Sun Jan 26, 2020 2:46 pm

There could be a number of reasons for this. The first place to start is maybe making sure you're not losing focus by using Setfocus, and/or adjust the timing.

I see you have a few Waits already, but maybe it's also worth using a sendkey delay. It could be that pressing Tab 10 times that quickly is too fast for your application.

Sk_delay is set in milliseconds. Therefore putting this anywhere before your functions that send keystrokes will add a 0.1 second delay between keystrokes :

Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts