dweizz Posted September 8, 2007 Share Posted September 8, 2007 i found this code in a website... #include <GUIConstants.au3> #include <Misc.au3> Opt("GUIOnEventMode", 1) ;$dll = DllOpen("user32.dll"wink $key1 = True global $Name_Game = "Element Client";"abc.txt - Notepad" global $ID = 0 global $Run_ID = 0 ;---------------------------------HotKey--------------------------------- HotKeySet("{F12}", "HotKey1"wink ; ESC HotKeySet("{F11}", "HotKey2"wink ; F11 HotKeySet("{F9}", "Add_ID"wink ;F9 HotKeySet("{F10}", "AltQ"wink ;F10 ;--------------------------------Main------------------------------------- $AutoTGHMv10 = GUICreate("Choi Nhieu ID TGHM", 230, 60) $Add_ID = GUICtrlCreateButton("Them ID TGHM", 10, 10, 100, 25) GUICtrlSetOnEvent($Add_ID,"Add_ID"wink $Exit_ID = GUICtrlCreateButton("Thoát", 120, 10, 100, 25) GUICtrlSetOnEvent($Exit_ID,"AltQ"wink $MenuItem1 = GUICtrlCreateMenu("Phím Nóng"wink $MenuItem2 = GUICtrlCreateMenuItem("Them ID TGHM - F9",$MenuItem1) GUICtrlSetOnEvent($MenuItem2,"Add_ID"wink $MenuItem3 = GUICtrlCreateMenuItem("An Hoac Hien Cua So Game - F12",$MenuItem1) GUICtrlSetOnEvent($MenuItem3,"HotKey1"wink $MenuItem4 = GUICtrlCreateMenuItem("Dong Xuong Taskbar - F11",$MenuItem1) GUICtrlSetOnEvent($MenuItem4,"HotKey2"wink $MenuItem5 = GUICtrlCreateMenuItem("Thoát - F10",$MenuItem1) GUICtrlSetOnEvent($MenuItem5,"AltQ"wink GUISetState(@SW_SHOW) ;--------------------------------Code---------------------------------------- While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $MenuItem2 Add_ID() Case $MenuItem3 HotKey1() Case $MenuItem4 HotKey2() Case $MenuItem5 Exit Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ;---------------------------------------------function------------------------- Func Add_ID() ;MsgBox (0, "Them ID", "Them ID"wink $ID = $ID + 1 WinSetTitle($Name_Game, "", $ID) EndFunc Func HotKey1() $key1 = HideAndShowGame($key1, $ID) EndFunc Func HotKey2() HideAndShowAuto() EndFunc Func HideAndShowGame($key_Game, $Name) $Run_ID = 1 If $key_Game Then WinSetState($Name_Game, "", @SW_HIDE) while $Run_ID <= $ID ;MsgBox (0, "Hide ID", "Hide ID: " & $Run_ID) WinSetState($Run_ID, "", @SW_HIDE) $Run_ID = $Run_ID + 1 WEnd Return False Else WinSetState($Name_Game, "", @SW_SHOW) while $Run_ID <= $ID ;MsgBox (0, "Show ID", "Show ID: " & $Run_ID) WinSetState($Run_ID, "", @SW_SHOW) $Run_ID = $Run_ID + 1 WEnd Return True EndIf EndFunc Func HideAndShowAuto() WinSetState("Choi Nhieu ID TGHM","", @SW_RESTORE) Sleep(3000) WinSetState("Choi Nhieu ID TGHM","", @SW_HIDE) EndFunc Func AltQ() Exit EndFunc And your self PHP code WinActivate("Element Client") WinSetTitle("Element Client","","More Acc TGHM") Exit 0; im totally clueless when it comes to scripting... the programmer said to use autoit for it but i cant seem to make it work... when i try to compile it, an error pops out.... HotKeySet("{F12}", "HotKey1"wink HotKeySet("{F12}", "HotKey1"^ERROR this program is for dual boxing... Link to comment Share on other sites More sharing options...
maqleod Posted September 8, 2007 Share Posted September 8, 2007 that is because the hotkey lines are not formatted correctly. [u]You can download my projects at:[/u] Pulsar Software Link to comment Share on other sites More sharing options...
Didonet Posted September 8, 2007 Share Posted September 8, 2007 Тry This:#include <GUIConstants.au3>#include <Misc.au3>Opt("GUIOnEventMode", 1);$dll = DllOpen("user32.dll")$key1 = Trueglobal $Name_Game = "Element Client";"abc.txt - Notepad"global $ID = 0global $Run_ID = 0;---------------------------------HotKey---------------------------------HotKeySet("{F12}", "HotKey1") ; ESCHotKeySet("{F11}", "HotKey2") ; F11HotKeySet("{F9}", "Add_ID") ;F9HotKeySet("{F10}", "AltQ") ;F10;--------------------------------Main-------------------------------------$AutoTGHMv10 = GUICreate("Choi Nhieu ID TGHM", 230, 60)$Add_ID = GUICtrlCreateButton("Them ID TGHM", 10, 10, 100, 25)GUICtrlSetOnEvent($Add_ID,"Add_ID")$Exit_ID = GUICtrlCreateButton("Thoat", 120, 10, 100, 25)GUICtrlSetOnEvent($Exit_ID,"AltQ")$MenuItem1 = GUICtrlCreateMenu("Phim Nong")$MenuItem2 = GUICtrlCreateMenuItem("Them ID TGHM - F9",$MenuItem1)GUICtrlSetOnEvent($MenuItem2,"Add_ID")$MenuItem3 = GUICtrlCreateMenuItem("An Hoac Hien Cua So Game - F12",$MenuItem1)GUICtrlSetOnEvent($MenuItem3,"HotKey1")$MenuItem4 = GUICtrlCreateMenuItem("Dong Xuong Taskbar - F11",$MenuItem1)GUICtrlSetOnEvent($MenuItem4,"HotKey2")$MenuItem5 = GUICtrlCreateMenuItem("Thoat - F10",$MenuItem1)GUICtrlSetOnEvent($MenuItem5,"AltQ")GUISetState(@SW_SHOW);--------------------------------Code----------------------------------------While 1$nMsg = GUIGetMsg()Switch $nMsgCase $MenuItem2Add_ID()Case $MenuItem3HotKey1()Case $MenuItem4HotKey2()Case $MenuItem5ExitCase $GUI_EVENT_CLOSEExitEndSwitchWEnd;---------------------------------------------function-------------------------Func Add_ID();MsgBox (0, "Them ID", "Them ID")$ID = $ID + 1WinSetTitle($Name_Game, "", $ID)EndFuncFunc HotKey1()$key1 = HideAndShowGame($key1, $ID)EndFuncFunc HotKey2()HideAndShowAuto()EndFuncFunc HideAndShowGame($key_Game, $Name)$Run_ID = 1If $key_Game ThenWinSetState($Name_Game, "", @SW_HIDE)while $Run_ID <= $ID;MsgBox (0, "Hide ID", "Hide ID: " & $Run_ID)WinSetState($Run_ID, "", @SW_HIDE)$Run_ID = $Run_ID + 1WEndReturn FalseElseWinSetState($Name_Game, "", @SW_SHOW)while $Run_ID <= $ID;MsgBox (0, "Show ID", "Show ID: " & $Run_ID)WinSetState($Run_ID, "", @SW_SHOW)$Run_ID = $Run_ID + 1WEndReturn TrueEndIfEndFuncFunc HideAndShowAuto()WinSetState("Choi Nhieu ID TGHM","", @SW_RESTORE)Sleep(3000)WinSetState("Choi Nhieu ID TGHM","", @SW_HIDE)EndFuncFunc AltQ()ExitEndFunci test it and it works... but i cannot get the sense of all... Link to comment Share on other sites More sharing options...
rasim Posted September 8, 2007 Share Posted September 8, 2007 correct "wink" on ")" Link to comment Share on other sites More sharing options...
dweizz Posted September 8, 2007 Author Share Posted September 8, 2007 rasim, didonet and maqleod.... thank you for help... you need to run another program for this to spoke... its suppose to open to of that program simultaneously... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now