Hi Paul
Snipping a few quotes to reply to:
PG> I love WinBarDual5.
Thanks for your interest. I considered that first version to be
a beta and almost completed the next version which is much less
"beta" - more like "release candidate" stage.
I haven't worked on it for a couple of months now because I got
distracted by other priorities.
Also, I find it is much quicker and easier to get something
working just fine on my system. It is more time-consuming
to make a releasable product because I have to consider all
the different display systems and PowerPro settings that
other users may have.
Your message has motivated me to revive the project and
complete it.
PG> Am I doing anything horribly wrong? Is there a better way?
I guess you can't do anything too horribly wrong. WinBar does not
contain any commands or routines which could harm your system.
It only has window related commands so the worst that can happen
is a window mysteriously disappearing off the visible screen
(which you could bring back on screen by using the "previous
target" menu, then the Centre button or whatever).
I think there might be a better way (not tested!).
I notice your script would make the Bar appear, then call
one of the script's @sections as if a bar button had been
clicked, then hide the bar. It would be neater to avoid
showing the bar.
Notice at the end of WinBarDual5.powerpro, in the group
of sections headed "-- calls from other scripts --"
this routine:
@SetStatic
assign(arg(1),arg(2))
quit
Instead of your:
.WinBarDual5(win.handle("under"))
[EMAIL PROTECTED](0,1)
Bar Hide WinBarDual5_bar
Try this instead:
[EMAIL PROTECTED]("zTarget",<newhandle>)
[EMAIL PROTECTED](0,1)
Instead of <newhandle> use: win.handle("under")
or: lastautorunhandle or: win.handle("autorun")
or any other expression for a handle.
Notice that your Bar Hide line is now not necessary.
That's because the method suggested above never starts
.WinBarDual5 from its first section (without an @)
so the bar is not shown.
Similarly, instead of [EMAIL PROTECTED](0,1)
you could call one of the other @sections for moving
or resizing, without showing the bar, first changing
the zTarget as above.
----------------------------------------
CAUTION: you should use WinBar at least once in its normal
way (so its starting routines will be run) before doing any
of these non-visible-bar tricks we are discussing.
Then its statics will have been filled with info about
your display etc.
--------------------------------------------
PG> Second, I wanted a script that would open the
PG> application window on the monitor where the mouse is...
The script you posted looks ok. A few notes about it:
- again as above, if you replace your line:
.WinBarDual5(win.handle("autorun"))
with:
[EMAIL PROTECTED]("zTarget",<newhandle>)
then the bar will not appear, you don't need
the Bar Hide line, plus I think the @RefreshBar
section will not be called, which makes it much
more efficient.
Your changing Quit All to Quit at the end of @RefreshBar
probably does no harm but I haven't analysed that.
Anyway, if you use the method described above, I think
changing to Quit there will not be necessary.
---------------------------------------------
Finally, I'll see if the next version can include
more @sections in the "calls from other scripts"
department, especially now I know that some people,
well one at least :) , might use it that way,
calling its routines without showing or clicking the bar.
---------------------------------------------
A completely different approach would be for
you to steal some code from WinBar's scripts,
such as the OtherMonitor routine, and paste it into
your own script, maybe editing it to use your
own variable names.
If you do that, remember that each move/size thing starts
by calling the @SharedCode subroutine.
But maybe most of that subroutine won't be relevant
in your particular scenario...
best regards
Alan
PS It has been quite a while since I last looked at the
WinBar scripts (or any other scripts). I hope my ideas
above don't turn out to be unworkable :)
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/JV_rlB/TM
--------------------------------------------------------------------~->
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/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/