Results 1 to 2 of 2
  1. #1
    EpicPacMan's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    The internet.
    Posts
    187
    Reputation
    13
    Thanks
    150
    My Mood
    Goofy

    Beginner's guide to smart key broadcasting across 4 windows. AUTOIT

    Hey guys, been a while since I've made any posts

    Let's take a look at the autoit code I use to broadcast the spacebar.

    Code:
    #include <GUIConstantsEx.au3>
    #Include <Misc.au3>
    Opt('MustDeclareVars', 1)
    GUI()
    Func GUI()
    	Global $b1, $dll, $msg
    	GUICreate("BROADCAST", 300, 300)
    	GUISetState(@SW_SHOW)
    	$b1=GUICtrlCreateCheckbox("S",10,10)
    	While 1
    		$dll = DllOpen("user32.dll")
    		$msg = GUIGetMsg()
    		If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("1") And  _IsPressed(20, $dll) then 
    		ControlSend("2","","","{space}")
    		ControlSend("3","","","{space}")
    		ControlSend("4","","","{space}")
    		endIf
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("2") And  _IsPressed(20, $dll) then 
    		ControlSend("1","","","{space}")
    		ControlSend("3","","","{space}")
    		ControlSend("4","","","{space}")
    		EndIf
    	
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("3") And  _IsPressed(20, $dll) then 
    		ControlSend("2","","","{space}")
    		ControlSend("1","","","{space}")
    		ControlSend("4","","","{space}")
    		EndIf
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("4") And  _IsPressed(20, $dll) then 
    		ControlSend("2","","","{space}")
    		ControlSend("1","","","{space}")
    		ControlSend("3","","","{space}")
    		EndIf
    	WEnd
    	DllClose($dll)
    	GUIDelete()
    	EndFunc
    So, if a checkbox is checked, window one is open and spacebar is pressed then send the key to all other windows.

    If 1 then 234
    If 2 then 134
    If 3 then 124
    If 4 then 123

    This can be expanded to as many windows as you like, just make sure you close the dll when you're finished with your while loop. This style of broadcasting will keep sending keys while you hold it down, so it does break Blizzards TOS, however I've been using methods similar to this for years without being detected or banned.

    Don't forget, none of this code will work without renaming windows!

    Code:
    Func one()
    	ShellExecute("wow.exe")
    	WinWait("World of Warcraft")
    	WinSetTitle("World of Warcraft", "", "1")
    	Endfunc
    We use ShellExecute("") here because Run("") simply wont work.

    Finally, if you want to get dirty-
    Even if you have a balls deep computer and can run all 4 windows fullscreen across many monitors, why not resize your windows down as far as they can go and free up space for either even more windows or even more code? Automating processes is complicated business but that's why we're in it. My goal is to be able to run and fully control the actions of 4 shamans from one window without ever having to change windows manually. The code (when finished) should be able to detect death and automatically swap windows with little to no lag. We achieve this by resizing windows in a specific order.

    Code:
    Func resize1()
    	WinMove("1", "", 0,0, 600, 600)
    	WinMove("2", "", 0,0, 100, 100)
    	WinMove("3", "", 0,0, 100, 100)
    	WinMove("4", "", 0,0, 100, 100)
    EndFunc
    When you squish wow to it's minimum rendering capability it reduces the system resources your processor takes to swap windows.

    Code:
    Func resize2()
    	WinMove("1", "", 0,0, 100, 100)
    	WinMove("2", "", 0,0, 600, 600)
    	WinMove("3", "", 0,0, 100, 100)
    	WinMove("4", "", 0,0, 100, 100)
    EndFunc
    All you need but do is continue clicking in the same window area. On a single core 3ghz processor this takes little less than a second to swap. But then you ask, "EpicPacMan, how do you tell the bots who's boss?"- Honestly this is a post for another day, but I'll put in a quick example and challenge you to explain it in a reply.

    NUMPAD7
    Code:
    /focus toona
    NUMPAD4
    Code:
    /focus toonb
    NUMPAD1
    Code:
    /focus toonc
    NUMPAD0
    Code:
    /focus toond
    1
    Code:
    /assist [target=focus]
    Code:
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("1") And  _IsPressed("67", $dll) then 	
    		ControlSend("2","","","{NUMPAD7}",0)
    		ControlSend("3","","","{NUMPAD7}",0)
    		ControlSend("4","","","{NUMPAD7}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("2") And  _IsPressed("67", $dll) then 	
    		ControlSend("1","","","{NUMPAD7}",0)
    		ControlSend("3","","","{NUMPAD7}",0)
    		ControlSend("4","","","{NUMPAD7}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("3") And  _IsPressed("67", $dll) then 	
    		ControlSend("2","","","{NUMPAD7}",0)
    		ControlSend("1","","","{NUMPAD7}",0)
    		ControlSend("4","","","{NUMPAD7}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("4") And  _IsPressed("67", $dll) then 	
    		ControlSend("2","","","{NUMPAD7}",0)
    		ControlSend("3","","","{NUMPAD7}",0)
    		ControlSend("1","","","{NUMPAD7}",0)
    	EndIf
    	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("1") And  _IsPressed("64", $dll) then 	
    		ControlSend("2","","","{NUMPAD4}",0)
    		ControlSend("3","","","{NUMPAD4}",0)
    		ControlSend("4","","","{NUMPAD4}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("2") And  _IsPressed("64", $dll) then 	
    		ControlSend("1","","","{NUMPAD4}",0)
    		ControlSend("3","","","{NUMPAD4}",0)
    		ControlSend("4","","","{NUMPAD4}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("3") And  _IsPressed("64", $dll) then 	
    		ControlSend("2","","","{NUMPAD4}",0)
    		ControlSend("1","","","{NUMPAD4}",0)
    		ControlSend("4","","","{NUMPAD4}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("4") And  _IsPressed("64", $dll) then 	
    		ControlSend("2","","","{NUMPAD4}",0)
    		ControlSend("3","","","{NUMPAD4}",0)
    		ControlSend("1","","","{NUMPAD4}",0)
    	EndIf
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("1") And  _IsPressed("61", $dll) then 	
    		ControlSend("2","","","{NUMPAD1}",0)
    		ControlSend("3","","","{NUMPAD1}",0)
    		ControlSend("4","","","{NUMPAD1}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("2") And  _IsPressed("61", $dll) then 	
    		ControlSend("1","","","{NUMPAD1}",0)
    		ControlSend("3","","","{NUMPAD1}",0)
    		ControlSend("4","","","{NUMPAD1}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("3") And  _IsPressed("61", $dll) then 	
    		ControlSend("2","","","{NUMPAD1}",0)
    		ControlSend("1","","","{NUMPAD1}",0)
    		ControlSend("4","","","{NUMPAD1}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("4") And  _IsPressed("61", $dll) then 	
    		ControlSend("2","","","{NUMPAD1}",0)
    		ControlSend("3","","","{NUMPAD1}",0)
    		ControlSend("1","","","{NUMPAD1}",0)
    	EndIf
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("1") And  _IsPressed("60", $dll) then 	
    		ControlSend("2","","","{NUMPAD0}",0)
    		ControlSend("3","","","{NUMPAD0}",0)
    		ControlSend("4","","","{NUMPAD0}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("2") And  _IsPressed("60", $dll) then 	
    		ControlSend("1","","","{NUMPAD0}",0)
    		ControlSend("3","","","{NUMPAD0}",0)
    		ControlSend("4","","","{NUMPAD0}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("3") And  _IsPressed("60", $dll) then 	
    		ControlSend("2","","","{NUMPAD0}",0)
    		ControlSend("1","","","{NUMPAD0}",0)
    		ControlSend("4","","","{NUMPAD0}",0)
    		EndIf	
    
    		if 	GUICtrlRead($b1)=$GUI_CHECKED and WinActive("4") And  _IsPressed("60", $dll) then 
    		ControlSend("2","","","{NUMPAD0}",0)
    		ControlSend("3","","","{NUMPAD0}",0)
    		ControlSend("1","","","{NUMPAD0}",0)
    	EndIf
    01 Left mouse button
    02 Right mouse button
    04 Middle mouse button (three-button mouse)
    05 Windows 2000/XP: X1 mouse button
    06 Windows 2000/XP: X2 mouse button
    08 BACKSPACE key
    09 TAB key
    0C CLEAR key
    0D ENTER key
    10 SHIFT key
    11 CTRL key
    12 ALT key
    13 PAUSE key
    14 CAPS LOCK key
    1B ESC key
    20 SPACEBAR
    21 PAGE UP key
    22 PAGE DOWN key
    23 END key
    24 HOME key
    25 LEFT ARROW key
    26 UP ARROW key
    27 RIGHT ARROW key
    28 DOWN ARROW key
    29 SELECT key
    2A PRINT key
    2B EXECUTE key
    2C PRINT SCREEN key
    2D INS key
    2E DEL key
    30 0 key
    31 1 key
    32 2 key
    33 3 key
    34 4 key
    35 5 key
    36 6 key
    37 7 key
    38 8 key
    39 9 key
    41 A key
    42 B key
    43 C key
    44 D key
    45 E key
    46 F key
    47 G key
    48 H key
    49 I key
    4A J key
    4B K key
    4C L key
    4D M key
    4E N key
    4F O key
    50 P key
    51 Q key
    52 R key
    53 S key
    54 T key
    55 U key
    56 V key
    57 W key
    58 X key
    59 Y key
    5A Z key
    5B Left Windows key
    5C Right Windows key
    60 Numeric keypad 0 key
    61 Numeric keypad 1 key
    62 Numeric keypad 2 key
    63 Numeric keypad 3 key
    64 Numeric keypad 4 key
    65 Numeric keypad 5 key
    66 Numeric keypad 6 key
    67 Numeric keypad 7 key
    68 Numeric keypad 8 key
    69 Numeric keypad 9 key
    6A Multiply key
    6B Add key
    6C Separator key
    6D Subtract key
    6E Decimal key
    6F Divide key
    70 F1 key
    71 F2 key
    72 F3 key
    73 F4 key
    74 F5 key
    75 F6 key
    76 F7 key
    77 F8 key
    78 F9 key
    79 F10 key
    7A F11 key
    7B F12 key
    7C-7F F13 key - F16 key
    80H-87H F17 key - F24 key
    90 NUM LOCK key
    91 SCROLL LOCK key
    A0 Left SHIFT key
    A1 Right SHIFT key
    A2 Left CONTROL key
    A3 Right CONTROL key
    A4 Left MENU key
    A5 Right MENU key
    BA ;
    BB =
    BC ,
    BD -
    BE .
    BF /
    C0 `
    DB [
    DC \
    DD ]
    Challenge! Explain how I tell the slaves who the master is and what you would do to make it better. Winner gets my code for 1-9.

  2. The Following User Says Thank You to EpicPacMan For This Useful Post:

    DragZor (02-04-2012)

  3. #2
    DragZor's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    The Netherlands
    Posts
    17
    Reputation
    10
    Thanks
    31
    Dude, This looks pretty nice.

    I don't understand anything of this anyway, So i dont even know where to put this.
    This code ETc look nice, Maby if you made the lay-out better, and the orginization good...
    Thanks for the post.

    Rep+






Similar Threads

  1. [Tutorial] Beginner's Guide to Hacking Using a Console
    By Agathocacological in forum Vindictus Tutorials
    Replies: 27
    Last Post: 07-28-2011, 04:17 PM
  2. Sending keys to minimized windows
    By stupidname1 in forum Vindictus Help
    Replies: 5
    Last Post: 07-05-2011, 04:47 AM
  3. Sending Keys into Vindictus using autoit(While minimized)
    By azrith001 in forum Vindictus Help
    Replies: 2
    Last Post: 05-22-2011, 09:30 PM
  4. [Tutorial] Maintaining your auto on hack - Beginner's Guide
    By Spookerzz in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 38
    Last Post: 10-12-2010, 01:31 PM
  5. [Tutorial] Adventure Quest Beginner's guide.
    By Krafty in forum Adventure Quest (AQ) Hacks / Cheats / Trainers
    Replies: 12
    Last Post: 09-25-2010, 09:04 PM