foray Posted April 29, 2009 Posted April 29, 2009 hey there, i got a small problem. sometimes my function call "protector($protectthreadlink[0], $hostername[0])" needs to much time or hang up at all, cause of the website isn´t reachable or something like that. is there any way to skip the current function call and go to the next $i?! best case would be a timer for about 10 seconds. if function dosnt get ready at this 10 seconds, skip to the next entry... hotkey would be also possible! maybe someone can help! Thanks! While 1 Sleep(10) WEnd Func decrypt() $SourceCode = _FFReadHTML() select Case StringInStr ($SourceCode,"protector.to") = True $protectthread = _StringBetween($SourceCode, '<div class="fileinfo">','<td class="name">') For $i = 0 To UBound($protectthread) -1 $hostername = _StringBetween($protectthread[$i], 'Hoster: ','<br') $protectthreadlink = _StringBetween($protectthread[$i], 'a href="','"') protector($protectthreadlink[0], $hostername[0]) Next EndSelect EndFunc
Developers Jos Posted April 29, 2009 Developers Posted April 29, 2009 RelatedContinueLoop, ExitLoop 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.
foray Posted April 29, 2009 Author Posted April 29, 2009 hmm thanks at all, but how to integrate a timer?! any ideas/hints? thanks!
Developers Jos Posted April 29, 2009 Developers Posted April 29, 2009 Define integrate Timer. Sleep() -> pause a defined period TimerInit() & TimerDiff() -> Test for a particular period. 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.
foray Posted April 29, 2009 Author Posted April 29, 2009 thanks again, but the basic stuff i already know, but i have no clue howto integrate it can u gimme a little example, would be great!
Developers Jos Posted April 29, 2009 Developers Posted April 29, 2009 Don't understand the question: The helpfile gives coding examples of all Functions, so you will have to show us what you want to do before I can comment. 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.
WideBoyDixon Posted April 29, 2009 Posted April 29, 2009 I assume we're ignoring the obvious error here: Case StringInStr ($SourceCode,"protector.to") = True In addition, you need to change your function called protector() so that it can time out. You can't force a "Next" while your script is executing that function. WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center]
Skruge Posted April 29, 2009 Posted April 29, 2009 I assume we're ignoring the obvious error here: Case StringInStr ($SourceCode,"protector.to") = TrueStringInStr returns 0 if the substring isn't found, and a non-zero if it is. Numbers can be compared to True/False, so there's no error here. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now