sendKey

Gandalf goldnery at gmail.com
Sat Jun 7 13:39:17 CEST 2008


I found some script that send keys , But I couldn't  manage to send
CTRL+c with none of them

can any one tell me what i'm doing wrong:

import win32api
import win32com.client

shell = win32com.client.Dispatch("WScript.Shell")
shell.Run("Notepad")
win32api.Sleep(100)
shell.AppActivate("Notepad")
win32api.Sleep(100)
shell.SendKeys("112435435")
win32api.Sleep(100)

shell.SendKeys("^a") # that wouldn't select all
win32api.Sleep(100)
shell.SendKeys("^c")# that wouldn't copy




import SendKeys
SendKeys.SendKeys("""^c""")


Thank you!




More information about the Python-list mailing list