Jump to content

HoratioCaine

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by HoratioCaine

  1. I have read the help file on Send. And I found a similar topic < But I still can not find the reason. What happens in the execution code “Send('#r', 0)” ?
  2. 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. (2) run with xxxxxx.exe (renamed from python.exe, you can rename whatever you like) work success 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 )
  3. Sorry, I didn't. The information I can get is the title, and I want to operate the window that was last activated. When the AU3_WinKill function does not work for the first time, execute AU3_WinKill again, and it will succeed. But I dont know When to succeed and when to fail···
  4. Hi, everyone. I have python code for kill window, but sometimes it does not working . My code is : import subprocess import time import ctypes au3_dll = ctypes.windll.LoadLibrary(r'D:\AutoIt\AutoItX3.dll') def close_ie(title): subprocess.Popen(f"C:/Program Files (x86)/Internet Explorer/iexplore.exe https://cn.bing.com/?mkt=zh-CN") time.sleep(2) au3_dll.AU3_Opt("WinTitleMatchMode", 2) ret = au3_dll.AU3_WinKill(title, "") print(ret) if __name__ == '__main__': title = '必应 - Internet Explorer' for i in range(10): close_ie(title) My expectation is that all IE windows will be closed, but there will always be a few windows still there. My env: win10 64bit python3.6.4 autoit v3.3.14.2 Any suggestions would be appreciated
  5. I want to send the Windows logoff command, but I can not make it.
  6. Hi, I want to `send('#L') ` , and it does not work. I read the documentation, and can not found the reason. It only says that it is not allowed to simulate ctrl+alt+delete. How can I make it? BEST WISHES~
×
×
  • Create New...