Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

+F1::
Run "c:\bin\python27\python e:/copytimeinbuffer.py"
Send !{Space}ep
Return

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 superuser.com/questions/196631/… - 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

2 Answers 2

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:/copytimeinbuffer.py, 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 - superuser.com/questions/336509/… –  prosseek Sep 16 '11 at 19:14

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.