--- In [email protected], sgp <[EMAIL PROTECTED]> wrote:
> 
> In all your scripts, could you add
> global dll_status

I added it. However, I may forgot to do this in the future. How about
just declaring it in your startup script?

> One glitch: when I picked the color I got a floating balloon showing
> RGB, but the balloon is now stuck on my screen.

Have you clicked the right mouse button? I noticed keys were more
reliable than mouse buttons, so I changed it to ctrl key. Maybe simply
specifying timeout is safer: Wait.For(3000) in place of Wait.For(Ctrl).

First, I planned to provide a close button to this balloontip, but I
couldn't figure it out. Is the close button possible only in
TrayIcon's tooltips?

Left Button: Pick the color
Ctrl Key: Exit the script

------------------ ColorPicker.PowerPro ------------------------------
global dll_status
local sString,hWndTT,hDC_TT,hDC_SC,ti

sString=" "

hWndTT=dll.call("CreateWindowEx|ui s ui ui i i i i ;;+
ui ui ui ui",8,"tooltips_class32",0,0,0,0,0,0,0,0,0,0)

ti=dll.create_array(10,"i",40)
ti[10]=win.getvaraddr("sString")

dll.call("SendMessage|ui ui i a* v",hWndTT,1028,0,ti)
dll.call("SendMessage|ui ui i a* v",hWndTT,1041,1,ti)

hWndTT.trans(1)
hWndTT.size(80,80)

hDC_TT=dll.call("GetDC|ui",hWndTT)
hDC_SC=dll.call("GetDC|ui",0)

dll.call("SetStretchBltMode|ui i",hDC_TT,4)
dll.call("SetBrushOrgEx|ui i i ui",hDC_TT,0,0,0)

for(!mouseleft)
hWndTT.move(xmouse-40,ymouse-40)
dll.call("StretchBlt|ui i i i i ui i i i i ui",;;+
hDC_TT,0,0,80,80,hDC_SC,xmouse-8,ymouse-8,16,16,0xCC0020)
;wait.for(100)
endfor
wait.for(!mouseleft)

dll.call("ReleaseDC|ui ui",0,hDC_SC)
dll.call("ReleaseDC|ui ui",hWndTT,hDC_TT)

sString=win.getpixel(xmouse,ymouse)++" (#"++ ;;+
case("upper",win.hex(win.getpixel1(xmouse,ymouse)))++")"

dll.call("SetWindowLong|ui i i",hWndTT,-16,;;+
dll.call("GetWindowLong|ui i",hWndTT,-16)|64)

hWndTT.SendMessageStr(1056,1,"Color @("++xmouse++","++ymouse++")")
dll.call("SendMessage|ui ui i a* v",hWndTT,1036,0,ti)

wait.for(ctrl)
hWndTT.close
quit
---------------------------------------------------------------------

Sean






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/
 


Reply via email to