I added a tooltip that shows the crosshair coordinates.
(It works only when not following the mouse)
Looking at the bar with ZoomPlus, it appears that powerpro doesn't allow
for this bar to be less than 2 px high and wide. Bruce, is this size
limit by design?
BTW, ZoomPlus seems to be the only magnifier/zoomer that can correctly
display the crosshair, all the other ones I tried, including Sean's
can't see the crosshair lines.
; ----- Locked bar version -----
; Attach following script to hot key
; activate key once to show cross hair
; again to remove.
; click and drag anchor to move cross hair.
; middle click anchor to remove cross hair.
; right click anchor to follow mouse,
; activate key to remove.
static bShowing,xpos,ypos,ev, xcrosshair, ycrosshair, xanchor
static transparency=128
static thickness=1
local anchorcolor="128 128 128"
local crosshaircolor="255 0 0"
if (!bShowing) do
//not showing, draw initial cross hair
//[EMAIL PROTECTED](0) //uncomment for follow mouse as default
bShowing=1
xpos=xmouse
ypos=ymouse
xcrosshair = cl.create("xcrosshair",1)
xcrosshair.newproperties("topmost flatflat back: "++crosshaircolor)
xcrosshair.addproperties(" left: 0 right: "++xscreen)
xcrosshair.addproperties(" top: "++ypos-thickness)
xcrosshair.addproperties(" bottom: "++ypos+thickness)
xcrosshair.lockto(1,"xanchor",50,0,50,0-thickness)
ycrosshair = cl.create("ycrosshair", 1)
ycrosshair.newproperties("topmost flatflat back: "++crosshaircolor)
ycrosshair.addproperties("top: 0 bottom: "++yscreen)
ycrosshair.addproperties("left: "++xpos-thickness)
ycrosshair.addproperties("right: "++xpos+thickness)
ycrosshair.lockto(1,"xanchor",50,0-thickness,50,0)
xanchor = cl.create("xanchor",1)
xanchor.newproperties("topmost flatflat back: "++anchorcolor)
xanchor.addproperties(" left: "++xpos-max(4,thickness))
xanchor.addproperties(" right: "++xpos+max(4,thickness))
xanchor.addproperties(" top: "++ypos-max(4,thickness))
xanchor.addproperties(" bottom: "++ypos+max(4,thickness))
xanchor.insert(0)
xanchor.addleft(0,"format","drag")
xanchor.addmiddle(0,cb("@cancel"))
xanchor.addright(0,cb("@timer",0))
xanchor.addproperties(" tooltips")
xanchor.settooltip(0,"*info (expr("++;;+
?'word(win.getrect("ycrosshair"),1)+thickness++","++'++;;+
?'word(win.getrect("xcrosshair"),2)+thickness))/'++;;+
?'"L»drag M»close R»follow mouse"')
bar.show("xcrosshair")
bar.show("ycrosshair")
bar.show("xanchor")
win.transmouse("xcrosshair",transparency)
win.transmouse("ycrosshair",transparency)
else //if called when showing,cancels
[EMAIL PROTECTED]
endif
quit
@cancel
win.transmouse("xanchor",0-transparency)
if (event.exists(ev))
ev=event.destroy(ev)
bar.close("xcrosshair")
bar.close("ycrosshair")
bar.close("xanchor")
bShowing=0
quit
@timer
ev = event.createms(100,arg(1),cb("@update"))
quit
// call here to query mouse pos and update
@update
static xpos, ypos,bShowing
if (!bShowing) // should never happen
quit
local xnow=xmouse
local ynow=ymouse
if (xnow != xpos || ynow != ypos) do
xpos=xnow
ypos=ynow
win.move("xanchor", xnow, ynow)
win.transmouse("xanchor",transparency)
endif
quit
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:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/