AutoIt Question menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Sandstrom's Avatar Member
    Reputation
    2
    Join Date
    Nov 2015
    Posts
    21
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AutoIt Question

    Hello!

    I'm trying to build a simple wow "bot" to automate a few things (Such as send X key every X seconds to wow) I'm stuck at the infinite loop, where my Stop/exit buttons render completely useless.

    Here is my code:

    Code:
    #include <INet.au3>
    
    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #Include <GuiEdit.au3>
    
    #include <Constants.au3>
    #include <GUImenu.au3>
    #include <File.au3>
    #include <Array.au3>
    
    Global $running = 0
    
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("AutoButton", 340, 60, 500, 500)
    $Start = GUICtrlCreateButton("Start", 10, 15, 100, 30)
    $Stop = GUICtrlCreateButton("Stop", 120, 15, 100, 30)
    $Exit = GUICtrlCreateButton("Exit", 230, 15, 100, 30)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    
    
    While 1
    
    	$msg = GUIGetMsg()
    
    	Select
    
    	Case $msg = $Start
    			While 1
                ControlSend( "World of Warcraft", "", "", "{SPACE}" )
    			Sleep(1000)
    			WEnd
    
    
    	Case $msg = $Stop
    		ExitLoop
    
    	Case $msg = $Exit
    		GUIDelete()
    		ExitLoop
    		Exit
    
    	Case $msg = $GUI_EVENT_CLOSE
    		GUIDelete()
    		Exit
    
        EndSelect
    
    WEnd

    AutoIt Question
  2. #2
    brotalnia's Avatar Elite User
    Reputation
    508
    Join Date
    Apr 2009
    Posts
    477
    Thanks G/R
    26/310
    Trade Feedback
    0 (0%)
    Mentioned
    14 Post(s)
    Tagged
    3 Thread(s)
    I have no experience in AutoIt, but i assume "While 1" is an infinite loop. Try using a variable that you set to 1 before the loop, but have a button that changes the value to 0 or whatever is equal to False in this language.

  3. #3
    Sandstrom's Avatar Member
    Reputation
    2
    Join Date
    Nov 2015
    Posts
    21
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually I only want to exit the first case loop if that's possible? As I plan on adding more loops

Similar Threads

  1. AutoIt Question - Return / Return False / Return True
    By krims0nknite in forum Diablo 3 Bots Questions & Requests
    Replies: 1
    Last Post: 09-30-2012, 06:10 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 06:17 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