Jump to content

Problems with FastFind


Recommended Posts

Well, I have been some months working with AutoIt and everything works well but this week I have started trying FastFind and I always receive errors with the snapshots when I try to only focus in a part of the screen saying that failed.

Also I have been searching a lot for FastFind info or guides but I just found old wikis and I would like if someone could recommend me a page or something for keep learning with this tool. 

Thanks for wasting time helping the community,

Alvaro

 

Link to comment
Share on other sites

  • Developers
5 minutes ago, Alvaro said:

and I always receive errors with the snapshots when I try to only focus in a part of the screen saying that failed.

You really will have to share way more details than "I get errors" as that tells us nothing.
So, share your script and all required details for us to understand what you are doing.

Jos

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

Link to comment
Share on other sites

Thanks for answering me so fast Jos. As now I have free-time im trying to create my own auto calendar organizer to help me for the next year in the university. What I want to do is that when in my computer appears a notification from my class the script detects it and add a reminder of that in my calendar with the date so I don´t forgot.

The script is really simple but when I launch it it says "Snapshot (1670,90,1770,130,0,FFFFFFFF) Failed and IsArray($Res):1-Unbound($Res):6 - $Res[0]:0 and i have tried everything and searched for solutions but nothing. Also I have the lastest version of AutoIt.

(Im Spanish so maybe I have some mistakes writing)

#include "FastFind.au3"

$FFhWnd = WinGetHandle("[ACTIVE]")
FFSetWnd($FFhWnd)
FFSnapShot()
$mouse_speed = 1

While 1
   $aCoords = FFNearestPixel( 1720, 110, 0xFF4D3E , True , 1670 , 90 , 1770 , 130 )
   If Not @error Then
      MsgBox(0, "New Message!", $aCoords[0] & ", " & $aCoords[1])
      Sleep(2000)
      MouseMove(1885, 20)
      MouseClick("left", 18850, 20, 1, $mouse_speed )
      Sleep(2000)
      Send("{C 1}")
      Send("{A 1}")
      Send("{L 1}")
   ElseIf @error Then
      Sleep(60000)
      EndIf
WEnd

Thanks,

Alvaro

AutoCalendar.au3

Edited by Jos
please use the codebox <> for source code in stead of file attach :)
Link to comment
Share on other sites

  • Developers

So what is the program that you are trying to automate as using pixel detection is not the most reliable for of automation?

Jos

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

Link to comment
Share on other sites

Is not for a program, I just use pixel detection for detecting the notification animation that appears in the screen when theres a new task or something and then add it to my calendar.

Link to comment
Share on other sites

You still don´t believe me?... I use the Windows Calendar because I think is more simple to make and with just two clicks I can enter it.  But the question is, what has to do all that with my script?😆

Link to comment
Share on other sites

  • Developers
1 minute ago, Alvaro said:

But the question is, what has to do all that with my script?😆

That is what I stated in my second reply!  There often are far better ways to automate something than using pixelsearch.
Either way ...  success with your endeavor and hope somebody can help you as I am not a PixelSearch() approach programmer. :) 

Jos  

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

Link to comment
Share on other sites

Ok Jos, thanks for trying to solve my problem. As I was telling you, for exactly identificate the advise of notification I think that is the only way so the script can detect the animation. I hope someone can solve my problem or tell me a possible solution.

Alvaro

Link to comment
Share on other sites

When i adjust the coordinates to fit inside the screen i dont get the error. In this particular monitor i am on right now, i got 1024 width, so if i run the script i get the error, but when i change the value to anything under that, it's ok.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

15 hours ago, careca said:

When i adjust the coordinates to fit inside the screen i dont get the error. In this particular monitor i am on right now, i got 1024 width, so if i run the script i get the error, but when i change the value to anything under that, it's ok.

Maybe I have a monitor problem because the script has a lower resolution than the monitor and fails.

Link to comment
Share on other sites

Try to maximize the active window too to make sure the window resolution is higher than the script values.

What does @desktopwidth report?

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

On 7/6/2020 at 5:46 PM, careca said:

Try to maximize the active window too to make sure the window resolution is higher than the script values.

What does @desktopwidth report?

Wow, I have tried that and sometimes the script works if I maximize the windows. But Im still testing why sometimes keeps saying that error. Also thanks Careca.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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