WD The SendKey function - Abra um aplicativo e mande para ele comandos como o bloco de notas e calculadora e consiga interagir com eles com esse exemplo
ShellExecute("notepad.exe")
hDestination is int
hDestination = FindHandle("Notepad")
IF hDestination = 0 THEN
RESULT False
END
sSend is string = EDT_NOTEPAD
sSend=Replace(sSend,"+","{+}")
sSend=Replace(sSend,"^","{^}")
sSend=Replace(sSend,"%","{%}")
sSend=Replace(sSend,"(","{(}")
sSend=Replace(sSend,")","{)}")
// Send the sequence
IF NOT SendKey(sSend,hDestination) THEN
Error("Pb while sending the sequence "+EDT_NOTEPAD)
RESULT False
ELSE
RESULT True
END
tRecipient is int
tRecipient = FindHandle("NotePad")
// Sends the Alt-F4 sequence to the application to close it
IF NOT SendKey("%{F4}",tRecipient) THEN
Error("Pb while sending the sequence %{F4}")
RESULT False
ELSE
RESULT True
END