Sign in to follow this  
Followers 0
layer

limited version of AutoWindowSpy

18 posts in this topic

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! :D enjoy :idiot:


FootbaG

Share this post


Link to post
Share on other sites

#2 ·  Posted (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 by Chris_1013

Share this post


Link to post
Share on other sites

hmm, does anybody know how to do what CHris mentioned above? that would be pretty cool! :idiot:


FootbaG

Share this post


Link to post
Share on other sites

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! :D enjoy :idiot:

<{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

Share this post


Link to post
Share on other sites

omg, thank you so much phillip, good work! no more flickers... thanks again! :idiot:


FootbaG

Share this post


Link to post
Share on other sites

geez isnt it something, they put like 20 colors on the Start>All Programs little green button arrow...


FootbaG

Share this post


Link to post
Share on other sites

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 :idiot:


FootbaG

Share this post


Link to post
Share on other sites

Ever heard of Sleep() so you don't waste processor time?

Share this post


Link to post
Share on other sites

#9 ·  Posted (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... :lol: (maybe not what you were talking about?)

EDIT: btw... why don't you criticize autoit window spy :idiot: i betchya my little program takes up less then the window spy(not saying window spy is bad ;)) you must hate me :D

Edited by layer

FootbaG

Share this post


Link to post
Share on other sites

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... :lol: (maybe not what you were talking about?)

EDIT: btw... why don't you criticize autoit window spy :idiot:  i betchya my little program takes up less then the window spy(not saying window spy is bad ;))  you must hate me :D

<{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.

Share this post


Link to post
Share on other sites

villan? and actually, it doesnt make a huge difference if you add the sleep (10) it only reduces the usage by 14 k :/


FootbaG

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

ohhhhhhhhhhhh, ok, i thought u meant in the Task Manager "Processes" tab, my bad...


FootbaG

Share this post


Link to post
Share on other sites

ohhhhhhhhhhhh, ok, i thought u meant in the Task Manager "Processes" tab, my bad...

<{POST_SNAPBACK}>

:idiot: Must resist urge.... :D

Share this post


Link to post
Share on other sites

It's been a while since I read such a noobie thread.

Hilarious :idiot:

Share this post


Link to post
Share on other sites

#16 ·  Posted (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 :idiot:, gj

Edited by burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

ahh, ok, i gotchya, thanks though :idiot:


FootbaG

Share this post


Link to post
Share on other sites

heres an updated version where you can copy the things you see to the clipboard :idiot: just hit pause and go to a text file and hit CTRL+V :D

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0