Jump to content

_MemoryWrite help


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

AfterBurn,

Dog eaten your Help file? :blink:

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

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Moderators

AfterBurn,

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

Sorry to hear about the dog. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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
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...