Jump to content

Search the Community

Showing results for tags 'pixelgetcolor'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 11 results

  1. Hello Autoit! Today i discovered that pixelgetcolor doesn't adapt to the DPI of the system, and i want to fix this somehow as my laptop uses 120 DPI. This is what i have came up with so far: AutoItSetOption ( "CaretCoordMode" , 0) AutoItSetOption ( "MouseCoordMode" , 0) AutoItSetOption ( "PixelCoordMode" , 0) AutoItSetOption ( "GUICoordMode" , 0) #include <MsgBoxConstants.au3> #include <Misc.au3> #include <WinAPIGdi.au3> ; enum _PROCESS_DPI_AWARENESS Global Const $PROCESS_DPI_UNAWARE = 0 Global Const $PROCESS_S
  2. Hi all expert autoit. I got a problem with imagesearch and pixelgetcolor. It not work for all pc. My autoit program work fine on my pc with nvidia graphic card. when i test it will another pc, which use onboard card, it not working. i think my problem is difference of graphic card. How can i fix it? how can i use pixelgetcolor with all pc?? Here my example code $color=PixelGetColor($X , $Y ) if $color="XXXXXX" then msgbox(0,"wn"," found it") else msgbox(0,"wn"," not found") EndIF
  3. I have a program that has a control that changes color a few seconds into running. So ideally, I would poll this to tell when an event has occurred. I can't seem to retrieve the correct color value for a control. It always seems to return white indicating that its selecting somewhere else in the window. In the PixelGetColor call I'm adding half the width to the x value and subtracting half the height to the y value in order to get the center of the control. (assuming the coords returned by ControlGetPos are top left - which i can't be sure of) But I've also tried without modifying
  4. HotKeySet("^{SPACE}", "get_color") $colorCodeHere = ;<---------------- func get_color() Global $point = MouseGetPos() Global $color = PixelGetColor($point[0], $point[1]) MsgBox(0, "debug", "result: " & $color) EndFunc While 1 Sleep(100) WEnd Hello guys my problem is, how can i store the value that i get in that PixelGetColor($point[0], $point[0]) i know that when i msgbox the color i will show the = of $color but i wanted it to be the value like $colorCodeHere = 13456254. but not hardcoding the value.
  5. Hello i have problem with function PixelGetColor. On my computer it working fine but in some cases it not working. And Im clicking on the active window on red color and it give me the same color still. But in other computers when clicking on the same color red it gives other values and returned color in MsgBox is not red. Dont know is it a real main thing what causing problem but, I noticed that problem was on one windows 10. I have windows 8 and working well. On other windows 10 works well to Maybe it is caused by windows aero or something like that How to deal w
  6. I had this problem with PixelGetColor not giving me the same HEX Color as the AU3Info Tool and searched every were with no luck then had a OH DA moment LoL. The problem is that the "PixelGetColor ($mouseX[0], $mouseY[1])" is looking rite at the very tip of the mouse pointer not under it. So you have to set a -3 after the [0] and [1]. "PixelGetColor ($mouseX[0] -3, $mouseY[1] -3)" to make it search next to the pointer not on the pointer. You may have to adjust this a bit for your display but you should not have to go more then -5. -3 seems to work best for me.
  7. Hello i Have HP Bar in my game and it has 170px of width and then im gonna find start of this by mouse pos then i got $hpStart[0] = 661 $hpStart[1] = 230 , $hpEnd[0] = 839 And there is from $hpStart[0] = 661 the same color - 0xCB423B but depends of my points of hp for example on pixel $hpStart[0] = 745 would be another color not 0xCB423B and then i will know my my character got 50% of health points. I encountered problem here - for loop still looping to 839 and not founding this change in color for example on pixel $hpStart[0] = 745 I would know actual $i counter and
  8. I have a need to make the mouse push down the the left button and trace a shape that goes in all directions . If it can follow the line in a full circle I'd be set. I'm not concerned with the left mouse down, I have that figured out for later. My problem is having the cursor follow a circle in paint. It'll follow some but I think it's going toward 0,0 I'm guessing but falls off once it gets to a certain point. I've searched, I've tried several methods. This code below has been the simplest that works close but won't follow a full, or half circle. It just falls off. More detail tha
  9. I'm experimenting with GetPixel functions (in order to find the fastest) and have this simple part in my script: Local $iWidth = 150 Local $iHeight = 300 Local $array[$iHeight][$iWidth] For $i = 1 To $iHeight Step 1 For $j = 1 To $iWidth Step 1 $array[$i-1][$j-1] = PixelGetColor($iHeight-1, $iWidth-1, $Handle) Next Next Trying to get the equivalent using the GDI+ library (more specifically, using the _GDIPlus_BitmapLockBits function) I've got this code: Global $Handle = WinGetHandle("Paint") Local $sWow64 = "" If @AutoItX64 Then $sWow64 = "\Wow6432Node" ; X64 running supp
  10. This script takes a total of ~6 seconds for me, each test taking ~1 sec: Global $wnd=WinGetHandle("[ACTIVE]") Global $total_time Global $result $n1 = 60000 $start_time = TimerInit() For $i = 1 To $n1 PixelGetColor(1, 1) Next $time1=int(TimerDiff($start_time)) $total_time += $time1 $result &= "1. PixelGetColor: same screen pixel, omitting handle parameter: " & $time1 & " ms" & @LF Sleep(30) $start_time = TimerInit() For $x = 0 To 299 For $y = 0 To 199 PixelGetColor($x, $y) Next Next $time1=int(TimerDiff($start_time)) $total_time += $time1 $result &= "2. Pixe
  11. In my script i check a small area (say 20x20 pixels) with looped PixelGetColor. This has worked without any real problems for months and has taken about 20ms to complete. To test my script, I'm running Photoshop and activate different layers to show different photos. This has also worked great. After a GPU replace (to the better) a week ago it worked great the first few days, but now I've come to a dead end. This is the deal: I open my .psd file and runs my script - performance is ok I switch to layer 2 and runs my script - performance is ok I switch back to layer 1 and runs my script - pe
×
×
  • Create New...