AutoIt Question - Return / Return False / Return True menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    krims0nknite's Avatar Member
    Reputation
    2
    Join Date
    Jun 2012
    Posts
    50
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AutoIt Question - Return / Return False / Return True

    Was wondering if I could get a bit of what return / return false / return true does

    I have function in my script where it basically looks like this:

    Func A
    PixelSearch
    If pixel found, click XXX,YYY
    EndIf
    EndFunc

    Now, if the Pixel is found I want it to start the script over basically... But I think it returns to where the function is called?

    If the pixel is not found, I want it to start at Function A again

    Would that look like this?

    Func A
    PixelSearch
    If pixel found, click XXX,YYY
    Return
    Else
    A()
    EndIf
    EndFunc

    AutoIt Question - Return / Return False / Return True
  2. #2
    sunblood's Avatar Member
    Reputation
    1
    Join Date
    Jul 2012
    Posts
    27
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use any sort of programming loop to do this. Here's a Do...Until loop.

    Code:
    Func A()
      Do
        $p = PixelSearch(x,y,c)
      Until IsArray($p)
      MouseClick("left",$p[0],$p[1],1,0)
    EndFunc
    and a While loop

    Func A()
    Code:
    While 1  ;this evaluates to While 1 = 1, so it will loop forever
      $p = PixelSearch(x,y,c)
      If IsArray($p) Then
        ExitLoop
      WEnd
      MouseClick(...)
    EndFunc

Similar Threads

  1. Noob AutoIt Question
    By D3Scavenger in forum Diablo 3 Bots and Programs
    Replies: 1
    Last Post: 04-17-2013, 10:19 PM
  2. d3 multiple clients and autoit questions
    By dEstr0y3r in forum Diablo 3 Bots Questions & Requests
    Replies: 0
    Last Post: 07-04-2012, 05:38 AM
  3. AutoIt question
    By zzack in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 06-14-2010, 04:53 PM
  4. ACTool OR AutoIT -Question-
    By DJRehab in forum World of Warcraft General
    Replies: 1
    Last Post: 09-30-2007, 12:56 PM
  5. autoIT question
    By Vel0city in forum World of Warcraft General
    Replies: 3
    Last Post: 06-18-2006, 02:54 PM
All times are GMT -5. The time now is 04:58 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search