Jump to content

Recommended Posts

Posted (edited)

Hi, I am using python to call the Autoit function. I found a interesting problem.

env:  win10 64bit 
          python3.6.4  x86、    python3.8.6  x64
          autoit v3.3.16.0
code:

#filename: demo.py
from ctypes import windll
dll = windll.LoadLibrary(r"D:\it_tools\autoit\AutoIt3\AutoItX\AutoItX3_x64.dll")  # or AutoItX3.dll
dll.AU3_Send("#r", 0)

Behaviour:
      (1) run with the "python.exe" 

it will not open the run dialog, but input a "r" in the cmd window.

image.png.e3b8e515b06eba039e0e30d7c578bb5e.png
       (2) run with xxxxxx.exe (renamed from python.exe, you can rename whatever you like)

work success

E3521A81-239F-4e4c-9DB1-619AB336C31C.thumb.png.f85d5fa0e165d6bc313376f691c05470.png

image.png.7f879402443c720e17ea60b9a9bc141b.png

I dont know why it happened.   I think it shoule be related to Python and Autoit.  So I came here...
Can someone give me some advices.  Thanks a lot.

(by the way, My English is not very well... I wish I  have provided the enough information... If you need more details, please contact me    )

Edited by HoratioCaine
spelling mistake, more details

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
×
×
  • Create New...