Jump to content

Exact Loop and Array Variable Structure Required


Recommended Posts

#RequireAdmin

Global $x=0
Global $y=0

Func Start()

While 1
AutoItSetOption('MouseCoordMode',0)
AutoItSetOption('SendKeyDelay',10)
WinActivate('XXX')
MouseClick('Primary',852,62,1,10)
sleep(2200)
MouseClick('Primary',880,196,1,10)
Send('260',0)      -----------------------> $a as 260
MouseClick('Primary',880,196,1,0)
sleep(2200)
MouseClick('Primary',1019,194,1,10)
Sleep(2200)
Send('98',0) ------------------------->$b as 98
sleep(1000)
Wend

EndFunc

 

 

I want to use Different number in every loop in the place of $a and  $b.

Is it possble?If it possible Kindly help me

Link to post
Share on other sites
  • Developers

@KING_NK

I feels like you are really pushing your luck in the last couple of threads you created.
I have closed the initial threads and pointed you to our Forum rules. DId you actually read and, more importantly, completely understand them?

Jos

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.
  :)

Link to post
Share on other sites

Ok,I will not post my question here any more.You give no solution to my question and telling me i have no luck.Keep it with you buddy.Forum means helping ,not showing attitude and about the rules,I dont break any rules.I am just seeking for answer.

Thanks

Link to post
Share on other sites
  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By mmoalem
      Hi all - I have created a simple script that turn on cctv software (contacam)  when my phone does not ping back (when I'm out of range of home network)
      #include <MsgBoxConstants.au3> $iPing = 0 For $i = 5 To 1 Step -1 ; this 5 loops cycle is just for testing - please ignnore - when complete it will be an endless loop Example() Sleep(120000) Next Func Example() ; Ping the phone. $iPing = Ping("192.168.1.102") If $iPing Then ; If a value greater than 0 was returned then turn off camera. _endCCTV() Else _startCCTV() ; If a value of 0 was returned then turn on camera. EndIf EndFunc ;==>Example Func _startCCTV() ShellExecute("C:\contacam capture\FJ Camera\CAMERA.bat", "on") Sleep(10000) ShellExecute("C:\contacam capture\FJ Camera\CAMERA_REC_SENSITIVITY.bat", "50") EndFunc Func _endCCTV() ShellExecute("C:\contacam capture\FJ Camera\CAMERA_REC_SENSITIVITY.bat", "0") Sleep(10000) ShellExecute("C:\contacam capture\FJ Camera\CAMERA.bat", "off") EndFunc  
       
      the problem I have is that in this format the script run the bat file that turn on the camera (or off) everytime the ping runs but obviously once the ping returns 0 and the camera starts I only want to run the bat on ping NOT 0 (turn off camera) 
      any ideas/advice?
    • By Vikramjeet
      include-once #include <File.au3> #include <Excel.au3> #include <String.au3> #include <MsgBoxConstants.au3> Local $file = "TEST.log" FileOpen($file, 0) $TTLPax = 1 For $i = _FileCountLines($file) - $TTLPax to _FileCountLines($file) $line = FileReadLine($file, $i) Global $TktNo = StringMid($line, 8, 13) ; reads 13 characters from $Line starting from the 8th character msgbox(0,'',$TktNo) ; This is just for me to debug For $NoOfPax = 1 to 2 local $TTLSeg = 2 msgbox(0,'',$TTLSeg) msgbox(0,'',"7ABC"& $TktNo &"'N"& $NoOfPax &".1'C1,2'S1,2'B") ; This makes 7ABC1234567890123'N1.1'C1,2'S1,2'B ;But in the next loop I want the value to be 7ABC1234567890333'N2.1'C1,2'S1,2'B Next ExitLoop Next *TEST
      JAMES BAKER
        1.NYC-23JAN
        2.TJ 1234567890123
        3.TJ 1234567890333
      I am reading a file with last 5 lines as above. I want to be able to loop through and pick the values as follows
      1- Pick 1234567890123
      2- Use it to build a format with N1.1
      3- Pick 1234567890333
      2- Use it to build a format with N2.1
      Need help with the loop. Thank You
       
       
    • By Vikramjeet
      For $A1 = 12 To 11 + $Total For $B1 = 1 To ($oExcel.Application.Cells($A1,6).Value) ; This value is from the Excel file. It can be from 1 - 9. For $N1 = 7 To ??? ; This is based on the value of $B1 ((1 = 7, 2 = 17, 3 = 27, 4 = 37, 5 = 47) Send("-"& ($oExcel.Application.Cells($A1,$N1).Value) &"/"& ($oExcel.Application.Cells($A1,$N1+1).Value)) Sleep(400) Send("{ENTER}") Sleep(700) Next Next Next I am not able to figure how to loop $N1 as follows
      If the Value of $B1 = 1 then $N1 = 7
      If the Value of $B1 = 2 then $N1 = 17
      If the Value of $B1 = 3 then $N1 = 27
      If the Value of $B1 = 4 then $N1 = 37  
      The value of $N1 comes from $B1 where 1 = 7, 2 = 17, 3 = 27, 4 = 37, 5 = 47)
      Thank You
    • By ssah8
      So im creating a bot that logs in on a website. The website got a dropdown menu, and I have to choose the right one to login (Student)
      #include <IE.au3>
      #inculude <Inet.au3>
      $oIE = _IECreate("<snip>")
      $Name = _IEGetObjByName($oIE, "ssusername")
      $Pass = _IEGetObjByName($oIE, "sspassword")
      $dropdown = _IEGetObjByName($oIE, "usertype")
      _IEPropertySet($Name, 'innerText', 'censored')
      _IEPropertySet($Pass, 'innerText', 'censored')
      _IEPropertySet($dropdown, 'innerText', 'Student') <------ How do I make the dropdown list select "Student"?
       
       
    • By ThePoro
      Hi everyone.
      I want to ask about this : 
      I want it runs from 1 to 100 and It opens 10 firefox profiles then access youtube. After I close a firefox window, the loop runs and wait for another window close until loop ends
      I have a loop like this.
      Func launch() Local $from = Int(GUICtrlRead($input1)) Local $to = Int(GUICtrlRead($input2)) If $to <> "" Then While $from <= $to Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") $to=$to+1 WEnd Else Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") EndIf EndFunc Is there any solution?
      Thank you!
×
×
  • Create New...