layer Posted January 1, 2005 Share Posted January 1, 2005 i was just messing around and just made something that tells you what position your mouse is at and the color under it in Hex... thats all, in a tooltip HotKeySet ("{ESC}", "MyExit") While 1 $pos= MouseGetPos () ToolTip ("X: " & $pos[0] & " " & "Y: " & $pos[1], $pos[0] +10, $pos[1] +10) $color= PixelGetColor ($pos[0], $pos[1]) $hexit= Hex ($color, 6) ToolTip ("RGB Color under mouse: 0x" & $hexit, $pos[0] +10, $pos[1] +30) WEnd Func MyExit () Exit EndFunc not exactly sure why it flickers... but whatever, it works, and ya gotta be happy with what ya got! enjoy FootbaG Link to comment Share on other sites More sharing options...
Chris_1013 Posted January 1, 2005 Share Posted January 1, 2005 (edited) Gah, flicker is an eternal problem with any script like this that's constantly doing things. When using a GUI or SplashScreen you can get round it by updating the text of the control, rather than re-displaying it every time. You can *possibly* do the same with a tool tip, but I dunno... Edited January 1, 2005 by Chris_1013 Link to comment Share on other sites More sharing options...
layer Posted January 1, 2005 Author Share Posted January 1, 2005 hmm, does anybody know how to do what CHris mentioned above? that would be pretty cool! FootbaG Link to comment Share on other sites More sharing options...
phillip123adams Posted January 1, 2005 Share Posted January 1, 2005 i was just messing around and just made something that tells you what position your mouse is at and the color under it in Hex... thats all, in a tooltipHotKeySet ("{ESC}", "MyExit") While 1 $pos= MouseGetPos () ToolTip ("X: " & $pos[0] & " " & "Y: " & $pos[1], $pos[0] +10, $pos[1] +10) $color= PixelGetColor ($pos[0], $pos[1]) $hexit= Hex ($color, 6) ToolTip ("RGB Color under mouse: 0x" & $hexit, $pos[0] +10, $pos[1] +30) WEnd Func MyExit () Exit EndFuncnot exactly sure why it flickers... but whatever, it works, and ya gotta be happy with what ya got! enjoy <{POST_SNAPBACK}>Combine the two ToolTips into one using @LF and it will look real good.ToolTip ("X: " & $pos[0]& " " & "Y: " & $pos[1] _& @lf & _"RGB Color under mouse: 0x" & $hexit, $pos[0] + 10, $pos[1] + 10) Phillip Link to comment Share on other sites More sharing options...
layer Posted January 1, 2005 Author Share Posted January 1, 2005 omg, thank you so much phillip, good work! no more flickers... thanks again! FootbaG Link to comment Share on other sites More sharing options...
layer Posted January 1, 2005 Author Share Posted January 1, 2005 geez isnt it something, they put like 20 colors on the Start>All Programs little green button arrow... FootbaG Link to comment Share on other sites More sharing options...
layer Posted January 2, 2005 Author Share Posted January 2, 2005 just on the run and got bored while i wait 5 minutes so i just figured id make this... While 1 $pos= MouseGetPos () $timeon= ToolTip (@Hour -12 & ":" & @Min & ":" & @Sec, $pos[0] +10, $pos[1] +10) WEnd and for thso who like army time While 1 $pos= MouseGetPos () $timeon= ToolTip (@Hour & ":" & @Min & ":" & @Sec, $pos[0] +10, $pos[1] +10) WEnd so you have the clock at your mouse FootbaG Link to comment Share on other sites More sharing options...
Valik Posted January 2, 2005 Share Posted January 2, 2005 Ever heard of Sleep() so you don't waste processor time? Link to comment Share on other sites More sharing options...
layer Posted January 2, 2005 Author Share Posted January 2, 2005 (edited) nah, because that would cause the tool tip to be left a mile away from your mouse and be off by however much you sleep () between the loop... (maybe not what you were talking about?) EDIT: btw... why don't you criticize autoit window spy i betchya my little program takes up less then the window spy(not saying window spy is bad ) you must hate me Edited January 2, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
Valik Posted January 2, 2005 Share Posted January 2, 2005 nah, because that would cause the tool tip to be left a mile away from your mouse and be off by however much you sleep () between the loop... (maybe not what you were talking about?)EDIT: btw... why don't you criticize autoit window spy  i betchya my little program takes up less then the window spy(not saying window spy is bad ) you must hate me <{POST_SNAPBACK}>You're speaking without actually knowing what you are talking about, I'm afraid. Even a simple Sleep(10) will stop the While loop from eating up the processor. If you can see ~10 milliseconds worth of latency when moving the mouse, congratulations on being a machine or superhero/villain. Link to comment Share on other sites More sharing options...
layer Posted January 2, 2005 Author Share Posted January 2, 2005 villan? and actually, it doesnt make a huge difference if you add the sleep (10) it only reduces the usage by 14 k :/ FootbaG Link to comment Share on other sites More sharing options...
Valik Posted January 2, 2005 Share Posted January 2, 2005 villan? and actually, it doesnt make a huge difference if you add the sleep (10) it only reduces the usage by 14 k :/<{POST_SNAPBACK}>Uhhhh, 14k? What are you talking about now? The wrong thing, obviously. I'm talking about processor usage. With your script, AutoIt3.exe uses (Or tries to use) 100% of my CPU's power. By adding a Sleep(10) line inside the While loop, that drops back down to 0% with no noticeable latency to the movement. Link to comment Share on other sites More sharing options...
layer Posted January 2, 2005 Author Share Posted January 2, 2005 ohhhhhhhhhhhh, ok, i thought u meant in the Task Manager "Processes" tab, my bad... FootbaG Link to comment Share on other sites More sharing options...
Valik Posted January 2, 2005 Share Posted January 2, 2005 ohhhhhhhhhhhh, ok, i thought u meant in the Task Manager "Processes" tab, my bad...<{POST_SNAPBACK}> Must resist urge.... Link to comment Share on other sites More sharing options...
SlimShady Posted January 2, 2005 Share Posted January 2, 2005 It's been a while since I read such a noobie thread. Hilarious Link to comment Share on other sites More sharing options...
buzz44 Posted January 3, 2005 Share Posted January 3, 2005 (edited) simple but useful, valik, i can notice the difference that sleep(10) makes, gj, also layer, you might want to add Decimal aswell ie.. ToolTip ("X: " & $pos[0] & " " & "Y: " & $pos[1] & @lf & "RGB Color under mouse: 0x" & $hexit & @lf & "Decimal : " & $color, $pos[0] + 10, $pos[1] + 10) doesnt hurt to have decimal , gj Edited January 3, 2005 by burrup qq Link to comment Share on other sites More sharing options...
layer Posted January 3, 2005 Author Share Posted January 3, 2005 ahh, ok, i gotchya, thanks though FootbaG Link to comment Share on other sites More sharing options...
layer Posted January 3, 2005 Author Share Posted January 3, 2005 heres an updated version where you can copy the things you see to the clipboard just hit pause and go to a text file and hit CTRL+V HotKeySet ("{ESC}", "MyExit") HotKeySet ("{PAUSE}", "Clip") While 1 $pos= MouseGetPos () $color= PixelGetColor ($pos[0], $pos[1]) $hexit= Hex ($color, 6) ToolTip ("X: " & $pos[0] & " " & "Y: " & $pos[1] _ & @lf & _ "RGB Color under mouse: 0x" & $hexit, $pos[0] + 10, $pos[1] + 10) Sleep (10) WEnd Func Clip () ClipPut ("The color at" & " " & "X: " & $pos[0] & " and" & " " & "Y: " & $pos[1] & " " & "is" & " " & "0x" & $hexit) EndFunc Func MyExit () Exit EndFunc FootbaG Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now