Jump to content

help please


dweizz
 Share

Recommended Posts

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

Тry This:

#include <GUIConstants.au3>

#include <Misc.au3>

Opt("GUIOnEventMode", 1)

;$dll = DllOpen("user32.dll")

$key1 = True

global $Name_Game = "Element Client";"abc.txt - Notepad"

global $ID = 0

global $Run_ID = 0

;---------------------------------HotKey---------------------------------

HotKeySet("{F12}", "HotKey1") ; ESC

HotKeySet("{F11}", "HotKey2") ; F11

HotKeySet("{F9}", "Add_ID") ;F9

HotKeySet("{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 $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")

$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

i test it and it works... but i cannot get the sense of all... :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...