Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If image
#1
Hi,

I'd like create a macro for QuickBooks, where if the 'x' image is there, click on it, wipe out the text in the find field ( which I can't access via controls, as it is not accessible) and if the 'x' image is not there, the find and click on the 'search' image... and then click on the text right next to it and paste search term that is in the clipboard.

How would I go about doing that?

I have used the 'wizard' to click on the 'search' image.. but can't figure out how to do if/then with the images...

Thanks,

Alberto


int w1=win("Intuit QuickBooks" "MauiFrame")
scan "Toolbar item4.bmp" child("" "QuickBooksSubForm" w1 0x0 "" 3) 0 1|2|16
int w=win("Quickbooks" "MauiFrame")
act child("" "QuickBooksSubForm" w 0x0 "" 3)
lef
#2
In 'Find Image' dialog uncheck 'Error if not found', and it will create 'if' code.
Code:
Copy      Help
int w=win("Quick Macros Forum • Post a reply - Mozilla Firefox" "Mozilla*WindowClass" "" 0x4)
if(scan("Macro1989.bmp" w 0 1|16))
,out "found"
else
,out "not found"

Or don't uncheck it, but use err.
Code:
Copy      Help
int w=win("Quick Macros Forum • Post a reply - Mozilla Firefox" "Mozilla*WindowClass" "" 0x4)
scan "Macro1989.bmp" w 0 1|2|16
err
,out "not found"


Forum Jump:


Users browsing this thread: 2 Guest(s)