--- In [email protected], "Sheri" <[EMAIL PROTECTED]> 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
Then:
cl.AddProperties(bname, "Format1=Position: Floating Left: "++myleft++"
Right: "++myright++" Bottom: "++mybottom++" Top: "++mytop++" HOffset:
0 VOffset: 0")
cl.refresh(bname)
quit
Now does exactly what I wanted. Sorry for so many messages.
Regards,
Sheri