Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run macro for certain number of time
#1
How do I get my macro to run say 100 times I am taking a cell in excel and then copying it to another application and doing a few clicks and then returning to excel to grab the next cell but it keeps going how do I get it to end.



run "C:\Documents and Settings\m018f49\My Documents\test1.xls"
int w1=win("Microsoft Excel - test1.xls" "XLMAIN")
docopy
lef 76 218 w1
'C{}
rig 75 220 w1
lef 36 32 win("Cell" "MsoCommandBarPopup")
int w2=win("TrustDesk 8.6.1" "TTDMAIN")
lef 126 244 w2
lef 123 244 w2
'Cv
lef 343 119 w2
int w3=wait(5 WV win("" "#32768"))
2
lef 23 28 w3
lef
4
int w4=act(win("TrustDesk 8.6.1" "TTDMAIN"))
lef 117 308 w4
lef 117 308 w4
lef 117 309 w4
3
int w5=act(win("TrustDesk 8.6.1" "TTDMAIN"))
lef+ 355 306 w5
lef- 355 305 w5
3
lef 963 171 w5
3
lef 1013 87 w5
2
int w6=win("Microsoft Excel - test1.xls" "XLMAIN")
lef+ 72 219 w6
lef- 73 219 w6
'D
goto docopy
#2
rep is the command to do that sort of thing.
good documentation in the help file for it.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)