找回密码
 加入
搜索
查看: 2590|回复: 4

[AU3基础] 【已解决】请问如何把浮点数转成十六进制数。新人,才申请的ID

[复制链接]
发表于 2010-12-30 14:24:01 | 显示全部楼层 |阅读模式
本帖最后由 kgd522 于 2010-12-31 11:50 编辑

如题 ,比如把1234.5转成十六制数
 楼主| 发表于 2010-12-30 14:33:52 | 显示全部楼层
自己顶一下
发表于 2010-12-30 16:31:25 | 显示全部楼层
#AutoIt3Wrapper_Au3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <WinAPI.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
        Local $float, $text, $INT
        $float = 1234.5
        $INT = _WinAPI_FloatToInt($float)
        $text = "The float " & $float & " is converted to the Integer " & $INT & " (Hex = " & Hex($INT) & ")"
        MsgBox(0, "_WinAPI_FloatToInt Example Results", $text)
        $float=_WinAPI_IntToFloat($INT)
        MsgBox(0,0,$float)
EndFunc   ;==>_Main
 楼主| 发表于 2010-12-31 10:46:44 | 显示全部楼层
本帖最后由 kgd522 于 2010-12-31 10:47 编辑

太谢谢了。昨天一天都在为这个烦。
发表于 2015-12-23 22:51:46 | 显示全部楼层
这个很有用,谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-29 00:18 , Processed in 0.118865 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表