kcvinu Posted January 17, 2015 Share Posted January 17, 2015 Hi there, I have installed pywin32 in my pc. And i wrote this code >>> import win32com.client >>> autoit = win32com.client.Dispatch("AutoItX3.Control") >>> autoit.Run("calc.exe") But it is showing this error message. "Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> autoit.Run("calc.exe")" Please help. Complete error message is in an image with this post. Please see attachment Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Bert Posted January 17, 2015 Share Posted January 17, 2015 Use AutoIt as intended. NOT in Python. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 17, 2015 Moderators Share Posted January 17, 2015 (edited) Use AutoIt as intended. NOT in Python. Seriously Bert? @kcvinu Try to use unicode strings: autoit.Run(u"calc.exe") You may need the full path though . Edited January 17, 2015 by SmOke_N kcvinu 1 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
kcvinu Posted January 17, 2015 Author Share Posted January 17, 2015 Hi SmOke_N Thanks. Let me try. I am afraid, most of the AutItX3 functions are not listed in the intellisense of python shell. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
kcvinu Posted January 17, 2015 Author Share Posted January 17, 2015 @SmOke_N, No way. It's not working. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 17, 2015 Moderators Share Posted January 17, 2015 Are you using pyAutoIt? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
kcvinu Posted January 17, 2015 Author Share Posted January 17, 2015 Hi SmOke_N, i tried that but not installing. First of all there is no exe file for it. We need to manually type code in cmd. It says that it can;t find a directory named pyAutoit. I dropped that idea and started with pywin32. Spoiler My Contributions Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language. UDF Link Viewer --- A tool to visit the links of some most important UDFs Includer_2 ----- A tool to type the #include statement automatically Digits To Date ----- date from 3 integer values PrintList ----- prints arrays into console for testing. Alert ------ An alternative for MsgBox MousePosition ------- A simple tooltip display of mouse position GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function Access_UDF -------- An UDF for working with access database files. (.*accdb only) Link to comment Share on other sites More sharing options...
Bert Posted January 17, 2015 Share Posted January 17, 2015 Seriously Bert? @kcvinu Try to use unicode strings: autoit.Run(u"calc.exe") You may need the full path though . sorry. read it wrong. My bad. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
dengpeiyou Posted January 23, 2019 Share Posted January 23, 2019 REM used WIN7+python3.7, Other situations configure yourself ::online install ::pip install pywin32 ::pip install pypiwin32 ::offline install pip install pypiwin32-223-py3-none-any.whl pip install pywin32-224-cp37-cp37m-win_amd64.whl ::copy and reigist module copy "C:\Program Files (x86)\AutoIt3\AutoItX\AutoItX3_x64.dll" C:\windows\system32 regsvr32 /s AutoItX3_x64.dll #paython call #coding:utf-8 import win32com import win32com.client autoit = win32com.client.Dispatch("AutoItX3.Control") autoit.Run("calc.exe") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now