Unable to recognize TAB

Anything Really. Just keep it clean!

Moderators: Dorian (MJT support), JRL

Post Reply
claremc
Newbie
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
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif

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

//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
Wait>0.2

//select desired folder
Press Down
Wait>0.2

//enter into that folder before saving
Press Enter
Wait>0.2

//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
Wait>0.2

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

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

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 :

let>sk_delay=100
Yes, we have a Custom Scripting Service. Message me or go here

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