Dralor Posted July 30, 2009 Share Posted July 30, 2009 I have one script: #include <NomadMemory.au3> #include <converter22.au3> GUICreate ( "name", 150, 110 ) GUICtrlCreateInput ( "X", 20, 10, 50, -1, 0x08000000 ) GUICtrlCreateInput ( "Y", 80, 10, 50, -1, 0x08000000 ) $inputx=GUICtrlCreateInput ( "0", 20, 40, 50 ) $inputy=GUICtrlCreateInput ( "0", 80, 40, 50 ) $Teleportbutton=GUICtrlCreateButton ( "Teleportuj", 25, 70, 100, 30 ) GUISetState () $x = 0x02100474 $y = 0x0210047C $proces = WinGetProcess ( "[Class:class name - this work]" ) While 1 $msg=GUIGetMsg() If $msg=$Teleportbutton Then Teleportuj() WEnd Func Teleportuj() $dox=GUICtrlRead ( $inputx ) $doy=GUICtrlRead ( $inputy ) ;HERE I HAVE PROBLEM $Mem_Open = _MemoryOpen($proces) _MemoryWrite($x,$Mem_Open,$dox2) _MemoryWrite($y,$Mem_Open,$doy2) _MemoryClose($Mem_Open) EndFuncI can't crate one script. I want to convert value from decimal, to float hex. In the cheat engine to look like this:PLEASE HELP ME ;( Link to comment Share on other sites More sharing options...
bo8ster Posted July 31, 2009 Share Posted July 31, 2009 Hex()? Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Dralor Posted July 31, 2009 Author Share Posted July 31, 2009 MassSPAMER: I don't understand >_ Link to comment Share on other sites More sharing options...
Ascend4nt Posted July 31, 2009 Share Posted July 31, 2009 (edited) A quick search on how to convert a binary/hex (0x##) value to float/double brought up this link. Of course, you need to know what you are doing. Remember floats and doubles are 4 and 8 bytes respectively. AutoIT doesn't support extended or quadruple precision floats, and I don't know if any game would either *shrug* Edited July 31, 2009 by Ascend4nt My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Dralor Posted July 31, 2009 Author Share Posted July 31, 2009 Thanx. I used this script: Func _FloatToHex ( $floatval ) $sF = DllStructCreate("float") $sB = DllStructCreate("ptr", DllStructGetPtr($sF)) If $floatval = "" Then Exit DllStructSetData($sF, 1, $floatval) $return=DllStructGetData($sB, 1) Return $return EndFunc 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