Jump to content

FastFrench

Active Members
  • Posts

    129
  • Joined

  • Last visited

  • Days Won

    1

FastFrench last won the day on June 15 2012

FastFrench had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

FastFrench's Achievements

Adventurer

Adventurer (3/7)

11

Reputation

  1. 1/ nop, not yet. You can save, but not load bitmaps. 2/ depends what you have to do. Taking the captures is often the most time consuming task, and isexcluded is quite fast with a reasonnable number of exclusion rects. If you have few captures and lot of searchs to do on each, it should be faster NOT to use those rects.
  2. You should better write your question on the former FastFind topic I guess, you would have better chance to get help. Also, better explain what you do, what you get and what you expected? I suppose you type ^1 then ^2 several times? What kind of changes are you tracking on this small area bottom right of the Notepad window?
  3. John is right. Here is a small wrapper to use this dll in .NET: '?do=embed' frameborder='0' data-embedContent>>
  4. As I have tons of demands to use the FastFind dll in .NET languages, here is the small wrapper I've written to make the functions available in C# using System; using System.Runtime.InteropServices; namespace XXXX.Tools.FastFind { static public class FastFindWrapper { const string fastFindDllName = "FastFind64.dll"; // Exclusion areas // =============== [DllImport(fastFindDllName)] public static extern void AddExcludedArea(int x1, int y1, int x2, int y2); [DllImport(fastFindDllName)] public static extern bool IsExcluded(int x, int y, IntPtr hWnd); [DllImport(fastFindDllName)] public static extern bool ResetExcludedAreas(); // Configuration // ============== [DllImport(fastFindDllName)] public static extern void SetDebugMode(); [DllImport(fastFindDllName)] public static extern void SetHWnd(IntPtr NewWindowHandle, bool bClientArea); /// <summary> /// Usage : IntPtr ptr = GetLastErrorMsg(); /// string s = Marshal.PtrToStringAnsi(ptr); /// If extensively used, make sure there is no suspect memory leaks /// </summary> /// <returns></returns> [DllImport(fastFindDllName, CharSet = CharSet.Auto)] public static extern IntPtr GetLastErrorMsg(); [DllImport(fastFindDllName, CharSet = CharSet.Auto)] public static extern IntPtr FFVersion(); // Basic functions [DllImport(fastFindDllName)] public static extern int GetPixel(int X, int Y, int NoSnapShot); [DllImport(fastFindDllName)] public static extern int ColorPixelSearch(ref int XRef, ref int YRef, int ColorToFind, int NoSnapShot); [DllImport(fastFindDllName)] public static extern int GetPixelFromScreen(int x, int y, int NoSnapShot); // Like GetPixel, but with screen coordinates // Snapshots [DllImport(fastFindDllName)] public static extern int SnapShot(int aLeft, int aTop, int aRight, int aBottom, int NoSnapShot); // List of colors management [DllImport(fastFindDllName)] public static extern int AddColor (UInt32 NewColor); [DllImport(fastFindDllName)] public static extern int RemoveColor (UInt32 NewColor); [DllImport(fastFindDllName)] public static extern void ResetColors (); // Search function, for multiple colors (color list should be defined first) [DllImport(fastFindDllName)] public static extern int ColorsPixelSearch(ref int XRef, ref int YRef, int NoSnapShot); // ColorsSearch is close to ColorSearch, except it can look for several colors instead of only one. [DllImport(fastFindDllName)] public static extern int ColorsSearch(int SizeSearch, ref int NbMatchMin, ref int XRef, ref int YRef, int NoSnapShot); // Most generic search function : called in most case. [DllImport(fastFindDllName)] public static extern int GenericColorSearch(int SizeSearch, ref int NbMatchMin, ref int XRef, ref int YRef, int ColorToFind, int ShadeVariation, int NoSnapShot); // New vith verion 1.4 : more powerful search function : looks for 'spots' instead of pixels [DllImport(fastFindDllName)] public static extern int ProgressiveSearch(int SizeSearch, ref int NbMatchMin, int NbMatchMax, ref int XRef, ref int YRef, int ColorToFind/*-1 if several colors*/, int ShadeVariation, int NoSnapShot); // Count pixels with a given color [DllImport(fastFindDllName)] public static extern int ColorCount(int ColorToFind, int NoSnapShot, int ShadeVariation); /// // SnapShot saving into bitmap file [DllImport(fastFindDllName)] public static extern bool SaveBMP(int NoSnapShot, string szFileName /* With no extension (xxx.bmp added)*/); [DllImport(fastFindDllName)] public static extern bool SaveJPG(int NoSnapShot, string szFileName /* With no extension*/, UInt64 uQuality) ; [DllImport(fastFindDllName)] public static extern int GetLastFileSuffix(); // Raw SnapShot rata retrieval [DllImport(fastFindDllName)] public static extern IntPtr GetRawData(int NoSnapShot, ref int NbBytes); // Detection of changes between two SnapShots [DllImport(fastFindDllName)] public static extern int KeepChanges(int NoSnapShot, int NoSnapShot2, int ShadeVariation); // ** Changed in version 2.0 : ShadeVariation added ** [DllImport(fastFindDllName)] public static extern int KeepColor(int NoSnapShot, int ColorToFind, int ShadeVariation); [DllImport(fastFindDllName)] public static extern int HasChanged(int NoSnapShot, int NoSnapShot2, int ShadeVariation); // ** Changed in version 2.0 : ShadeVariation added ** [DllImport(fastFindDllName)] public static extern int LocalizeChanges(int NoSnapShot, int NoSnapShot2, ref int xMin, ref int yMin, ref int xMax, ref int yMax, ref int nbFound, int ShadeVariation); // ** Changed in version 2.0 : ShadeVariation added ** // Display of a SnapShot [DllImport(fastFindDllName)] public static extern bool DrawSnapShot(int NoSnapShot); [DllImport(fastFindDllName)] public static extern bool DrawSnapShotXY(int NoSnapShot, int X, int Y); // ** New in version 2.0 ** // Change of the color of a pixel (hyper-omptimized function) [DllImport(fastFindDllName)] public static extern bool FFSetPixel(int x, int y, int Color, int NoSnapShot); // SnapShot duplication [DllImport(fastFindDllName)] public static extern bool DuplicateSnapShot(int Src, int Dst); // Misc functions, new in version 2.0 [DllImport(fastFindDllName)] public static extern int ComputeMeanValues(int NoSnapShot, ref int MeanRed, ref int MeanGreen, ref int MeanBlue); [DllImport(fastFindDllName)] public static extern int ApplyFilterOnSnapShot(int NoSnapShot, int Red, int Green, int Blue); } }
  5. @ivanius : sorry, but I don't understand why you want to use DllCall instead of the Autoit functions?
  6. I don't understand what is the gap beetween 860516 and FF8999 What you can do, it's to look for the color FF0000 (pure red) with a 'shade variation' of something of less than 0x7F. This will detect pixels that have a RR component bigger than the blue and green one.
  7. You can't do that easily with FastFind. It's more about colors than patterns. You can sometimes recognize items with the density of pixels of some colors, but that's it. You should have a try on OCR like Tesserac :
  8. Thanks you for your message, I'm glad FastFind prove to be useful :-)
  9. No problem, you're welcome. And please tell me if you get some interesting results to share with us. Thx
  10. Hi lobidon, you can indeed use the Fastfind dll within a C# project, but have first some wrapping to do. The point here is : how to use an Unmanaged dll into a .NET language. This is done like when we need to use Windows API functions in C#. Here is a link to give you the idea: http://stackoverflow.com/questions/12849104/creating-net-wrappers-for-windows-api-and-com-dlls If someone write a somewhat complete wrapper, it would be nice to include it in the FastFind package. Thanks, FF
  11. Hello, changing that would be quite complicate : it means using multithreading, and asynchronous calls. But the best way to fix this is to make the application that draw on the screen and the autoit script that calls the FF functions work on different threads. That is, usually two different applications or script running separately. Does it make sense ?
  12. You're welcome. Hope it will be of some help.
  13. Hello ! First I'd like to apologize for providing such a scarse support for this library. We have a proverb in French that says : "Tout vient à temps à qui sait attendre". I'm not sure how it translates into English. But well, here it is : I finally found back the last version of FastFind sources, and put that on a shared repository (GitHub). That's very optimized but honestly not very readable code. Hope some of you will be able to improve it. Here is the link : https://github.com/Fastfrench/FastFind Please let me know when you use or change those sources, or if you have trouble using GitHub. You can also input issues on GitHub to track them properly. And keep this post to communicate about the changes. If you want to contribute actively on this project, please show me some suggested changes you'd like to include. If it shows that you know what you're doing, then I'll set you as a contributor on the GitHub project (so you can directly change the sources on GitHub). Thanks to all, FF
×
×
  • Create New...