Sheri | 1 Nov 2007 05:10
Picon

Re: Problem controlling floating bar

--- In power-pro@..., "brucexs" <bswitzer <at> ...> wrote:
>
> --- In power-pro@..., "Sheri" <sherip99 <at> > wrote:
> >
> > I'm having some trouble with automatically positioning a floating
> > bar. The bar initially has a right caption position. It is
> > autoshown upon use in a script of 
> > 
> > cl.import(kbfile)
> > cl.show(bname)
> > 
> > (where kbfile is an ini file for a bar named bname).
> > 
> > What I want to do is change the bar to floating, but have its
> > initial position be unchanged.
> > 
> > I tried adding:
> > 
> > local myrec=win.getrect(bname)
> > 
> > win.getrect is documented as returning left top right bottom
> > whereas
> > cl.setrect is documented as needing cl, top, left, right, bottom
> 
> 
> Doc is wrong.  setrect uses left top right bottom too.
> 
> You may have to close bar, reset to float and pos, then show bar.
> > 
> > So I tried manipulating myrec to look like what cl.setrect uses
(Continue reading)

Sheri | 1 Nov 2007 05:39
Picon

Re: Problem controlling floating bar

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:

> I neglected to mention the ini file format sets horizontal and
> vertical offsets. Apparently they are not accounted for by
> win.getrect. I found that it works if I name those in NewProperties
> (same offset figures that are in the ini file with RightCaption)
> 
> local myrec=win.getrect(bname)
> cl.NewProperties(bname, "Format1=Position: Floating HOffset: -40
> VOffset: 32")
> win.setrect(bname, myrec)
> 
> in order to use cl.setrect it needs:
> cl.setrect(bname, word(myrec, 1, " "), word(myrec, 2, " "),
> word(myrec, 3, " "), word(myrec, 4, " "))
> 
> No need to close and reshow the bar with either of the setrect
> alternatives.
> 

Its not doing what I hoped. The ini file has a ContextIf that ties the
bar to a specific active program/window. If (after the bar has been
made floating) I move it using its Drag item, then activate another
window, the bar's current postition is not retained when the original
window is reactivated. It is still "floating" but its returned to the
original position.

Regards,
Sheri

(Continue reading)

Sheri | 1 Nov 2007 15:04
Picon

Re: Problem controlling floating bar

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
> 
> Its not doing what I hoped. The ini file has a ContextIf that
> ties the bar to a specific active program/window. If (after the
> bar has been made floating) I move it using its Drag item, then
> activate another window, the bar's current postition is not
> retained when the original window is reactivated. It is still
> "floating" but its returned to the original position.

If I use cl.AddProperties instead of cl.NewProperties, and use
cl.refresh(bname) afterwards, the bar behaves as a floating bar and
retains its position after dragging. But it doesn't respond to either
form (win or cl) of setrect. After the initial change to floating the
bar goes somewhere near the middle of the window instead of staying
near the right caption. If not refreshed after the change in
properties, it stays near the right caption but does not function
correctly as a floating bar.

I also tried this instead of using setrect, which I'm not sure it was
what was being suggested by the docs (the bar still moved to near the
center of the window after cl.refresh(bname)):

cl.AddProperties(bname, "Format1=Position: Floating Left:
"++word(myrec, 1, " ")++" Right: "++word(myrec, 1, " ")++ " Bottom:
"++word(myrec, 1, " ")++" Top: "++word(myrec, 1, " "))

Regards,
Sheri

Attention: PowerPro's Web site has moved: http://www.ppro.org 
(Continue reading)

Sheri | 1 Nov 2007 15:05
Picon

Re: Problem controlling floating bar

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> --- In power-pro@..., "Sheri" <sherip99 <at> > wrote:
> > 
> > Its not doing what I hoped. The ini file has a ContextIf that
> > ties the bar to a specific active program/window. If (after the
> > bar has been made floating) I move it using its Drag item, then
> > activate another window, the bar's current postition is not
> > retained when the original window is reactivated. It is still
> > "floating" but its returned to the original position.
> 
> If I use cl.AddProperties instead of cl.NewProperties, and use
> cl.refresh(bname) afterwards, the bar behaves as a floating bar and
> retains its position after dragging. But it doesn't respond to either
> form (win or cl) of setrect. After the initial change to floating the
> bar goes somewhere near the middle of the window instead of staying
> near the right caption. If not refreshed after the change in
> properties, it stays near the right caption but does not function
> correctly as a floating bar.
> 
> I also tried this instead of using setrect, which I'm not sure it was
> what was being suggested by the docs (the bar still moved to near the
> center of the window after cl.refresh(bname)):
> 
> cl.AddProperties(bname, "Format1=Position: Floating Left:
> "++word(myrec, 1, " ")++" Right: "++word(myrec, 1, " ")++ " Bottom:
> "++word(myrec, 1, " ")++" Top: "++word(myrec, 1, " "))

(except they weren't all ones -- still didn't work)

(Continue reading)

Sheri | 1 Nov 2007 16:38
Picon

Re: Problem controlling floating bar

I don't think win.getrect(bname) (or win.left, win.top, win.right or
win.bottom, each of which return values consistent with win.getrect)
is returning the true location of a bar. If, after importing the ini
(where properties position the bar as RightCaption with offsets), I
use win.mouseto(win.right(bname), win.bottom(bname)) the mouse pointer
goes near the center of the window instead of near the lower right
edge of the bname bar.

Regards,
Sheri

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! 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 Nov 2007 19:24
Picon

Re: Problem controlling floating bar

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
>
> I don't think win.getrect(bname) (or win.left, win.top, win.right
> or win.bottom, each of which return values consistent with
> win.getrect) is returning the true location of a bar. If, after
> importing the ini (where properties position the bar as
> RightCaption with offsets), I use win.mouseto(win.right(bname),
> win.bottom(bname)) the mouse pointer goes near the center of the
> window instead of near the lower right edge of the bname bar. 

In fact the win plugin services find the bar at
left:546 top:502 right:757 bottom:521

whereas other windows utilities like winspector see it at
left: 825 top: 148 right: 1036 bottom: 167

The width and height which compute from the win plugin's coordinates
are correct but the position is wrong; the X-coordinates are too low
by 279 and the Y-coordinates are too high by 354. If I maximize the
active window where bname is initially displayed near the rightcaption
and retest getting the bar's coordinates, the bar loads higher on the
screen but the win plugin still reports:

left:546 top:502 right:757 bottom:521

This increases the variance e.g., the initial position per winspector
becomes:

left: 937 top: 33 right: 1148 bottom: 52

(Continue reading)

Sheri | 1 Nov 2007 22:41
Picon

Re: Problem controlling floating bar

--- In power-pro@..., "Sheri" <sherip99 <at> ...> wrote:
> 
> left: 937 top: 33 right: 1148 bottom: 52
> 
> Any alternative methods that would allow the script to get the
> bar's true screen coordinates? I've confirmed that If I provide
> the winspector identified coordinates with cl.addproperties for
> Left:, Top:, etc., the bar behaves correctly when converted to a
> floating bar . At least when followed by cl.refresh(bname).
> 

I got it (at least within 1 pixel in every direction)!

Before using the win plugin to get the bar's coordinates, I have to
disable the ContextIf item.

cl.show(bname)
cl.SetEnabled(bname, 1, 1)
cl.refresh(bname)
local myleft=win.left(bname)
local mytop=win.top(bname)
local myright=win.right(bname)
local mybottom=win.bottom(bname)
cl.SetEnabled(bname, 1, 0)
cl.refresh(bname)
win.debug("left:"++myleft++" top:"++mytop++" right:"++myright++"
bottom:"++mybottom)

gives:
left:936 top:32 right:1147 bottom:51
(Continue reading)

philipp_l_kiefer | 2 Nov 2007 19:56
Picon

Re: Keytrap and Mousetrap unpredictably stop working

I sometimes experience the same problem and have found the following
solution:

In my experience, when KeyTrap / MouseTrap "freeze", it is usually
caused by a key becoming "virtually stuck". I have since set a button
one of my bars to display: "*Info expr (KeyTrap.GetPressedKeys)".
During proper operation, this only shows the numbers of the keys while
they are being pressed, once all keys are released, all numbers
disappear. Occasionally, however, KeyTrap/PowerPro (or Windows?) seems
to miss out on some key or other being released and considers it to be
held perpetually. In this instance, the number of a certain key will
be permanently displayed and both KeyTrap and MouseTrap will cease
working properly.

Once you notice this, you can fix it easily by executing (why not set
it as a command to the same *info button?) "KeyTrap.ResetKeys": All
numbers should be cleared and the plugins should function properly again.

I hope this works for you, too. I agree it would be great if somebody
could eliminate the cause of this annoyance.

Other than that, since it seems development of PowerPro is coming to
an end, I also wish to thank Bruce from my heart - I've benefited from
his work since the late days of Stiletto and like someone said
earlier, my computer experience has been made immeasurably more
agreeable and enjoyable. Thanks!

Philipp

--- In power-pro@..., "i_karaguz" <i_karaguz <at> ...> wrote:
(Continue reading)

Sheri | 2 Nov 2007 23:24
Picon

invalid service function for cl: addleftcmd

addLeftCmd is documented, but it doesn't seem to work. I get this
error message:

invalid service function for cl: addleftcmd

Regards,
Sheri

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! 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@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
(Continue reading)

brucexs | 3 Nov 2007 00:29
Picon
Favicon

Re: invalid service function for cl: addleftcmd


> invalid service function for cl: addleftcmd
> 
> Regards,

try cl.addleft

> Sheri
>

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! 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)


Gmane