AfterBurn Posted July 5, 2010 Share Posted July 5, 2010 (edited) 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 July 5, 2010 by AfterBurn Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 5, 2010 Moderators Share Posted July 5, 2010 AfterBurn,Dog eaten your Help file? 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AfterBurn Posted July 5, 2010 Author Share Posted July 5, 2010 AfterBurn,Dog eaten your Help file? Hex - Returns a string representation of an integer or of a binary type converted to hexadecimal.M23Ok 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 More sharing options...
Moderators Melba23 Posted July 5, 2010 Moderators Share Posted July 5, 2010 AfterBurn,Perhaps if you used the "length" parameter. You can read all about it here. 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AfterBurn Posted July 5, 2010 Author Share Posted July 5, 2010 (edited) 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. expandcollapse popup#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 July 5, 2010 by AfterBurn 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