Hello Bruce,
many thanks for that. Let me make myself a bit more clear. What I want to
achieve is the following:
1) I have WE apps running with hotkeys assigned to their functions, which is
a normal app hotkey behavior. The user can execute these functions by
pressing the defined hot key.
2) now I want to execute this functions from an external program either by
firing the hotkey or by calling the global function in the app
In your example you are using the version method, which comes directly from
the WE object, but how to execute an app defined hotkey or global function?
Here is a small example, see this tiny app:
Set myHotkey = Keyboard.RegisterHotkey("Control-f12", "InsertDate")
function InsertDate()
Keyboard.InsertString Time & " on " & FormatDateTime(Date,1)
End function
Now, is it possible to fire the Control-F12 hotkey or the function
InsertDate() from within a program?
I'm not sure if I could make it a bit more clear.
Regards,
Ralf
Ralf Heinrich Kefferpuetz
Web: http://www.keffi.eu
Facebook: http://www.facebook.com/Keffi.eu
Germany
-----Original Message-----
From: BT [mailto:[email protected]]
Sent: Monday, May 21, 2012 4:12 PM
To: [email protected]
Subject: Re: calling WE functions or hotkeys from an external program
Hi Ralf,
Just use the create object from your calling app in the format such as
below. This is the python comtypes call and what ever you use as your com
types method is the format you must use.
Note the individual method is after the first period.
WeTts = CreateObject( "windoweyes.application")
weVersion = WeTts.Version
WeTts.Speech.Speak (" The version of we is: %s" % weVersion)
Sent: Monday, May 21, 2012 4:10 AM
Subject: calling WE functions or hotkeys from an external program
Hi all,
I'm looking for a way to call hotkeys, or functions, from WE apps in an
external program.
An example for reading the active window would be:
WindowEyes.Application.ExecuteHotkey(130)
So, can an app register an unique hotkey ID?
Are there other ways to access an function in a public running app?
Many thanks for your ideas,
Ralf
Ralf Heinrich Kefferpuetz
Web: http://www.keffi.eu
Facebook: http://www.facebook.com/Keffi.eu
Germany