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

AutoIt beginner few simple questions

$
0
0
As I stumbled upon one system I wanted to automatize AutoIt sounded perfect for doing so but now I stumbled upon several problems and along with that I have several questions so here it is.

This is code I wrote so far before I went into problems and had many questions.


Run ( "Masked for privacy" )

$i = 0
While $i <= 10
  $coord = PixelSearch(906, 579, 1067, 666, 0xA86A21)
  If Not @error Then
	MouseClick("primary", $coord[0], $coord[1], 1, 0)
  EndIf
$i = $i + 1
Sleep(3000)
WEnd

$i1 = 0
While $i1 <= 10
  $coord1 = PixelSearch(86, 658, 160, 706, 0xEE2E24)
  If Not @error Then
   $coord2 = (458, 311)
	MouseClick("primary", $coord2[0], $coord2[1], 2, 1)
  EndIf
$i1 = $i1 + 1
Sleep(3000)
WEnd



Now basically when 2nd screen appear and 2nd while loop is executed it doesn't detect given pixel nor it move&click mouse to selected place after it detect that pixel. After leaving script to run for some time it gives error "NO RIGHT BRACKET".

Next questions:
If first while loop here find pixel in first execution (or any before 10th run) does it stop running or does it still keep looping. If it keep looping how can I stop it if pixel is found.

Will 2nd while loop start executing if 1st one is not done. I mean if question before had answer that it doesn't stop looping it means 2nd script would start after 30 seconds.

Is it possible to read from window bigger part than only pixel? Something like part of picture an so on, if so could you point me to such format

How to read something from outside file (I would like to make configuration file) and save it in variable. Lets say I have .txt file with accountName:password and now I want to take only accountName out of it and save it in variable, same this with password.

Can I use variables declared in other loops, I mean in this my code I used coord1 in 2nd while loop, is coord from first loop accessible by 2nd loop?
__________________________________________________________________________________________________________

Parts of my questions are covered in tutorials and questions already asked, but I questioned them here in way I haven't been able to understand them from Internet found references.
Thanks for your time reading my topic and taking time answering my noobish questions.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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