Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recorded macros not working
#1
I'm trying to write an app to clean the heads on my Epson printer. I used the record macro button, but I get errors saying the point is not in the window. Please help. I did a menu Edit -> Other Formats -> Copy for QM Forum, but it didn't seem to work, sorry.

Macro Macro66
Code:
Copy      Help
;---- Recorded 2/20/2014 4:56:01 PM ----
int w1=act(win("Devices and Printers" "CabinetWClass"))
rig 161 387 w1 1 ;;list 'Items View', list item 'EPSON Artisan 50 Series'
lef 13 102 wait(5 WV win("" "#32768")) 1 ;;menu item 'Printing preferences'
;men 31006 child("ShellView" "SHELLDLL_DefView" w1) ;;Printing preferences
int w2=wait(5 win("EPSON Artisan 50 Series Printing Preferences" "#32770"))
lef 352 15 w2 1 ;;page tab list, page tab 'Maintenance'
lef 86 184 w2 1 ;;push button 'Head Cleaning'
int w3=wait(12 win("Head Cleaning" "#32770"))
lef 370 305 w3 1 ;;push button 'Start'
int w4=wait(208 win("Head Cleaning" "#32770"))
lef 370 305 w4 1 ;;push button 'Finish'
act w2
lef 448 11 w2 ;;push button 'Close'
act w1
lef 1900 21 w1 ;;push button 'Close'
;---------------------------------------

;BEGIN PROJECT
;main_function  Macro66
;exe_file  C:\pHead1.exe
;icon  <default>
;manifest  $qm$\default.exe.manifest
;flags  6
;guid  {7CD38BE7-E3CE-4A9A-B33F-A90339A140FE}
;END PROJECT


Attached Files Image(s)
   
#2
Can anyone help?
#3
QM shows where is the error. Change mouse coordinates in that line. Or insert wait 5 before that line.
Also will need to insert code to wait for button Finish. Use dialog 'Window/control actions'.
#4
I usually don't use recording macros, but it is usually not waiting on a window to open before trying to manipulate it when I am stepping through and finding a problem. Maybe the code below may help. Not sure where the program is failing by your post.

Macro Macro7
Code:
Copy      Help
int w=wait(0 WA win("Devices and Printers" "CabinetWClass"))
act w


Forum Jump:


Users browsing this thread: 1 Guest(s)