Jump to content

Recommended Posts

Posted

Hi,

I've been searching around after a sulotion to this problem but can seem to find any help. 

I want to be able to exit the script at any point, right now I can exit the script in the first part, But after line 58, the exit hotkey doesn't work any more. Then I have to wait for the script to loop one time before I can exit the script.

 

Another problem I can't seem to find a sulotion to, is why the console won't reset with the command on line 154.

 

Sorry for my bad English, any help is appreciated!

HotKeySet("{F4}", "Start")
HotKeySet("{ESC}","EndProgram")




While 1
   Sleep(100)
WEnd





Func Start()
   Global $count = 0
   Local $r = Random(100, 200,1)
   While 1

   Global $t = 0
   Do


      MouseDown("left")
      sleep($r)
      Send("{w down}")
      MouseMove(1280, 720)
      MouseMove(1280, 722)
      Sleep($r)
      MouseMove(1280, 717)
      sleep(1000)


      ConsoleWrite($t)

      sleep(100)
      $t = $t +1
   Until $t == 5

   MouseUp("left")
   sleep(100)
      Send("{w up}")
   sleep(500)
   Send("{9}")
   Sleep($r)
   MouseClick("right")
   sleep(500)
   MouseClick("right",1281, 628)
   Sleep(1000)
   Send("{LSHIFT down}")
   sleep($r)

   MouseClick("left",1065, 830)   #cs <-- After this line, I'm not able to exit the script #ce
   sleep($r)
   MouseClick("left",1120, 828)
   sleep($r)
   MouseClick("left",1176, 828)
   sleep($r)
   MouseClick("left",1231, 829)
   sleep($r)
   MouseClick("left",1284, 828)
   sleep($r)
   MouseClick("left",1389, 572)
   sleep($r)

   MouseClick("left",1336, 1006)
   sleep($r)
   MouseClick("left",1338, 834)
   sleep($r)
   MouseClick("left",1388, 828)
   sleep($r)
   MouseClick("left",1444, 831)
   sleep($r)
   MouseClick("left",1500, 828)
   sleep($r)
   MouseClick("left",1389, 572)
   sleep($r)

   MouseClick("left",1499, 883)
   sleep($r)
   MouseClick("left",1446, 880)
   sleep($r)
   MouseClick("left",1393, 884)
   sleep($r)
   MouseClick("left",1335, 882)
   sleep($r)
   MouseClick("left",1282, 884)
   sleep($r)
   MouseClick("left",1389, 572)
   sleep($r)

   MouseClick("left",1227, 883)
   sleep($r)
   MouseClick("left",1176, 884)
   sleep($r)
   MouseClick("left",1121, 880)
   sleep($r)
   MouseClick("left",1070, 883)
   sleep($r)
   MouseClick("left",1069, 937)
   sleep($r)
   MouseClick("left",1389, 572)
   sleep($r)

   MouseClick("left",1117, 933)
   sleep($r)
   MouseClick("left",1173, 933)
   sleep($r)
   MouseClick("left",1228, 936)
   sleep($r)
   MouseClick("left",1279, 932)
   sleep($r)
   MouseClick("left",1337, 934)
   sleep($r)
   MouseClick("left",1389, 572)
   sleep($r)

   MouseClick("left",1390, 932)
   sleep($r)
   MouseClick("left",1444, 935)
   sleep($r)
   MouseClick("left",1497, 935)
   sleep($r)
   MouseClick("left",1123, 1002)
   sleep($r)
   MouseClick("left",1174, 1000)
   sleep($r)
   MouseClick("left",1389, 572)
   sleep(1000)


   Send("{LSHIFT up}")
   Sleep($r)
   MouseClick("left",1284, 734)
   sleep($r)
   MouseClick("left",1442, 571)
   sleep($r)
   Send("{LSHIFT down}")
   Sleep($r)
   MouseClick("left",1066, 747)
   Sleep($r)
   Send("{LSHIFT up}")
   Sleep($r)
   Send("{e}")
   Sleep($r)
   Send("{1}")
   $count = $count + 1
   ConsoleWrite($count)
   ControlSetText('', '', 'Scintilla2', '')   #cs  <--This command should clear the console but it doesn't right now #ce
   sleep(1000)








WEnd

EndFunc


Func EndProgram()
   Exit
   EndProgram
EndFunc

 

  • Developers
Posted

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...