Jump to content

What do you think of this library ?  

36 members have voted

  1. 1. What do you think about FastFind ?

    • It's really great, I can't imagine doing a script without it
    • It's of some use for me in my current scripts
    • I could use it some day
    • Looks nice, but of no use for me
    • I've tried it, but it doesnt fit my needs
    • Sounds good on the paper, but can't make it work (bug or too difficult to use it)
  2. 2. Have you tried it ?

    • Yes, I'm using it right now
    • Somewhat, I've done some testing, will surely use it later
    • I've downloaded it and just played a little with packaged demo scripts
    • I've downloaded it, but not tried it so far
    • Not downloaded it so far, but I probably will some day
    • It's of no interested for me.
  3. 3. What is missing or should be improved ?

    • It has all the features I may need about Pixels Handling
    • OK it's pretty fast, but couldn't it be faster ?
    • Too hard to use it, could you simplify usage ?
    • Some additional features would be nice to have (please explain in a message)
    • It really lacks some decent documentation (I still hope to find someone to help on that)
    • Some critical features are missing, can't use it (please explain in a message)
    • I found some minor bugs (please explain in a message)
    • I've found some serious bugs (please explain in a message)
    • I've never tried it so far, can't tell
    • It would be nice if you could provide easy access to the associated tool - FFShowPixel
    • I would like to use it other languages. Could you provide wrappers ? (please explain in a message)


Recommended Posts

Posted

Actualy I have not much time to make those changes (and also not using AutoIt some time ago). Would someone be ready to implement the AutoIt wrapper part if I provide him updated dll with corresponding prototype to use ?

Isn't AutoIt part the easy bit? I mean I could have a go, at adapting the .au3 file to add this function.... just let me know the parameters etc.

Posted (edited)

Ok, thank you very much. In fact, the C++ for some of those points is pretty easy to do (adding some tolerancy on change detection is a bit more challenging). But thinking how to make it easy to use in AutoIt, adding the stuff in the wrapper, and doing some testing, that's a good part of the job, and not the part I like the most.

Can you please gimme your e-mail in a pm, so I can send you the updated dll and instructions when done (within a week I hope) ?

Edited by FastFrench
Posted

I think there is a bug in FFColorCount whilst using the ShareVariation. Just using a shade variation of 1 will cause a jump from 12 pixels to 652312 pixels.... and based on the image this doesn't make any sense.

Posted (edited)

Fixed in version 2.0. I send it to you right now for AutoIt parts update.

Changes :

Function with an additionnal parameter (ShadeVariation) :

KeepChanges

LocalizeChanges

HasChanged

New functions :

DrawSnapShotXY (same as DrawSnapShot, with specific top-left position for drawing).

ComputeMeanValues (Gives mean Red, Green and Blue values)

ApplyFilterOnSnapShot (apply a AND filter on each pixels in the SnapShot)

Bug fix :

FFColorCount with ShadeVariation

Version is now 2.0

Thanks !

Edited by FastFrench
Posted (edited)

All is pretty good, but can you realize the ability or generally change the way snapshots is taken? Smth like made in AutoHotkey

Big lack of autoit and your lib pixel retrieving functions is inability to use them in cases where screenshot can not be captured with PrtScr key directly from the desktop i mean especially games in fullscreen mode.

Edited by qqwqqw
Posted

There is no assumption on the way you triggers the SnapShots with FastFind.

AutoIt and FastFind can both be used in fullscreen games or whatever, all what your programming skills allow you to code.

Posted

Ok, then i have to inform you that in some fullscreen games(many of them at least under Win 7) straight use of GetPixelColor etc always return black.

Posted

Well, in theory it's possible for any application to intercept calls to any Windows API functions. In this case, all we could do is to use low level hardware-dependent API. I most certainly won't.

BTW, FastFind do not use GetPixelColor or such Win32 functions. It just relies on Win32 functions to copy the Screen content when taking a SnapShot (and also GDI+ for Bitmap manipulations). After that point, it only uses it's own representation of the screen, with direct memory access (that's the reason it's so fast).

Posted

Hello from Barcelona.

First of all let me thank to you for sharing your work with all of us.

I though that I was starting to be an average Autoit user... but I'm stuck with you FastFind :oops:

I have a Full screen GUI with an ActiveX object (an offline webpage) that shows a webcam stream on screen:

$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 640, 480)
$oIE.navigate(@ScriptDir & "\TestPage.html")

Over everything I have a transparent gui and I have drawed the borders of the transparent gui using gdi+ to make it more visible. The gui is resizable and can be moved, so it visualy shows the limits of the area I want to search pixels inside:

$Guipeque = GUICreate("minigui", 100, 50, 300, 200, $WS_POPUPWINDOW, $WS_EX_LAYERED + $GUI_WS_EX_PARENTDRAG, WinGetHandle(AutoItWinGetTitle()))
WinSetOnTop($Guipeque, "minigui", 1)
GUISetBkColor(0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($Guipeque, 0xABCDEF, 255)
Global $size = WinGetPos("minigui")
GUISetState(@SW_SHOW)
$medicion = 0
$size = WinGetPos("minigui")
Local $Guipeque, $hGraphic, $hPen
; Draw line
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Guipeque)
$hPen = _GDIPlus_PenCreate(0xC4FF0000, 5)
_GDIPlus_GraphicsDrawLine($hGraphic, 1, 1, 1, $size[3], $hPen)
_GDIPlus_GraphicsDrawLine($hGraphic, 1, 1, $size[2] - 5, 1, $hPen)
_GDIPlus_GraphicsDrawLine($hGraphic, 1, $size[3] - 5, $size[2], $size[3] - 5, $hPen)
_GDIPlus_GraphicsDrawLine($hGraphic, $size[2] - 5, $size[3] - 5, $size[2] - 5, 0, $hPen)
Sleep(10)
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()

It looks like:

Posted Image

The html file is the webcam stream running the sobel operator on real time.

I want to look for pixels only inside the transparent gui. I tried to do :

$size = WinGetPos("minigui")
FFSnapShot($size[0], $size[1], $size[2], $size[3])
$coord1 = FFBestSpot(3, 2, 3,$size[0] + $size[2],$size[1] + $size[3]/2,0xFFFFFF, 1)

If Not @error Then
MouseMove($coord1[0], $coord1[1], 0);I move the mouse to the found pixels)
EndIf

But I always get:

Posted Image

And:

Posted Image

And the mouse point correctly the nearest pixels next to the right side of the transparent gui.

But if I put the mug outside the transparent gui the mouse also points to the nearest pixels, even if they are outside the transparent gui :bye:

What do I'm doing wrong?

Is there any chance of getting an error when there are not any white pixel inside the transparent gui?

Is there any way of look for any color except one? (for me it would be easier to look for anything different from black.

Thanks again.

Greets from Barcelona

Posted (edited)

Hey,

first im from Austria so my englis is not the best :bye:

I need to do a PixelSearch while Full Screen Mode is active.

THe normal PixealSearch() wont work, so i searched a bit and found this thread..

But i have big problems understanding the functions :/

So what i want is:

Search a Pixel in in a Full-Screen, and get back the Coordinates.

So i hope you can help me..

Thanks :oops:

Edited by TechnoMan
  • Moderators
Posted

TechnoMan,

Welcome to the AutoIt forum. :bye:

Unfortunately you appear to have missed the Forum Rules on your way in. Please read them now and then you will understand why you will get no help for this request. :oops:

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

Hey,

thanks :oops:

Sry bro but youre right. I forgot to read them.. I try to avoid english textes ^^. So i just edidet my post, and hope thats okay :/

TechnoMan

  • Developers
Posted

Sry bro but youre right. I forgot to read them.. I try to avoid english textes ^^. So i just edidet my post, and hope thats okay :/

Nope ... bro ... to late is how we call this.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

I guess WinGetPos("minigui") returns height and width where FFSnapShot needs right and bottom.

It fails because 102<300 and 52<200.

Oh, I see. Thanks a lot! Now it works as it should

I have created 4 exclusion areas:

$size = WinGetPos("minigui")
    Sleep(20)
    $area1 = FFAddExcludedArea(0, 0, @DesktopWidth, $size[1])
    Sleep(20)
    $area2 = FFAddExcludedArea(0, 0, $size[0] , @DesktopHeight)
    Sleep(20)
    $area3 = FFAddExcludedArea(0, $size[1] + $size[3], @DesktopWidth, @DesktopHeight)
    Sleep(20)
    $area4 = FFAddExcludedArea($size[0] + $size[2], 0, @DesktopWidth, @DesktopHeight)

cheers

  • 2 weeks later...
Posted (edited)

Sorry, but you can't for now. As I couldn't find someone to help on the AutoIt part, I've not released it yet. The dll is ready, but the wrapper is not. Unfortunately I've too few time to come back on Autoit to update and test the wrapper.

Edited by FastFrench
  • 2 weeks later...
Posted

I didn't receive any new posts with email in this topic, but I had subscribed it... Strange.

Anyway, now I could test some code for 2.0 if you want.

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