Core Function PixelSearchHWND
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> PixelSearchHWND ( <hwnd>, <left>, <top>, <right>, <bottom>, <colour>, <shade>, <padding>, <step> ) </pre> === Description === Searches a rectangle of pixels (Within a spe...") |
(→Example) |
||
Line 29: | Line 29: | ||
=== Example === | === Example === | ||
− | See PixelSearch() examples and add your HWND as the first param | + | See PixelSearch() examples and add your HWND as the first param example: |
+ | |||
+ | <syntaxhighlight lang="sputnik"> | ||
+ | $target = PixelSearchHWND ( WinGetHandle("Calc", ""), 0, 0, 20, 20 ); | ||
+ | foreach($target as $i) | ||
+ | { | ||
+ | List( $X, $Y, $Red, $Green, $Blue ) = $i; | ||
+ | $X += 30; | ||
+ | $Y += 30; | ||
+ | println("X '$X' Y '$Y,' Red '$Red' Green '$Green' Blue '$Blue'"); | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 20:43, 11 December 2011
PixelSearchHWND ( <hwnd>, <left>, <top>, <right>, <bottom>, <colour>, <shade>, <padding>, <step> )
Contents |
Description
Searches a rectangle of pixels (Within a specified window) for the pixel colour provided.
Parameters
hwnd
Window handle to be used.
... rest ...
See PixelSearch().
Return Value
See PixelSearch().
Remarks
See PixelSearch().
See "PixelCoordMode" in Opt
Example
See PixelSearch() examples and add your HWND as the first param example:
$target = PixelSearchHWND ( WinGetHandle("Calc", ""), 0, 0, 20, 20 ); foreach($target as $i) { List( $X, $Y, $Red, $Green, $Blue ) = $i; $X += 30; $Y += 30; println("X '$X' Y '$Y,' Red '$Red' Green '$Green' Blue '$Blue'"); }