I forgot the topmost in previous attempt.  

;Attach following script to hot key
; activate key once to show cross hair
; again to remove.



static bShowing,xpos,ypos,ev, xcrosshair, ycrosshair
if (!bShowing) do

//not showing, draw initial cross hair and set up timer
ev = event.createms(100,0,cb("@update"))
bShowing=1
xpos=xmouse
ypos=ymouse

xcrosshair = cl.create("xcrosshair",1)
xcrosshair.newproperties("topmost back: 128 128 128  transparent: 
64")
xcrosshair.addproperties(" left: 0 right: "++xscreen)
xcrosshair.addproperties(" top: "++ypos-1)
xcrosshair.addproperties(" bottom: "++ypos+1)

ycrosshair = cl.create("ycrosshair", 1)
ycrosshair.newproperties("topmost back: 128 128 128  transparent: 
64")
ycrosshair.addproperties("top: 0 bottom: "++yscreen)
ycrosshair.addproperties("left: "++xpos-1)
ycrosshair.addproperties("right: "++xpos+1)

bar.show("xcrosshair")
bar.show("ycrosshair")

else //if called when showing,cancels
if (event.exists(ev))
ev=event.destroy(ev)
bar.close("xcrosshair")
bar.close("ycrosshair")
bShowing=0
endif
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("xcrosshair", 0, ypos-1)
win.move("ycrosshair", xpos-1, 0)
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/
 


Reply via email to