kann ich mit PureBasic einem anderen Task / Programm z.B Word Tastaturbefehle zuschicken ?
Und wenn ja, wie ?
ARGHHH!Andre hat geschrieben:Siehe Beispiel SendKeys von Danilo
Code: Alles auswählen
; This block gives the target window the focus before typing.
thread1=GetWindowThreadProcessId_(GetForegroundWindow_(),0)
thread2=GetWindowThreadProcessId_(handle,0)
If thread1<>thread2 : AttachThreadInput_(thread1,thread2,#True) : EndIf
If IsZoomed_(handle) = #False : ShowWindow_(handle,#SW_MAXIMIZE) : EndIf
SetForegroundWindow_(handle) ; Target window now has the focus for typing.
Sleep_(250) ; 1/4 second pause before typing to prevent fast CPU problems.