Jump to content
Sign in to follow this  
AfterBurn

_MemoryWrite help

Recommended Posts

AfterBurn

Ok her is my issue. I am using a slider in my gui, the slider is from 0 to 200. I can collect the current slider value (let's say it's) 50, now I want to use

_memorywrite($hexaddress, $ID, $value, $type)
ok I understand this part but what I need it for the $value to be in hex form is there away to convert the slider value to hex so when the slider value is read it is converted to hex form so $value would = hex#

So

$value = GUICtrlRead($Slider) _memorywrite($hexaddress, $ID, $value, $type)

so when slider is 200 $value becomes C8 instead of 200

Please help thank you.

Edited by AfterBurn

Share this post


Link to post
Share on other sites
Melba23

AfterBurn,

Dog eaten your Help file? :blink:

Hex - Returns a string representation of an integer or of a binary type converted to hexadecimal.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
AfterBurn

AfterBurn,

Dog eaten your Help file? :blink:

Hex - Returns a string representation of an integer or of a binary type converted to hexadecimal.

M23

Ok I have got it to work first test on value 50 problem is it send 00000032 instead of just 32 any ideas and dog is dead lol J/k

Share this post


Link to post
Share on other sites
Melba23

AfterBurn,

Perhaps if you used the "length" parameter. You can read all about it here. :blink:

Sorry to hear about the dog. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
AfterBurn

Ok Here is what I have and still it does not write to address. Note The address are in the configdata.nht file so you wont see then here. If you can spot the problem I would be very greatfull thank you for your time I have only been using Autoit for about a week.

#RequireAdmin
#include <Nomadmemory.au3>
#include <Array.au3>
#include <memory.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <configdata.nht>
#include <String.au3>
SetPrivilege("SeDebugPrivilege", 1)

#Region ###
If Not ProcessExists("FileName") Then
    If Not WinExists("Window") Then
        MsgBox(0, "Error", "Start File before running this program.")
        Exit
    EndIf
EndIf
Global $hGui, $Slider1, $iLabel, $nMsg
Global $iOld = 0, $iCur = 0

HotKeySet("{F11}", "Terminate")
$ID = _MemoryOpen(ProcessExists("FileName"))
$hGUI = GUICreate("AfterBurn  ", 407, 198, 192, 124)
$Slider1 = GUICtrlCreateSlider(240, 144, 150, 29, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS))
GUICtrlSetLimit(-1, 200, 0)
$iLabel = GUICtrlCreateLabel("Attack Speed " & $iOld, 240, 176, 151, 17)
GUISetState(@SW_SHOW)
#EndRegion

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Slider1 > 0
            MemoryWrite($Attackaddy, $ID, Hex($iOld, 2), "byte4")     
            Case Else
            $iCur = GUICtrlRead($Slider1)
            If $iOld <> $iCur Then
                $iOld = $iCur
                GUICtrlSetData($iLabel, "Attack Speed " & $iOld)

            EndIf
    EndSwitch
WEnd


Func Terminate()
    ToolTip('AfterBurn "Exiting"', 391, 225)
    Sleep(4000)
    ToolTip("")
    Exit 0
EndFunc   ;==>Terminate
Edited by AfterBurn

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  

×