Jump to content

Python code to Autoit


 Share

Recommended Posts

Hello, I'm trying to change some python code to Autoit but I have no idea how to do it, maybe someone can help me out.

Python code:

image_data = open("Picture.jpg","rb").read()
print(image_data)

The result code should look like this:

"b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x02\x00\x00\x01\x00\x01\x00\x00\xff\xed\x00\x9cPhotoshop 3.0\x008BIM\x04\x04\x00\x00\x00\x00\x00\x80\x1c\x02g\x00\x146hl6KWz7Hv8Zch0ROlYH\x1c\x02(\x00bFBMD01000ac00300001d1000004a2000008e22000022250000af2b0000da4000007743000076470000304b0000b7780000\xff\xe2\x02\x1cICC_PROFILE\x00\x01\x01\x00\x00\x02\x0clcms\x02\x10\x00\x00mntrRGB XYZ \x07\xdc\x00\x01\x00\x19\x00\x03\x00)\x009acspAPPL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf6\xd6\x00\x01\x00\x00\x00\x00\xd3-lcms\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ndesc\x00\x00\x00\xfc\x00\x00\x00^cprt\x00\x00\x01\\\x00\x00\x00\x0bwtpt\x00\x00\x01h\x00\x00\x00\x14bkpt\x00\x00\x01|\x00\x00\x00\x14rXYZ\x00\x00\x01\x90\x00\x00\x00\x14gXYZ\x00\x00\x01\xa4\x00\x00\x00\x14bXYZ\x00\x00\x01\xb8\x00\x00\x00\x14rTRC\x00\x00\x01\.................

I need to get the same results with Autoit but I don't even know what code is that.

Link to comment
Share on other sites

The python interpreter is converter the binary content of Picture.jpg into a string literal and then printing it. Refer to the python docs for string literals (or strings) and their escape sequences :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

1 hour ago, TheDcoder said:

The python interpreter is converter the binary content of Picture.jpg into a string literal and then printing it. Refer to the python docs for string literals (or strings) and their escape sequences :)

Thanks

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...