Closing Window or remote desktop

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
gregpet
Newbie
Posts: 13
Joined: Wed May 22, 2013 8:11 pm

Closing Window or remote desktop

Post by gregpet » Fri May 24, 2013 9:21 pm

I can have 2 companies open in QuickBooks Enterprise. We use a terminal server because many of us work remotely. I am using image recognition to find desktop shortcuts to start each company file. The macro works fine when stepping thru it, but when using normal speed I can't seem to get the first QB window to minimize to get to the desktop to start the second one.

I am having trouble in the area that is bolded. I wait for the QB screen to come up to the HOME screen. then click it to make sure nothing has changed the focus. I have played around with different wait times in different areas, making sure window is active etc. Works fine if I step through it.

// Start QB - HTE
//Find and Double Left Click Center of
FindImagePos>%BMP_DIR%\image_12.bmp,WINDOW:192.168.196.40 - Remote Desktop Connection,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LDblClick
Endif
// wait for HTE login screen
//Wait for
WaitScreenImage>%BMP_DIR%\image_14.bmp,0.7,CCOEFF
gosub password
wait>1

SetFocus>192.168.196.40 - Remote Desktop Connection

//Wait for
WaitScreenImage>%BMP_DIR%\image_18.bmp,0.7,CCOEFF
wait>10
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\image_18.bmp,WINDOW:192.168.196.40 - Remote Desktop Connection,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif

Press ALT
wait>2
Send> n
release ALT

wait>2

//Start QB - -GBT
//Find and Double Left Click Center of
FindImagePos>%BMP_DIR%\image_17.bmp,WINDOW:192.168.196.40 - Remote Desktop Connection,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LDblClick
Endif

//Wait for
WaitScreenImage>%BMP_DIR%\GBT Login.bmp,0.7,CCOEFF
wait>2
gosub password

end

This is my first attempt at using image recognition. Works great, but I am missing something.

thanks for your help.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sun May 26, 2013 10:22 pm

Instead of:

Code: Select all

Press ALT
wait>2
Send> n
release ALT
wait>2
try:

Code: Select all

Let>SK_Delay=3
CapsOff
Press ALT
Send> n
release ALT

gregpet
Newbie
Posts: 13
Joined: Wed May 22, 2013 8:11 pm

Post by gregpet » Thu May 30, 2013 8:47 pm

worked great - Thanks

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Thu May 30, 2013 11:08 pm

Thanks for your great news.

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