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

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

Sprry! Didn't know where to put this! (I need scripting help!)
  1. Unread #1 - Oct 13, 2009 at 3:36 PM
  2. ruudiluca
    Joined:
    Oct 13, 2009
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    ruudiluca Newcomer

    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.
     
  3. Unread #2 - Oct 14, 2009 at 10:25 PM
  4. WCCobra
    Joined:
    Oct 7, 2009
    Posts:
    7
    Referrals:
    0
    Sythe Gold:
    0

    WCCobra Newcomer

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site