Hi Steve,

sure, they can communicate to the com engine, as they do to axecute built-in
WE commands.
I will have a look how to create shared objects and methods with WE, if I
remember it well Chip covered it in one of his lessons.

Many thanks,
   Ralf

Ralf Heinrich Kefferpuetz
Web: http://www.keffi.eu
Facebook: http://www.facebook.com/Keffi.eu
Germany


-----Original Message-----
From: Stephen Clower [mailto:[email protected]] 
Sent: Tuesday, May 22, 2012 4:37 PM
To: [email protected]
Subject: Re: calling WE functions or hotkeys from an external program

Ralf,

Are they able to communicate directly with the Window-Eyes COM engine? 
If so, i think making a shared object with methods for executing your 
specialized commands will, in the long run, be the best solution.

Steve



On 5/22/2012 10:11 AM, Ralf Kefferpuetz wrote:
> Aaron,
>
> I wrote some apps for a company here in Germany they use to make life
easier
> for their WE clients.
> This company also has a program developed which combines important steps
of
> work tasks in a single application, regardless what screen reader the
client
> prefers to use. That means that the user learns to handle their
application
> rather than knowing about each single command in a screen reader.
> In the apps I developed are some tasks or functions which we want to
> integrate into their application. I'm not speaking about standart build-in
> commands like read line, read word, speak date and time, I refer only to
my
> developed apps, their functions or may be their hotkeys. But since an app
> designed hotkey does not have an unique hotkey number, I was wondering how
> to accomplish this task.
>
> Hope this makes it a bit more clear.
>
> Cheers,
>    Ralf
>
> Ralf Heinrich Kefferpuetz
> Web: http://www.keffi.eu
> Facebook: http://www.facebook.com/Keffi.eu
> Germany
>
>
> -----Original Message-----
> From: Aaron Smith [mailto:[email protected]]
> Sent: Tuesday, May 22, 2012 3:07 PM
> To: [email protected]
> Subject: Re: calling WE functions or hotkeys from an external program
>
> What, exactly, are you wanting to accomplish, Ralf? I know you
> originally said, "I'm looking for a way to call hotkeys, or functions,
> from WE apps in an external program." But what is the intent behind that
> question? Knowing that would help us provide a more applicable answer.
>
> Aaron
>
> On 5/22/2012 8:13 AM, martin webster wrote:
>> Hi Ralf,
>> You could all so execute a window-eyes hotkey like so:
>> Begin snippet:
>> Set we = CreateObject("WindowEyes.Application")
>> wscript.Sleep 500
>> we.Speech.Silence()
>> wscript.Sleep 500
>> we.ActiveSettings.Hotkeys.Item(53).Execute
>> wscript.Sleep 1000
>> we.Speech.Speak "all done exiting script"
>>
>> I prefer this method as I can't get the ExecuteHotkey method of the
> application object to work in an external script.
>> Warm regards.
>> Martin Webster.
>> I.T. team leader for Kirklees visual impairment network.
>> --- On Tue, 5/22/12, Ralf Kefferpuetz<[email protected]>
> wrote:
>>
>>> From: Ralf Kefferpuetz<[email protected]>
>>> Subject: RE: calling WE functions or hotkeys from an external program
>>> To: [email protected]
>>> Date: Tuesday, May 22, 2012, 7:29 AM
>>> Thanks a lot Chip!
>>> Yes, I did know of this possibility for WE build-in
>>> functionality and was
>>> hoping that there are ways to do the same for apps hotkeys
>>> or functionality.
>>> Martin his suggestion will work for now.
>>>
>>> Best regards,
>>>     Ralf
>>>
>>> Ralf Heinrich Kefferpuetz
>>> Web: http://www.keffi.eu
>>> Facebook: http://www.facebook.com/Keffi.eu
>>> Germany
>>>
>>>
>>> -----Original Message-----
>>> From: Chip Orange [mailto:[email protected]]
>>>
>>> Sent: Tuesday, May 22, 2012 1:24 AM
>>> To: [email protected]
>>> Subject: RE: calling WE functions or hotkeys from an
>>> external program
>>>
>>> Hi Ralph and Martin,
>>>
>>> As far as I know, Martin's example is the best way to do
>>> this when you have
>>> a specific keystroke you'd like executed (especially if that
>>> keystroke
>>> activates some app's functionality).
>>>
>>> I just wanted to mention there is an alternative, when what
>>> you want done is
>>> to execute some built-in WE functionality; this alternative
>>> is especially
>>> useful when people may have changed the hotkey associated
>>> with the
>>> functionality.  In my example below, I show how you
>>> could execute some WE
>>> functionality (such as read line) not by inserting the
>>> keystroke usually
>>> used to read a line (control numericpad center), but by
>>> telling WE to
>>> execute the functionality by its name instead of by the
>>> keystroke:
>>>
>>> Set we = CreateObject("WindowEyes.Application")
>>> WE.application.executeHotkey hkLine ' this does the same as
>>> inserting a
>>> control-numericpad center
>>>
>>> hth,
>>>
>>> Chip
>>>
>>>
>>>> -----Original Message-----
>>>> From: martin webster [mailto:[email protected]]
>>>> Sent: Monday, May 21, 2012 3:50 PM
>>>> To: [email protected]
>>>> Subject: RE: calling WE functions or hotkeys from an
>>> external program
>>>> Hi Ralf,
>>>> Try this, I'm not sure if this is what you want, but
>>> this
>>>> snippet will execute the hotkey insert "t", the time
>>> and date
>>>> window-eyes hotkey running as an external app written
>>> in
>>>> VBScript. Just press enter on what ever you decide to
>>> call
>>>> the snippet and it should run. you need window-eyes 7.5
>>> to
>>>> run this though.
>>>> begin snippet:
>>>> Set we = CreateObject("WindowEyes.Application")
>>>> set MyHotkey = we.Keyboard.Key("Insert-t")
>>> wscript.Sleep 2000
>>>> MyHotkey.Insert()
>>>> wscript.Sleep 1000
>>>> we.Speech.Speak "all done exiting script"
>>>>
>>>> Hope this helps.
>>>> Warm regards.
>>>> Martin Webster.
>>>> I.T. team leader for Kirklees visual impairment
>>> network.
>>>>
>>>> --- On Mon, 5/21/12, Ralf Kefferpuetz
>>>> <[email protected]>
>>> wrote:
>>>>> From: Ralf Kefferpuetz<[email protected]>
>>>>> Subject: RE: calling WE functions or hotkeys from
>>> an
>>>> external program
>>>>> To: [email protected]
>>>>> Date: Monday, May 21, 2012, 4:04 PM
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>
>

-- 
Stephen Clower
Product support specialist & App Development
GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

Reply via email to