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.
Closing Window or remote desktop
Moderators: Dorian (MJT support), JRL
Instead of:
try:
Code: Select all
Press ALT
wait>2
Send> n
release ALT
wait>2
Code: Select all
Let>SK_Delay=3
CapsOff
Press ALT
Send> n
release ALT