Is there a way to send keyboard keys to other windows?

Keith (Gulf Breeze Ortho Lab) keith at gulfbreezeortholab.com
Tue Sep 27 18:16:33 EDT 2011


Thanks Andy.

-----Original Message----- 
From: AndyP
Sent: Tuesday, September 27, 2011 10:10 AM
To: use-revolution at lists.runrev.com
Subject: Re: Is there a way to send keyboard keys to other windows?

Ok I've been looking at AutoIt and the AutoIt script below will :

1. Check to see if Firefox is running, if not open a new instance.
2. Open a new tab and load a url.


--------------------------------------------------------
;~ Check if Firefox open

If Not ProcessExists("Firefox.exe") Then
    Run(@ProgramFilesDir & "\Mozilla Firefox\Firefox.exe", "", @SW_MAXIMIZE)
;~ Allow time for the browser to load
sleep(5000) ;- 5 secs
EndIf

;~ Make Firefox the active window

Opt("WinTitleMatchMode",2)
WinActivate("Firefox","")

;~ Define url to load in new tab & Send Ctrl+t keystrokes

Dim $adress="www.pointandsee.co.uk"
Send("^t")
Send($adress)
Send("{ENTER}")
--------------------------------------------------------


Compile this into a standalone with AutoIt, then use LiveCode shell start to
run tah exe.



-----
Andy Piddock


My software never has bugs. It just develops random features.
PointandSee is a FREE simple but full featured under cursor colour picker / 
finder.
http://www.pointandsee.co.uk - made with LiveCode (v1.4.1 released 
26/08/2011)
--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Is-there-a-way-to-send-keyboard-keys-to-other-windows-tp3846582p3847791.html
Sent from the Revolution - User mailing list archive at Nabble.com.

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode 





More information about the use-livecode mailing list