HMJ7 Posted December 23, 2019 Posted December 23, 2019 Hello guys. I'm new to AutoIt world. I'm trying to convert my c# code to auto it. How can I do it in AutoIt I didn't see any function similar to 'BitConverter' byte[] data = new byte[10]; byte[] fourBytes = BitConverter.GetBytes(data.Length); Console.WriteLine(fourBytes.Length); // 4 int getLength = BitConverter.ToInt32(fourBytes, 0); Console.WriteLine(getLength); // 10
Nine Posted December 23, 2019 Posted December 23, 2019 Hex is quite close, you just need to convert it to array after, if needed... #include <Constants.au3> MsgBox ($MB_SYSTEMMODAL,"Bool",Hex(True,2)) MsgBox ($MB_SYSTEMMODAL,"Char",Hex(AscW("*"),4)) MsgBox ($MB_SYSTEMMODAL,"Word",Hex (11111,4)) MsgBox ($MB_SYSTEMMODAL,"Int",Hex (1111111111)) MsgBox ($MB_SYSTEMMODAL,"Long",Hex(1111111111111111111)) MsgBox ($MB_SYSTEMMODAL,"Float",Hex(0.111111111111111)) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
AndyG Posted December 24, 2019 Posted December 24, 2019 ;create struct $struct =dllstructcreate("int;float[4];dword") ;fill struct with data dllstructsetdata($struct,1,123456);int dllstructsetdata($struct,2,4.80114160043301e+030,1);float dllstructsetdata($struct,2,3.68584191575527e+024,2);float dllstructsetdata($struct,2,7.71403089381636e+031,3);float dllstructsetdata($struct,2,8.24605444209785e-019,4);float dllstructsetdata($struct,3,0xDEADBEEF);dword ;read some data from struct at offset 4 $struct2=dllstructcreate("char[16]",dllstructgetptr($struct)+4) msgbox(0,":o)",dllstructgetdata($struct2,1)) Musashi 1
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