p.renfrew | 1 Oct 2009 01:58
Picon
Favicon

Re: Windows 7 "show desktop" and stick to desktop

--- In power-pro@..., "brucexs" <bswitzer <at> ...> wrote:
>
> --- In power-pro@..., "p.renfrew" <p.renfrew <at> > wrote:
> >
> > --- In power-pro@..., "brucexs" <bswitzer <at> > wrote:
> > > > 
> > > > Can I easily create a script loop that only runs while my bar is running and restores if state is minimized?
> > > > 
> > > > 
> > > Maybe (not tested)
> > > event.create(500, 0, "if(win.minned(?=Myclist=)\rwin.show(?=myclist=,1)")
> > 
> > I have discovered that this can not work because PPro is a WS_EX_TOOLWINDOW. The method does work in a
sample dialog app if it isn't a toolWindow (it then receives WM_WINDOWPOSCHANGED which can immediately
restore the window).
> > 
> > Show Desktop (IShellDispatch4.ToggleDesktop()), will minimize all minimizable windows by forcing a
"ShowWindow(SW_MINIMIZE)", but toolWindows do not move; the desktop is activated and placed in front of
them.  That is why windows with (WS_EX_TOPMOST | WS_EX_TOOLWINDOW) will remain after a "Show Desktop",
along with those that have the desktop as a parent.
> > 
> > But, I can't think of a ppro event and function that would allow me to bring ppro in front of the desktop if
(and only if) the desktop comes in front of it.
> >
> 
> If you know PowerPro bar overlaps position x, y on desktop, then if mainhandlefrompoint(x,y) is not the
powerpro bar, can you move the bar back on top with win.showna(no activate) or failing that do a
setwindowpos with dll.call as a test (I can throw setwindopos into win plugin if dll.call works and you
don't want to rely on distributing dll plugin).
>
(Continue reading)

swzoh | 1 Oct 2009 02:39
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "entropyreduction"
<alancampbelllists+yahoo <at> ...> wrote:
>
> But it's your understanding that this would also work for other window classes?  If so, is there a way of
determining which window class will return which interface type?

AFAIK, no, OBJID_NATIVEOM is exclusively used by Office applications. Looks like the (old) RichEdit
control had a root in Office. Actually the main usage of AccessibleObjectFrom... is to obtain
IAccessible interface, usually via OBJID_CLIENT in case of Window. Many standard controls, over > 30 I
think, support IAccessible, even Firefox/Thunderbird do. This interface can be used as a screen reader etc.

> In particular that applied to a rich edit control it will return a IRichEditOle?

I've never tried to obtain IRichEditOle, so, I don't know if there is a way for it atm.

> Your IID_IDispatch parameter above would have to be replaced with text so Powerpro could understand it. 
If I can make this work I'll probably start with no option, and you always get a IID_IDispatch; if that works
I can provide predefined strings to map onto IAccessible, IDispatch, IEnumVARIANT, IUnknown, etc.
>

That seems reasonable.

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
(Continue reading)

swzoh | 1 Oct 2009 02:41
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> I have struggled without solving how to get an interface pointer using AccessibleObjectFromWindow from
Oleacc.dll via the dll plugin. My code crashes Powerpro (is run with dialog general viewer richedit open
and global RE_TEST_HWND set to the control's hwnd). The error says something like the memory at the
referenced address couldn't be written.
> 

Why did you use lpstr? Have you tried uint* instead?

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    power-pro-unsubscribe@...
(Continue reading)

swzoh | 1 Oct 2009 03:10
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> I have struggled without solving how to get an interface pointer using AccessibleObjectFromWindow from
Oleacc.dll via the dll plugin. My code crashes Powerpro (is run with dialog general viewer richedit open
and global RE_TEST_HWND set to the control's hwnd). The error says something like the memory at the
referenced address couldn't be written.
> 

I think you can just use ... uint*", ..., "pobj")

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    power-pro-unsubscribe@...
(Continue reading)

entropyreduction | 1 Oct 2009 06:47

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "swzoh" <seanzoh <at> ...> wrote:

> AFAIK, no, OBJID_NATIVEOM is exclusively used by Office applications. Looks like the (old) RichEdit
control had a root in Office. Actually the main usage of AccessibleObjectFrom... is to obtain
IAccessible interface, usually via OBJID_CLIENT in case of Window. Many standard controls, over > 30 I
think, support IAccessible, even Firefox/Thunderbird do. This interface can be used as a screen reader etc.

Yeah, been reading up on it.  There's a few useful methods
obtainable via IAccessible, as opposed to more specialised interface, so probably worth offering that option.

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    power-pro-unsubscribe@...
(Continue reading)

entropyreduction | 1 Oct 2009 06:51

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> I had seen that too, but looking here:
> 
> <http://www.lw-tech.com/q1/ug_accessibility.htm>

Which quite wonderfully, in linked page, says there's a constant

  tomMarchingBlackAnts 

 
> I see richedit (richedit20w in the example) also associated with OBJID_NATIVEOM. Elsewhere I saw
richedit20a and richedit50 variants mentioned, can't find at the moment.

Okay, so sounds like most controls return an IAccessible, which might be of a small bit of usefulness. 
Office apps return their main 
COM interface, but that's obtainable via CreateObject/GetObject.  So that just leaves richedit
returning it's amusing TOM interface.

I'm muttering to myself: what's needed an elaboration to com plugin, or to richedit part of dialog plugin,
or both?

> Above link is referencing Active Accessibility SDK; don't know how AccessibleObjectFromWindow fits
into that.

Goodness knows, MS is forever repackaging stuff.

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links
(Continue reading)

swzoh | 1 Oct 2009 14:33
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "entropyreduction"
<alancampbelllists+yahoo <at> ...> wrote:
>
> Okay, so sounds like most controls return an IAccessible, which might be of a small bit of usefulness.

Hmm, you seem to not realize the importance of Accessibility. IMO, it'll become more and more important,
might become one of the central themes in near future, although the implementation itself evolves, like
to UI Automation etc.

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    power-pro-unsubscribe@...

(Continue reading)

Sheri | 1 Oct 2009 14:34
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "swzoh" <seanzoh <at> ...> wrote:
>
> --- In power-pro@..., "Sheri" <sherip99 <at> > wrote:
> >
> > I have struggled without solving how to get an interface pointer using AccessibleObjectFromWindow
from Oleacc.dll via the dll plugin. My code crashes Powerpro (is run with dialog general viewer richedit
open and global RE_TEST_HWND set to the control's hwnd). The error says something like the memory at the
referenced address couldn't be written.
> > 
> 
> I think you can just use ... uint*", ..., "pobj")
>

That gives an error, incompatible data type. If I make pobj into a pointer to an uint, it hangs and gives the
similar error about memory that couldn't be written. Thanks anyway.

Regards,
Sheri

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
(Continue reading)

swzoh | 1 Oct 2009 16:21
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> That gives an error, incompatible data type. If I make pobj into a pointer to an uint, it hangs and gives the
similar error about memory that couldn't be written. Thanks anyway.
> 

Actually the error is not on it. Looking at my old pp scripts, it seems to have to be:
local tdi = dll.call("Oleacc|AccessibleObjectFromWindow|ui ui t* ui*",
RE_TEST_HWND, dispatch, guid, "pobj")

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    power-pro-unsubscribe@...
(Continue reading)

swzoh | 1 Oct 2009 16:29
Picon

Re: Pointer to RichEdit TOM interface

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> That gives an error, incompatible data type. If I make pobj into a pointer to an uint, it hangs and gives the
similar error about memory that couldn't be written. Thanks anyway.
> 

Have you removed the declaration of pobj as struct? I think you should.
BTW, looking at my old pp scripts, what I may use seems to be:
dll.call("Oleacc|AccessibleObjectFromWindow|ui ui t* ui*",
RE_TEST_HWND, dispatch, guid, "pobj")

------------------------------------

Attention: PowerPro's Web site has moved: http://www.ppro.orgYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:power-pro-digest@... 
    mailto:power-pro-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
(Continue reading)


Gmane