Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

need help with showing a counter

$
0
0

i am new to Autoit, but have been building a script to "open" a file "Save" the file "Close" it then move on to the next one.

 

i am using the Calculator at the moment to give me a running number but its not that great. any ideas of a nice display thing i can use to show the counter number on the loop.

 

also i get it to tun a stop watch so i can keep an eye on the time it has been running.

AutoIt         
  1. ; Script Function:
  2. ;   Auto open save and close the show count number in Calc
  3. ;
  4. Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
  5.  
  6. Run("C:\Program Files\FreeStopwatch\FreeStopwatch.exe")
  7. WinWaitActive("Free Stopwatch")
  8.  
  9. Send("{ENTER}")
  10.  
  11. Run("calc.exe")
  12.  
  13. WinWaitActive("Calculator")
  14.  
  15. Send("{ALTDOWN}")
  16. Send("{TAB}")
  17. Send("{TAB}")
  18. SEND("{ALTUP}")
  19.  
  20. WinWaitActive("Search Results")
  21. ; Set the counter
  22. Local $count = 0
  23.  
  24. ; Execute the loop "until" the counter is greater than 5
  25.  
  26.     ; Run the File
  27.     Send("{ENTER}")
  28.     ; Sleep(800)
  29.     WinWaitActive("Paint")
  30.    
  31.     Send("{CTRLDOWN}")
  32.     Send("{s}")
  33.     Send("{CTRLUP}")
  34.    
  35.     Sleep(1)
  36.  
  37.     Send("{ALTDOWN}")
  38.     SEND("{F4}")
  39.     Send("{ALTUP}")
  40.    
  41.     WinWaitActive("Search Results")
  42.    
  43.     Send("{ALTDOWN}")
  44.     Send("{TAB}")
  45.     SEND("{ALTUP}")
  46.    
  47.     WinWaitActive("Calculator")
  48.    
  49.     Send("{+}1=")
  50.    
  51.     Send("{ALTDOWN}")
  52.     Send("{TAB}")
  53.     SEND("{ALTUP}")
  54.    
  55.     WinWaitActive("Search Results")
  56.  
  57.     Send("{DOWN}")
  58.    
  59.     ; Increase the count by one
  60.     $count = $count + 1
  61.    
  62.  
  63. Until $count > 199
  64.  
  65. Send("{ALTDOWN}")
  66. Send("{TAB}")
  67. Send("{TAB}")
  68. SEND("{ALTUP}")
  69.  
  70. Send("{ENTER}")
  71.  
  72. ; MsgBox(0, "Ben's Auto Paint", "DONE 100 OF THEM!")
  73. MsgBox(0, "Ben's Auto Paint", "I Have Done: " & $count)
  74. ; Finished!

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>