AutoHotkey Community

It is currently May 25th, 2012, 4:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: February 19th, 2005, 5:20 am 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
I thought about merging this with titlebarclock but decided its better ran seperately as some might not want this always displaying.

Image

As the screenshot shows, it displays the current mouse coords and pixel color in the titlebar. Clicking the middle mouse button copies the RGB value to the clipboard ready for pasting whereever you need. Clicking on the tray icon pauses the script which is useful if you do not wish it to update for a while.

Code:
; pixelget - titlebar version

menu, tray, tip, pixelget
#SingleInstance force

Menu, Tray, NoStandard ; only use this menu
Menu, Tray, Click, 1 ; Remove this line if you prefer double-click vs. single-click.
Menu, Tray, Add, Pau&se, Pause
Menu, Tray, Default, Pau&se
Menu, Tray, Add, &Reload, Reload
Menu, Tray, Add, E&xit, Exit

Gui, +ToolWindow +AlwaysOnTop -SysMenu -Caption
Gui, Color, CCCCCC
Gui, Font, s8 wBold cBE7DFF, Terminal
Gui, Font, cBE7DFF
Gui, Add, Text, x3 y5, x
Gui, Font, cFF6428
Gui, Add , Text, x+0 y5 h17 w30 vCurrentX, %MouseX%
Gui, Font, cBE7DFF
Gui, Add, Text, x+0 y5, y
Gui, Font, cD77526
Gui, Add , Text, x+0 y5 h17 w30 vCurrentY, %MouseY%
Gui, Font, cBE7DFF
Gui, Add, Text, x+0 y5, c
Gui, Font, cFFA162
Gui, Add , Text, x+0 y5 h17 w65 vCurrentPixel, %color%   

SetTimer, GetPixel, 100
Gui, Show, NoActivate x0 y0 h18 w200
WinSet, TransColor, CCCCCC 255, pixelget

GetPixel:
MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%, RGB
GuiControl, , CurrentX, %MouseX%
GuiControl, , CurrentY, %MouseY%
GuiControl, , CurrentPixel, %color%
WinSet, TransColor, CCCCCC 255, pixelget
Gui, Show, NoActivate x550 y0, pixelget
return

MButton::
ControlGetText, CopyText, Static6, pixelget
StringTrimLeft, CopyTextTrim, CopyText, 2
Clipboard = %CopyTextTrim%
Return

;______________________
; tray menu here

Pause:
suspend
pause
return

Reload:
reload

Exit:
exitapp

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 19th, 2005, 7:31 pm 
Have I said already that I like it ?
Thx for sharing it :D

Have phun.
8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 19th, 2005, 7:56 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
At first I expected it to actually follow the titlebar around. :lol: Btw, cool script, thx.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 19th, 2005, 11:47 pm 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2541
:oops: It took me a minute to figure out where it was and what it was doing... :lol: . Nice :). Middle mouse button doesn't work for me but that's likely because I'm using an Intellimouse Explorer mouse and the button is already mapped to something else...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 20th, 2005, 12:03 am 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
Thanks everyone!

corrupt, I had the same when I was writing it, moving the mouse thinking "why isn't the rgb updating?" - I wasn't moving the mouse out of the background color in Editpad!

jonny, I thought about having the script follow the active window so it was always in the titlebar of the active window regardless of the windows size. winampbar behaves like this and it annoyed me that it would keep switching positions on the screen.

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 20th, 2006, 9:04 pm 
I need a script that shows the used memory of a program
within its titlebar (for each open program).

I found your script(s) and thought I could use them as a startingpoint.

But I have two problems.
1. Your script doesn't follow the titlebar.
2. How (where) do I get the used memory of a program.


To make things clear: In the end I want a script that shows in the
titlebar of each program (like Firefox,Azureus,Thunderbird etc.) its
used memory in his titlebar. Also, if the window is moved or resized).
Maybe even if the program is minimized the VALUE can be shown
above its taskbar-button.

Is there any chance to do this with autohotkey ??
If I get some hints I will try it on my own.
Thanks.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2006, 1:49 am 
Do you mind giving instructions more clearly. Nothing is showing up.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2006, 1:49 am 
Ahh sorry nvm. I see the small numbers now.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Bon, Jaaaaaaaaay, Rajat, XX0 and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group