Sign in to follow this  
Followers 0
10031992

GUICtrlCreateCheckbox

3 posts in this topic

Someone tell me how do I implement in the script, when I enable "GUICtrlCreateCheckbox" it shows "active" and while not show "Disabled"

I tried to do more when I turn, it shows active, but when I off he is showing activated

I would like to show it On and Off

looks like I did

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>;
#include <EditConstants.au3>
#include <Inet.au3>

    Opt("guioneventmode", 1); allows us to use GUIsetonevent

Local $listText, $s_TempText,$url
$version = "v4.8 ";


$ID = _MemoryOpen(ProcessExists("Nksp.exe"));
    $pointer = 0x12334;
    $Attkadd = _MemoryRead($pointer, $ID) + 0x000FFFFF;

$Form2 = GUICreate("LC- gOHc -" & $version, 410, 410);
GUISetBkColor(0x000000);

 GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit")

 $listText = GUICtrlCreateList("                  - Hack Made - Bode.                         Acesse nosso site - www.gOHc.webnode.com -                          Atenção : Evite usar este software perto de outros players -                                                                     Voce está usando Hack VIP                             Equipe gOHc Agradece sua Colaboração. ", 0, 1, 410, 40, 10) ; a label (change it to your name
GUICtrlCreateGroup("", 5, 30, 290, 290)
$Attk = GUICtrlCreateCheckbox("Trainer Speed(Low) ", 13, 40, 121, 17)
GUICtrlSetbkColor(-1, 0x00FF00)
GUISetState(@SW_SHOW)
While 1
    Sleep(100)
    $s_TempText = GUICtrlRead($listText)
    GUICtrlSetData($listText, "|" & StringTrimLeft($s_TempText, 1) & StringLeft($s_TempText, 1))

    If GUICtrlRead($Attk) = 1 Then
        _MemoryWrite($Attkadd, $ID, 8)
    GUICtrlCreateLabel("Active",150,40,100); here ,I did this, it not worked
    GUICtrlSetColor(-1, 0xFF0000)
    EndIf
WEnd

Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

    If Not ProcessExists($iv_Pid) Then
        SetError(1)
        Return 0
    EndIf

    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

    If @error Then
        SetError(2)
        Return 0
    EndIf

    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

    If @error Then
        DllClose($ah_Handle[0])
        SetError(3)
        Return 0
    EndIf

    $ah_Handle[1] = $av_OpenProcess[0]

    Return $ah_Handle

EndFunc   ;==>_MemoryOpen

Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    Local $v_Buffer = DllStructCreate($sv_Type)

    If @error Then
        SetError(@error + 1)
        Return 0
    EndIf

    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @error Then
        Local $v_Value = DllStructGetData($v_Buffer, 1)
        Return $v_Value
    Else
        SetError(6)
        Return 0
    EndIf

EndFunc   ;==>_MemoryRead

Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    Local $v_Buffer = DllStructCreate($sv_Type)

    If @error Then
        SetError(@error + 1)
        Return 0
    Else
        DllStructSetData($v_Buffer, 1, $v_Data)
        If @error Then
            SetError(6)
            Return 0
        EndIf
    EndIf

    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @error Then
        Return 1
    Else
        SetError(7)
        Return 0
    EndIf
 Opt("guioneventmode", 0); allows us to use GUIsetonevent
EndFunc   ;==>_MemoryWrite


Func onautoitexit()
   Exit
EndFunc

Could someone help me


-------------------------------------------------------------------------------------------------------------------------------------------- [center][/center][center]Autoit Support Forum in Portuguese | AutoitBrasil.com[/center] [sub]My Script :[/sub]Simples Login for Program

Share this post


Link to post
Share on other sites



Someone tell me how do I implement in the script, when I enable "GUICtrlCreateCheckbox" it shows "active" and while not show "Disabled"

I tried to do more when I turn, it shows active, but when I off he is showing activated

I would like to show it On and Off

looks like I did

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>;
#include <EditConstants.au3>
#include <Inet.au3>

    Opt("guioneventmode", 1); allows us to use GUIsetonevent

Local $listText, $s_TempText,$url
$version = "v4.8 ";


$ID = _MemoryOpen(ProcessExists("Nksp.exe"));
    $pointer = 0x12334;
    $Attkadd = _MemoryRead($pointer, $ID) + 0x000FFFFF;

$Form2 = GUICreate("LC- gOHc -" & $version, 410, 410);
GUISetBkColor(0x000000);

 GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit")

 $listText = GUICtrlCreateList("                  - Hack Made - Bode.                         Acesse nosso site - www.gOHc.webnode.com -                          Atenção : Evite usar este software perto de outros players -                                                                     Voce está usando Hack VIP                             Equipe gOHc Agradece sua Colaboração. ", 0, 1, 410, 40, 10) ; a label (change it to your name
GUICtrlCreateGroup("", 5, 30, 290, 290)
$Attk = GUICtrlCreateCheckbox("Trainer Speed(Low) ", 13, 40, 121, 17)
GUICtrlSetbkColor(-1, 0x00FF00)
GUISetState(@SW_SHOW)
While 1
    Sleep(100)
    $s_TempText = GUICtrlRead($listText)
    GUICtrlSetData($listText, "|" & StringTrimLeft($s_TempText, 1) & StringLeft($s_TempText, 1))

    If GUICtrlRead($Attk) = 1 Then
        _MemoryWrite($Attkadd, $ID, 8)
    GUICtrlCreateLabel("Active",150,40,100); here ,I did this, it not worked
    GUICtrlSetColor(-1, 0xFF0000)
    EndIf
WEnd

Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

    If Not ProcessExists($iv_Pid) Then
        SetError(1)
        Return 0
    EndIf

    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

    If @error Then
        SetError(2)
        Return 0
    EndIf

    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

    If @error Then
        DllClose($ah_Handle[0])
        SetError(3)
        Return 0
    EndIf

    $ah_Handle[1] = $av_OpenProcess[0]

    Return $ah_Handle

EndFunc   ;==>_MemoryOpen

Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    Local $v_Buffer = DllStructCreate($sv_Type)

    If @error Then
        SetError(@error + 1)
        Return 0
    EndIf

    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @error Then
        Local $v_Value = DllStructGetData($v_Buffer, 1)
        Return $v_Value
    Else
        SetError(6)
        Return 0
    EndIf

EndFunc   ;==>_MemoryRead

Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    Local $v_Buffer = DllStructCreate($sv_Type)

    If @error Then
        SetError(@error + 1)
        Return 0
    Else
        DllStructSetData($v_Buffer, 1, $v_Data)
        If @error Then
            SetError(6)
            Return 0
        EndIf
    EndIf

    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @error Then
        Return 1
    Else
        SetError(7)
        Return 0
    EndIf
 Opt("guioneventmode", 0); allows us to use GUIsetonevent
EndFunc   ;==>_MemoryWrite


Func onautoitexit()
   Exit
EndFunc

Could someone help me

You should demonstrate your issue with a script that can actually be run by those who might try to help you, and which is as short as possible to do that.

You want to check if the status has changed, and only update if it has. Otherwise the control will flicker from constant updates:

#include <GUIConstantsEx.au3>;

Opt("guioneventmode", 1)

Global $Form2, $listText, $Attk, $version = "v4.8 "

$Form2 = GUICreate("LC- gOHc -" & $version, 410, 410);
GUISetBkColor(0x000000)
GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit")
$listText = GUICtrlCreateList("Title", 0, 1, 410, 40, 10)
GUICtrlCreateGroup("", 5, 30, 290, 290)
$Attk = GUICtrlCreateCheckbox("Trainer Speed(Low) ", 13, 40, 121, 17)
GUICtrlSetBkColor(-1, 0x00FF00)
$AttkLabel = GUICtrlCreateLabel("Disabled", 150, 40, 100)
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)

While 1
    Sleep(100)
    If GUICtrlRead($Attk) = 1 Then
        ; Checkbox selected
        If GUICtrlRead($AttkLabel) = "Disabled" Then
            ; Change state
            GUICtrlSetData($AttkLabel, "Active")
            GUICtrlSetColor(-1, 0x00FF00)
        EndIf
    Else
        ; Checkbox unchecked
        If GUICtrlRead($AttkLabel) = "Active" Then
            ; Change state
            GUICtrlSetData($AttkLabel, "Disabled")
            GUICtrlSetColor(-1, 0xFF0000)
        EndIf
    EndIf
WEnd

Func onautoitexit()
    Exit
EndFunc   ;==>onautoitexit

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

try this:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>;
#include <EditConstants.au3>
#include <Inet.au3>

    Opt("guioneventmode", 1); allows us to use GUIsetonevent

Local $listText, $s_TempText,$url
$version = "v4.8 ";


$ID = _MemoryOpen(ProcessExists("Nksp.exe"));
    $pointer = 0x12334;
    $Attkadd = _MemoryRead($pointer, $ID) + 0x000FFFFF;

$Form2 = GUICreate("LC- gOHc -" & $version, 410, 410);
GUISetBkColor(0x000000);

 GUISetOnEvent($GUI_EVENT_CLOSE, "onautoitexit")

 $listText = GUICtrlCreateList("                  - Hack Made - Bode.                         Acesse nosso site - www.gOHc.webnode.com -                          Atenção : Evite usar este software perto de outros players -                                                                     Voce está usando Hack VIP                             Equipe gOHc Agradece sua Colaboração. ", 0, 1, 410, 40, 10) ; a label (change it to your name
GUICtrlCreateGroup("", 5, 30, 290, 290)
$Attk = GUICtrlCreateCheckbox("Trainer Speed(Low) ", 13, 40, 121, 17)
GUICtrlSetOnEvent (-1, "_labfunc")
GUICtrlSetbkColor(-1, 0x00FF00)
GUISetState(@SW_SHOW)
While 1
    Sleep(100)
    $s_TempText = GUICtrlRead($listText)
    GUICtrlSetData($listText, "|" & StringTrimLeft($s_TempText, 1) & StringLeft($s_TempText, 1))

    If GUICtrlRead($Attk) = 1 Then
        _MemoryWrite($Attkadd, $ID, 8)
    ;GUICtrlCreateLabel("Active",150,40,100); here ,I did this, it not worked
    ;GUICtrlSetColor(-1, 0xFF0000)
    EndIf
WEnd

Func _labfunc()
    If GUICtrlRead($Attk) = 1 Then
      GUICtrlCreateLabel("Active",150,40,100)
      GUICtrlSetColor(-1, 0xFF0000)
Else
    GUICtrlCreateLabel("Disabled",150,40,100)
      GUICtrlSetColor(-1, 0x00ff00)
EndIf
endfunc

Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

    If Not ProcessExists($iv_Pid) Then
        SetError(1)
        Return 0
    EndIf

    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

    If @error Then
        SetError(2)
        Return 0
    EndIf

    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

    If @error Then
        DllClose($ah_Handle[0])
        SetError(3)
        Return 0
    EndIf

    $ah_Handle[1] = $av_OpenProcess[0]

    Return $ah_Handle

EndFunc   ;==>_MemoryOpen

Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    Local $v_Buffer = DllStructCreate($sv_Type)

    If @error Then
        SetError(@error + 1)
        Return 0
    EndIf

    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @error Then
        Local $v_Value = DllStructGetData($v_Buffer, 1)
        Return $v_Value
    Else
        SetError(6)
        Return 0
    EndIf

EndFunc   ;==>_MemoryRead

Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')

    If Not IsArray($ah_Handle) Then
        SetError(1)
        Return 0
    EndIf

    Local $v_Buffer = DllStructCreate($sv_Type)

    If @error Then
        SetError(@error + 1)
        Return 0
    Else
        DllStructSetData($v_Buffer, 1, $v_Data)
        If @error Then
            SetError(6)
            Return 0
        EndIf
    EndIf

    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    If Not @error Then
        Return 1
    Else
        SetError(7)
        Return 0
    EndIf
 Opt("guioneventmode", 0); allows us to use GUIsetonevent
EndFunc   ;==>_MemoryWrite


Func onautoitexit()
   Exit
EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0