Search the Community
Showing results for tags 'int'.
Found 6 results
ZeroByDevide posted a topic in AutoIt General Help and Supporti have this code running but it just would not start the code: Local $rndSleep = Int (Random(180000,240000,1000)) MsgBox($MB_SYSTEMMODAL, "NaaaNuuu", "This message box will show the sleeptime after closing the tabs, you got " & $rndSleep & " seconds left.", $rndSleep) here is the error it shows me: "C:\Users\numan\Desktop\scipiie.au3" (23) : ==> Variable used without being declared.: MsgBox($MB_SYSTEMMODAL, "NaaaNuuu", "This message box will show the sleeptime after closing the tabs, you got " & $rndSleep & " seconds left.", $rndSleep) MsgBox(^
Number to VarInt
algiuxas posted a topic in Developer General DiscussionHello, I'm making program(using AutoIt) that would connect to server. I need help converting numbers to VarInt. About VarInt: About VarInt: https://developers.google.com/protocol-buffers/docs/encoding#varints I can't understand how VarInt works, maybe somebody could help me? Thanks
Seems like Int function works incorrect sometimes. Int of binary data works fine on 1-byte data only. 2+ byte data always returns incorrect results. Int of 4-byte binary data and it's string representation: Int of 4-byte binary data returns bswap as result. Int64 of string representation of 4-byte binary data returns 32-bit signed integer. $bin = Binary('0xff'); 1 BYTES MsgBox(524288, BinaryLen($bin) & ' ' & VarGetType($bin) & ' bytes', 'HEX: ' & $bin & @LF & 'Int: ' & Int($bin) & @LF & 'Int32 <- String: ' & Int(String($bin), 1) &
Hello everyone, Again here with my new question. I do have a value what is "text" string, what i read from memory adress, but i do not understand when i convert it, why i geting only the first 4 letter from the word... I was reading how does it storeing in memory, but i am not 100% sure, i did understand right. Anyone can explain how does it work? Or why i get only the first 4 letter only? Ps.: Useing Nomadmemory. BinaryToString($MemRead, 1), 0, 0 The valuse is correct, if i do not convert it at all, but the valuse includeing only numbers. I tried different convert way, but not
DllStructGetSize byte size
FireFox posted a topic in AutoIt General Help and SupportHi, I don't understand how the size of the structure works. I know that an int has a size of 4 bytes, if I get the size of the struct then I have 4 bytes; a byte has as size of 1 byte, if I get the size of the struct then I have 1 byte. Until here everything seems fine, unless I make a structure with the two elements, the size is 8 bytes; 4+1=5 and not 8. Here is the example : #include <Constants.au3> Local Const $tagSTRUCT1 = "struct;int var1;endstruct" Local $tSTRUCT1 = DllStructCreate($tagSTRUCT1) MsgBox($MB_SYSTEMMODAL, "", "Struct1 Size: " & DllStructGetSize($tSTRUCT1
Title says it all. I'm trying to communicate with a server, where the first two bytes are an u16 of the length of the packet. But I have no idea how to go to u16...in order to send it over TCP... Anyone know how? Thanks in advance.