Apologies if this is an obvious one.
I am automating a transaction in Sage Accounts. First step is to click on a menu item to bring up the relevant sub-menu. I identified the relevant element using the Findobject wizard and set it to click the element. It inserted the code:
Code: Select all
SetFocus>Sage 50 Accounts Essentials - Practice Company
UIClick>{"Sage 50 Accounts Essentials - Practice Company"},{"Products and services"}
If I do a similar thing differently, then it works:
Code: Select all
GetWindowHandle>Sage 50 Accounts Essentials - Practice Company,hWndParent
FindObject>hWndParent,AfxWnd120,,12,hWnd,X1,Y1,X2,Y2,result
Let>WIN_USEHANDLE=1
let>x={Int(%X1%-(%X1%-%X2%)/2)}
let>y={Int(%Y1%-(%Y1%-%Y2%)/2)}
MouseMove>x,y
LClick
PS, as it's a menu item, I can also use keyboard shortcuts i know, but I'm trying to understand what the problem is because i'll need to resolve it later in the macro.
Code: Select all
SetFocus>Sage 50 Accounts Essentials - Practice Company
CapsOff
Press ALT
Send>07
Release ALT