Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help needed
#6
That code was more like an example. May not work on your PC because of possibly different conditions. Better create your code.

Let your macro, before doing its main work, check whether pencil button is pressed. How? Add code that finds pressed pencil button image on screen, and exits macro if not found. To capture the image and create code, use this dialog: QM floating toolbar -> Windows, controls -> Find image.

In the dialog: Select 'Bitmap macro', click Capture, select button image (drag to select), OK. Uncheck all checkboxes. Then capture the control with the Drag tool. OK.

The code should look like in my example. Here it again:
Code:
Copy      Help
int w=win
if(!w or !wintest(w "Paint" "MSPaintApp")) ret
if(!scan("macro:mspaint pencil pressed.bmp" child("" "NetUIHWND" w 0x1) 0 16 10)) ret


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)