Jump to content
Sign in to follow this  

Decimal to Float Hex Oo

Recommended Posts


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
    If $msg=$Teleportbutton Then Teleportuj()

Func Teleportuj()
    $dox=GUICtrlRead ( $inputx )
    $doy=GUICtrlRead ( $inputy )
    $Mem_Open = _MemoryOpen($proces)


I can't crate one script. I want to convert value from decimal, to float hex. In the cheat engine to look like this:

Posted Image


Share this post

Link to post
Share on other sites


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]

Share this post

Link to post
Share on other sites

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 by Ascend4nt

Share this post

Link to post
Share on other sites

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

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.