lordicast Posted June 25, 2009 Posted June 25, 2009 I enjoy getting jokes from BigDod jokes thread so I decided to make this tribute for getting jokes from there to a msgbox every hour. It brings joy to my job getting a message every hour to make me smile. It does have some glitches like with HTML pic's but overal it works for like 96% of them I know, I could have used a gui with IE embeded I just didnt want too. Hope you like it. PS you have to be logged on or have the autoit cookie saved for it to work. -Lordi #include <IE.au3> ;Joke Thread V, A Tribute to BigDod ;By LordiCast GetJoke() Func GetJoke() $oIE = _IECreate ('http://www.autoitscript.com/forum/index.php?showtopic=73554&st='&Random(0,885,1),0,0) $Source = _IEDocReadHTML ($oIE) $SS = StringInStr($Source,'<DIV class=postcolor id',0,Random(1,10,1),40) $SourceStart= $SS+36 $SE = StringInStr($Source,'<!--IBF.ATTACHMENT',0,1,$SourceStart) $SourceEnd = $SE - $SourceStart $JokeRaw = StringMid($Source,$SourceStart,$SourceEnd) $Joker1 = StringReplace($JokeRaw,'<BR>',@CRLF) $Joker2 = StringReplace($Joker1,'<B>',' ') $Joke = StringReplace($Joker2,'</B>',' ') $MoreJokes = MsgBox(3,'BigDod Jokes V',$Joke&@CRLF&@CRLF&'================='&@CRLF&'Would Like to hear another?') If $MoreJokes = 6 Then GetJoke() ElseIf $MoreJokes = 7 Then ToolTip('Another Joke in 60 Mins') Sleep(5000) ToolTip('') sleep(1000*60*60) GetJoke() Else Exit EndIf EndFunc [Cheeky]Comment[/Cheeky]
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