Adblock breaks this site

Sprry! Didn't know where to put this! (I need scripting help!)

Discussion in 'Programming General' started by ruudiluca, Oct 13, 2009.

  1. ruudiluca

    ruudiluca Newcomer

    Joined:
    Oct 13, 2009
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0
    Sprry! Didn't know where to put this! (I need scripting help!)

    Totally new to scripting. I am using AutoIt v3 to make a little bot.

    What have I done wrong?

    While 1=1
    Send (“LEFT”)
    Send (“RIGHT”)
    WEnd
    $i = 0
    While $i <= 1000
    $i = $i + 1
    WEnd

    I am trying to make a bot that presses the left and right arrow key over and over again.
     
  2. WCCobra

    WCCobra Newcomer

    Joined:
    Oct 7, 2009
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0
    Sprry! Didn't know where to put this! (I need scripting help!)

    Never used AutoIT nor saw any code for it, but if it is similar to most other languages:

    While 1=1
    Send (&#8220;LEFT&#8221;)
    Send (&#8220;RIGHT&#8221;)
    WEnd

    is an endless loop because 1 will always equal 1. You would need to use a variable and increment it to get out of the loop.

    $x = 1
    While 1=$x
    Send (&#8220;LEFT&#8221;)
    Send (&#8220;RIGHT&#8221;)
    $x = 2
    WEnd
     
< Programs | Splitting / Parsing help in .net >


 
 
Adblock breaks this site