Jump to content
Sign in to follow this  
octus

Ruby "pack" functionality in AutoIt

Recommended Posts

octus
Can you give an example please?
Thank you. 

Share this post


Link to post
Share on other sites
Andreu

$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
octus
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  

×