Sign in to follow this  
Followers 0
octus

Ruby "pack" functionality in AutoIt

4 posts in this topic




Can you give an example please?
Thank you. 

Share this post


Link to post
Share on other sites

$a = 45
StringToBinary(Int($a, 1), 3)

I can't remember to be honest, but pack('N') is 32 bit Big endian right?

I don't know... that returns 0x00340035 though.

Share this post


Link to post
Share on other sites
Hi Andreu, 
 
Thank you for your reply.
 
Yes the directive "N" meaning  32-bit unsigned, network (big-endian) byte order. I'm trying with your example but I think the result is different from that obtained with Ruby:
 
The output with Ruby is: 000000-    
The output with your AutoIt code:  004005
 
* The 00 is null (ASCII)

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  
Followers 0