Jump to content

How to return a string value to python code from autoit script


vikashbitm2010
 Share

Recommended Posts

Hi all,

I want to return string from autoit script to the python code.

Autoit:

Exit("22 FE 45") -> not working

Exit(1) -> Working

Exit(0) -> Working

python:

import os

res=os.system(autoitmine.exe)

print "res",res

I got some hint of @ExitCode macro, but dont know how to use it to get the string in python variable 'res'.

Please resolve this issue for me if anyone knows about this.

 

Link to comment
Share on other sites

Hello. you only can return an Integer using Exit.

 

For return 22FE45  you could do something like this

AutoIt

Exit(2293317) ;0x22FE45

 

Python:

print("%0.6X" % res)

 

Saludos

 

Edited by Danyfirex
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

×
×
  • Create New...