Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a python script, and I need to run this with shift-f1 key. I used his script.

Run "c:\bin\python27\python e:/"
Send !{Space}ep

However, I got this error message.

enter image description here

What's wrong with the script?

share|improve this question
Somewhat unrelated note: Instead of sending !{Space}ep, you could use win32clipboard to read the clipboard contents. – grawity Sep 15 '11 at 16:10
@grawity : I did that to emulate '^V' as is answered in… - it doesn't work though. – prosseek Sep 15 '11 at 16:20
I know what !{Space}ep does. I also know that there are better ways to do the same thing than sending keypresses. – grawity Sep 15 '11 at 16:26
up vote 1 down vote accepted

Try removing the quotes from your Run argument. It could be that AHK is attempting to run a file named python e:/, instead of just python. (The path to your .py file is a separate argument, and should not need to be quoted.)

share|improve this answer
Thanks for the answer. BTW, could you hint me why the print string in python isn't shown in the console? I asked about it in another post -… – prosseek Sep 16 '11 at 19:14
if there is anyone who have understood what grawity is hinting at please tell, what is the actuall code that will make an interpreter run a .py file – user2673238 Aug 28 '15 at 15:49

One thing what I found in running python script is that I needed to insert Sleep 100 before running the other AHK script.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .