Jump to content

Something wrong with autoit info


Recommended Posts

Take a screenshot of your desktop, paste it into  (Windows)Paint or other painting app, use a color picker tool and search for the coordinates.
Then pick up the color, and click on edit colors, then look if the color matches.

When i look on your pasted image, the coordinate for 42,426 is somewhere inside the MS-Edge icon.
The color 2b1060 is dark purple. (looking at the pasted image, it's somewhere inside the CPUID icon.

The color ffd971 is the yellow'ish color. 

Edited by Dan_555

Some of my script sourcecode

Link to comment
Share on other sites

 

On 1/21/2023 at 4:10 PM, dersiniar said:

made another script to get pixel info to my mouse,

i thing something is wrong with your script. have you tried another tool? https://getsharex.com/

 

RGBA (Red, Green, Blue, Alpha) = 1, 0, 128, 255
HSB (Hue, Saturation, Brightness) = 240,5°, 100,0%, 50,2%
CMYK (Cyan, Magenta, Yellow, Key) = 99,2%, 100,0%, 0,0%, 49,8%
Hex (RGB, RGBA, ARGB) = #010080, #010080FF, #FF010080
Decimal (RGB, RGBA, ARGB) = 65664, 16810239, -16711552
Cursor position (X, Y) = 1019, 473

forum15.png.d0ee3ba6706d6ecf0c23740fad8bd08d.png

your value  0x1C1C1C not mach to any format 

RGBA (Red, Green, Blue, Alpha) = 28, 28, 28, 255
HSB (Hue, Saturation, Brightness) = 0,0°, 0,0%, 11,0%
CMYK (Cyan, Magenta, Yellow, Key) = 0,0%, 0,0%, 0,0%, 89,0%
Hex (RGB, RGBA, ARGB) = #1C1C1C, #1C1C1CFF, #FF1C1C1C
Decimal (RGB, RGBA, ARGB) = 1842204, 471604479, -14935012
Cursor position (X, Y) = 1019, 473

1512478-Clipboard01.thumb.png.e404ec5e6e5b347152b8316d283c6d37.png

 

Edited by ioa747
UpDate

I know that I know nothing

Link to comment
Share on other sites

Its not about script :o tbh then script gives my right colors. ones that i can use for scite. Problem is autoit window info, it gives wrong codes. Codes that script wont reconise.

but heres the script i used to get codes that works for me. but i want to get autoit info tool to working.

HotKeySet("{ESC}", "Terminate")
HotKeySet("q", "Color")
Local $aMPos

While 1
    $aMPos = MouseGetPos()
$Data=  ToolTip($aMPos[0] & ", " & $aMPos[1] & @LF & "0x" & Hex(PixelGetColor($aMPos[0], $aMPos[1]), 6))
    
    Sleep(10)
WEnd
ToolTip

Func Color()

  ClipPut ( "0x" & Hex(PixelGetColor($aMPos[0], $aMPos[1]), 6))
  ToolTip("Saved "& "0x" &Hex(PixelGetColor($aMPos[0], $aMPos[1]), 6))
  Sleep (1000)
EndFunc   ;==>Terminate

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

 

Link to comment
Share on other sites

I can confirm that it is up to the scaling factor.
Just tested it on my machine.

Even the taking of the screenshots does not resemble the position of the mouse.

;modified from https://www.autoitscript.com/forum/topic/41652-colorpicker/
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>
#include <StaticConstants.au3>
#include <WinAPIHObj.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <Misc.au3>

GUICreate("ColorPicker: Press CTRL/Strg", 258, 120, -1, -1, -1, $ws_ex_topmost + $ws_ex_toolwindow)
GUISetFont(9, 400, 0, "Verdana")
$lbl_color = GUICtrlCreateLabel("", 10, 35, 70, 54, $ss_center + $ss_centerimage + $ss_sunken )
GUICtrlSetFont(-1, 9, 600)
$lbl_hex = GUICtrlCreateLabel("0x", 10, 10, 70, 20, $ss_center + $ss_sunken + $ss_centerimage)
Global $hgpic = GUICtrlCreatePic("", 85, 10, 80, 80,$SS_SUNKEN)
$cmd_copy = GuiCtrlCreateButton("", 200, 9, 49, 25, $bs_icon)
GUICtrlSetImage($cmd_copy, "shell32.dll", 134, 0)
GUICtrlSetTip($cmd_copy, "Get Screen by coordinates")
$Label1 = GUICtrlCreateLabel("X=", 175, 43, 17, 17)
$Label2 = GUICtrlCreateLabel("Y=", 175, 62, 17, 17)
$Input1 = GUICtrlCreateInput("0", 200, 40, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$Input2 = GUICtrlCreateInput("0", 200, 60, 49, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$lbl_Mouse = GUICtrlCreateLabel("x=0 : y=0", 10, 95, 238, 20, $ss_sunken + $ss_centerimage)
$last = 0
GUISetState()
While 1
    $msg = GUIGetMsg()
    $col = PixelGetColor(MouseGetPos(0), MouseGetPos(1))
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $col <> $last And GUICtrlRead($lbl_color) = ""
            GUICtrlSetData($lbl_hex, "0x" & Hex($col, 6))
            GUICtrlSetBkColor($lbl_color, "0x" & Hex($col, 6))
            $last = $col
        Case _IsPressed("11") = 1
            If GUICtrlRead($lbl_color) = "[Lock]" Then
                GUICtrlSetData($lbl_color, "")
            Else
                $mx = MouseGetPos(0)
                $my = MouseGetPos(1)
                GUICtrlSetData ($lbl_Mouse,"X= "& $mx & _StringRepeat(" ",7-StringLen($mx)) & "Y=" & $my)
                ScreenCaptureToControl($hgpic,$mx-40,$my-40,$mx+40,$my+40)
                GUICtrlSetData($lbl_color, "[Lock]")
                If $col < 3000000 Then
                    GUICtrlSetColor($lbl_color, 0xFFFFFF)
                Else
                    GUICtrlSetColor($lbl_color, 0x000000)
                EndIf
            EndIf
            Sleep(200)
        Case $msg = $cmd_copy
                $mx = GUICtrlRead($Input1)
                $my = GUICtrlRead($Input2)
                ScreenCaptureToControl($hgpic,$mx-40,$my-40,$mx+40,$my+40)
    EndSelect
WEnd
Exit

Func ScreenCaptureToControl($hPicControlId,$x,$y,$x1,$y1)
    ;used the code from https://www.autoitscript.com/forum/topic/191425-capturing-image-without-saving/
    Local $hBmp = _ScreenCapture_Capture("", $x, $y , $x1 , $y1,False)
    GUICtrlSendMsg($hPicControlId, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp)
    _WinAPI_DeleteObject($hBmp)
EndFunc   ;==>SlideShow_Preview


 

Some of my script sourcecode

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...