Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mouse position recorded instead of command
#1
Hi everyone,

I'm very happy I've found QM and will certainly buy the software.

But I'm having trouble creating a macro for a situation where the background window can be different everytime I use the macro.

My situation: I'm using the program CopyQ, but unfortunately it doesn't remember/save that the icon should stick on my taskbar right below.

So I want to use Quick Macros to do this daily.

But the problem is the screen of the available icons changes sometimes. QM seems to record the mouse positions, but the position/location of the CopyQ can be different.

https://i.postimg.cc/N0K3jHvY/Screenshot-1.jpg

How can I create macro that records the goal, so the CopyQ icon, instead of a mouse position?

Thank you for reading!
Yolanda
#2
Use dialog "Find accessible object".
Drag and drop the Drag image. Drop on the switch button. Click Test. Click OK. It should add 2 lines of code. Then add code to click the button.
Full code:
Code:
Copy      Help
int w=win("Settings" "ApplicationFrameWindow")
Acc a.Find(w "PUSHBUTTON" "copyq.exe" "class=Windows.UI.Core.CoreWindow" 0x1005)
if a.State&STATE_SYSTEM_CHECKED=0
,a.Mouse(1) ;;click

Change some strings if need, for example "Settings" maybe depends on language.


Forum Jump:


Users browsing this thread: 1 Guest(s)