Jump to content

Data_Unavailable

Members
  • Posts

    5
  • Joined

  • Last visited

Data_Unavailable's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Ah thanks this helps a lot, I was thinking that local just meant that the variable was high priority or something 🤔.
  2. Currently I'm a student and my homework system is google classrooms, I have a few dozen pieces of homework outstanding from last year from when i had covid, and i could manually go into and mark them as submitted, and i thought i could make this code do that easily as an auto clicker, but i tripped out yesterday trying to make the loop, when I start a project I normally like to finish it. Basically the script moves the mouse from starting the program and clicks the google tab on taskbar, then goes into the homework, and then clicks the go back button in top left corner and loops to start of program after where it enters google.
  3. Doesnt work, dont understand why, spent more than 5 hours trying to get this working, i need help. Decided to not use a For loop as that didnt work either, ive narrowed the problem down to the input, the $sAmount variable just doesnt work, but any other variable does work at the bottom when needs to be equal to $count. #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Func Inputter() Local $sAmount = (InputBox("Test box", "How many times shall I run?", "0", "", -1, -1, 0, 0)) $sAmount=Number($sAmount) EndFunc Func Opera() MouseMove(722,407) MouseClick($MOUSE_CLICK_LEFT) Sleep(100) MouseMove(704,403) MouseClick($MOUSE_CLICK_LEFT) Sleep(100) MouseMove(1181,281) MouseClick($MOUSE_CLICK_LEFT) MouseMove(838,525) MouseClick($MOUSE_CLICK_LEFT) Sleep(1000) MouseMove(22,52) MouseClick($MOUSE_CLICK_LEFT) EndFunc ;Local $count=0 Call(Inputter()) ;Local $Timeout = 10 ;MsgBox($MB_SYSTEMMODAL,"ETC","This will timeout in 10 seconds.",10) MouseMove(571,836) MouseClick($MOUSE_CLICK_LEFT) ;For $i = 1 To $Amount Step 1 ; Call(Opera()) ;Next Do Call(Opera()) $count = $count+1 Until $count>$sAmount
  4. #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> Func Inputter() $Amount = Number(InputBox("Test box", "How many times shall I run?", "0", "", -1, -1, 0, 0)) EndFunc Func Opera() MouseMove(722,407) MouseClick($MOUSE_CLICK_LEFT) Sleep(100) MouseMove(704,403) MouseClick($MOUSE_CLICK_LEFT) Sleep(100) MouseMove(1181,281) MouseClick($MOUSE_CLICK_LEFT) MouseMove(838,525) MouseClick($MOUSE_CLICK_LEFT) Sleep(1000) MouseMove(22,52) MouseClick($MOUSE_CLICK_LEFT) EndFunc Call(Inputter()) ;Local $Timeout = 10 ;MsgBox($MB_SYSTEMMODAL,"ETC","This will timeout in 10 seconds.",10) MouseMove(571,836) MouseClick($MOUSE_CLICK_LEFT) For $Amount = 1 To $Amount Step 1 Call(Opera()) Next Kind've fixed it, works now but doesn't repeat with this but repeats under other conditions, still working on it.
  5. Normally use python but need autoit for a specific project, I'm trying to run a for loop which is controlled by a variable which is taken from an inputbox, something like this in python but in autoit, python text below, can't find online or figure out how to do this without using a while loop: amount = int(input("How many times would you like this to run? ")) for i in range(amount):
×
×
  • Create New...