Jump to content

Recommended Posts

Posted

Hello,

Im new to AutoIT so i hope this is not a stupid question, I am an Administrator/Technician (not a developer) so I hope this is not a stupid question.

Ive been trying to get PixelChecksum to take a Window Handle which is listed as an option in the function reference, but it never seems to work and seems to keep taking the check sum for the entire desktop.

Following is an example of what I've tried to do.

$hWnd = WinGetHandle("Untitled")
$checksum = PixelChecksum(0, 28, 50, 78, 1, $hWnd)
 consolewrite ("$hWnd & " " & Checksum is " &  $checksum & @CRLF)

Am i passing the windows handle in correctly, or getting the wrong handle?

Im on Windows 8.1 Pro 64 bit with AutoIT 3.3.14.2

Thanks,
Martin

 

 

Posted

Hi AutoBert,

This is what i get back:

0x000805CC Error:0    Checksum is 1744610305
>Exit code: 0    Time: 0.0869

I'm thinking maybe the option doesn't work anymore, although I'm surprised i can't find any queries about it assuming i've understood the syntax correctly.

  • Moderators
Posted

Royale,

From my testing it does indeed look as if the handle parameter is being ignored and the DeskTop is used for every call. I have only ever used the PixelCheckSum function with screen coordinates so I cannot offer any comment as to whether it has ever worked on a window level.

I suggest you open a Trac ticket so it can be investigated.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • Moderators
Posted

Iamaldrin08,

We are discussing PixelCheckSum, not PixelSearch.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

The console ouput for:

; Close the Notepad window using the handle returned by WinWait.
    WinClose($hWnd)

    ; Now a screen will pop up and ask to save the changes, the classname of the window is called
    ; "#32770" and simulating the "TAB" key to move to the second button in which the "ENTER" is simulated to not "save the file"
    WinWaitActive("[CLASS:#32770]")
    Sleep(500)
    Send("{TAB}{ENTER}")

tells me PixelChecksum is working, 3 different checksums:

Checksum Desktop is 3737190578
Checksum NotePad is 246544381
Checksum just edited NotePad is 1366642386

 

  • Moderators
Posted

AutoBert,

I agree that the function works, but when I try to use a window handle I do not get the same result if I move the window around the screen - but I do get the same result if I leave the desktop area unchanged. Hence my belief that there is a problem.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
On 2/21/2016 at 9:56 PM, Iamaldrin08 said:

I thought i got the code wrong for using handle with pixel search, it also doesn't work for me.

Actually i just tried to get it to work with PixelSearch and it seems to be doing the same thing and just taking the whole desktop.

Thanks everyone for your replies. It was driving me crazy trying to get it to work but its not really worth taking up more of your time, im only trying to perfect the automation of a bunch of startup programs and its not that big a deal.

  • Moderators
Posted (edited)

Royale,

I will open a Trac ticket for the problem.

M23

Edit: And done: https://www.autoitscript.com/trac/autoit/ticket/3211#ticket

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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
  • Recently Browsing   0 members

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