Sign in to follow this  
Followers 0
THECARDNEXUS

Timeout code

7 posts in this topic

I have spent a hour or so searching for something to do this with. I am new to autoit, and I want to get the program to watch a area of the screen. if that area does not change within X timeframe I want it to complete the script.

So idea is

Watch pixel box for change in checksum.

Checksum doesnt change for X minutes

Continue script.

sorry if this is basic or a function I missed. I tried several different searches both google and the forums here.

Share this post


Link to post
Share on other sites



Did you see the function PixelChecksum()?

Share this post


Link to post
Share on other sites

Did you see the function PixelChecksum()?

Right, that waits for a specific checksum to be shown, or waits for the current one to change. I want to have a timeout if the pixelchecksum does NOT change. IE the program stalls essentially.

Share this post


Link to post
Share on other sites

Look at the example in the documentation for pixelchecksum(). The only thing missing for what you want is a timer. Everything you want can be done with functions TimerInit(), TimerDiff() and keyword "ExitLoop". Give it one more shot to figuire it out by yourself, show me any kind of attempt at writting it and ill give you all the help you want.

Share this post


Link to post
Share on other sites

Figured it out. Wasnt good enough at autoit when I wrote this post to remotely understand what to do. 30 hours of playing later and I understood autoit well enough to write this script.

Thanks Beege

Share this post


Link to post
Share on other sites

Would you run two scripts launched at the same time. One is the process you want complete, the other is a while loop that sleeps for 30 second intervals, and does a timerdiff to calculate the 5min limit. If the timerdiff is greater than 5min then kill both scripts?

I know this is easy for you, but for some it would be fun to get the most efficient code without having to work for it.

-Stephen

Share this post


Link to post
Share on other sites

What about AdlibRegister? Then you'll just have the one script.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
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
Sign in to follow this  
Followers 0