Pollo Posted August 15, 2011 Share Posted August 15, 2011 Hi, im new to the forum and to Autoit.. Im making a little tool to press a few keys in a game "Flyff" to auto buff myself.. I'm usually playing with 2 instance of the game.. and i wanted to make the tool to select the right game windows.. it is possible to do it via PID ? i just started to make the tool but i got stuck and tried searching but couldn't get the answer. expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> $Main_FMR = GUICreate("iFBuffer", 342, 185, 196, 135) GUISetBkColor(0xFFFFFF) $Tabs = GUICtrlCreateTab(0, 0, 361, 185, $TCS_FIXEDWIDTH) $TabSheet1 = GUICtrlCreateTabItem("Config") $ShowWind = GUICtrlCreateButton("Show Window", 245, 33, 91, 21, $BS_FLAT) GUICtrlSetBkColor(-1, 0xFFFFFF) $Label1 = GUICtrlCreateLabel("FlyFF ID:", 7, 36, 55, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xFFFFFF) $Combo1 = GUICtrlCreateCombo("", 60, 33, 89, 25, BitOR($GUI_SS_DEFAULT_COMBO,$CBS_SIMPLE,$CBS_OEMCONVERT,$CBS_SORT)) GUICtrlSetBkColor(-1, 0xFFFFFF) $RefreshList = GUICtrlCreateButton("Refresh List", 156, 33, 83, 21, $BS_FLAT) GUICtrlSetBkColor(-1, 0xFFFFFF) $Graphic1 = GUICtrlCreateGraphic(3, 28, 337, 31, BitOR($GUI_SS_DEFAULT_GRAPHIC,$SS_BLACKFRAME)) GUICtrlSetBkColor(-1, 0xABABAB) $TabSheet2 = GUICtrlCreateTabItem("About") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $RefreshList $list = ProcessList("Neuz.exe") for $i = 1 to $list[0][0] GUICtrlSetData($Combo1, "") GUICtrlSetData($Combo1, "FlyFF (" & $list[$i][1] & ")") next Case $ShowWind WinActivate(GUICtrlGetHandle($Combo1) , "") EndSwitch WEnd When i have the 2 game windows and i press refresh list button it shoes in the Combo1 FlyFF (PID) for both games, but how can i handle the game window by selecting it on the Combo1 ? What im trying to do so far its like WinActive the selected item on the Combo1 but i cant... any help ? Link to comment Share on other sites More sharing options...
enaiman Posted August 15, 2011 Share Posted August 15, 2011 Bad start You have completely missed reading Forum Rules: http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/Game automation is a forbidden topic here. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Recommended Posts