Jump to content

Recommended Posts

Posted (edited)

Hello,

After realizing how annoying it was to receive a new email each New Reply in a Topic or New Personal Message, I decided to create a script that will check for that & notify me. This is real handy since sometimes I want to work on scripts and chat on the forum at the same time. I used an MSN-like GUI for the notification, if you click on it, it will navigate you to the latest reply, if you right-click on it, it will close. It seems to work fine, I've tested it out for a while and it's lookin' pretty good. You can keep updated on as many topics as you want so you can work on new projects & post in the forums! This script requires you to already be logged in, if you are receiving errors that you aren't logged in, simply re-log in and try again (this rarely happens). I've also included a Recent Notifications tray menu item incase you were away for a couple of minutes, this will keep you updated on events that have occured i.e. New Notifications, Errors, etc. ( handy when you need a bathroom break :P ).

This script uses one file located at: @TempDir & "\ForumNotification.dat". This file is used to keep track of your settings. Just thought I'd let you guys know, I hate when scripts write files that I am unaware of. To delete this file, click the "Set to Default" button.

How exactly does this work? The script records the latest reply on the topic link, and after every X seconds/minutes, it will grab the latest reply and compare it to the original reply. The script only uses _InetGetSource for the internet functions.

Please post ANY problems that you experience.

I'd also like to hear some improvements & feedback :whistle:

Kurt

For those who may receive Msgbox's saying that they are not logged in, try re-logging into the forums and make sure you are logged into IE first.

Update 3: [April 2nd]

Added Auto-Login & Some Minor fixes

Update 2: [March 26th]

Fixed "Invalid Topic" bug from topics with no replies

Update 1: [March 19th]

Added option to save your settings.

Posted Image

Go ahead and test it! Run the script, post here, and watch the notification window pop up!

Edited by _Kurt

Awaiting Diablo III..

  • Replies 43
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Moderators
Posted

This is weird... I was going to do something like this last week but couldn't find the time. Nice.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Handy tool !

could you make a save function for the url's

with autoload on startup ?

couse every time i restart the comp i have to reinsert the url's

that would be a nice future

nice done !

jpam

Posted (edited)

@jpam - Your suggestion has been added, see first post.

EDIT: Problem Fixed

@Rest - Thanks :whistle:

Kurt

Edited by _Kurt

Awaiting Diablo III..

Posted (edited)

I have just tried re logging in Firefox, and login in in IE. No success at all. Still tells me I am not logged in..

Hmm, try running this small script, don't change any lines. If you get an AU3Check error or a blank msgbox, this means that this won't be able to work. However, if you get a msgbox containing "X New Messages", I know how to fix your problem so we'd be in luck :whistle: .

EDIT: Problem solved

Hope it works,

Kurt

Edited by _Kurt

Awaiting Diablo III..

Posted (edited)

Thanks Kurt. I appreciate it. :whistle:

C:\Documents and Settings\Administrator\Bureaublad\Nieuw - AutoIt v3 Script.au3 (10) : ==> Subscript used with non-Array variable.: 
MsgBox(0,"",$CheckPM[0]) 
MsgBox(0,"",$CheckPM^ ERROR

Edit1:By the way, I manually checked the source of the page and it was there...

&middot;&nbsp;<a href="http://www.autoitscript.com/forum/index.php?act=Msg&amp;CODE=01">-1 New Messages</a>

Edit2: This works:

#Include <Inet.au3>
#Include <String.au3>

$link = "http://www.autoitscript.com/forum/index.php?showtopic=42878"
$source2  = _INetGetSource($link)
If @error = 1 Then
    MsgBox(0,"","ERROR: Failed to retrieve source code from: " & $link)
Else
    $a = StringRegExp($source2,"[0-9]+.New Messages",3)
    If Not @error Then
        MsgBox(0, "", $a[0])
    EndIf
EndIf
Edited by Manadar
Posted

Or with the negative posts bug: :whistle:

#Include <Inet.au3>
#Include <String.au3>

$link = "http://www.autoitscript.com/forum/index.php?showtopic=42878"
$source2  = _INetGetSource($link)
If @error = 1 Then
    MsgBox(0,"","ERROR: Failed to retrieve source code from: " & $link)
Else
    $a = StringRegExp($source2,"-?[0-9]+.New Messages",3)
    If Not @error Then
        MsgBox(0, "", $a[0])
    EndIf
EndIf
Posted (edited)

That actually gives me an error... I've confirmed that I'm actually not logged in.

#include <INet.au3>

$login = _INetGetSource("http://www.autoitscript.com/forum/")
If @error = 1 Then
    MsgBox(0,"","Error getting source: " & @error)
Else
    MsgBox(0, "", StringInStr($login,"Welcome Guest"))
EndIf

Gives a message box with a number 51xx. This confirms that I am a Guest. _INetGetSource just sucks...

Edit: Upps!! IE had knocked me offline.. :whistle: for Microsoft.

I got it working, and I have no clue what I changed.. :|

Edited by Manadar
Posted (edited)

Problem Fixed

Kurt

EDIT: Yeepey! Had me scared for a second :whistle:

Edited by _Kurt

Awaiting Diablo III..

Posted

Is the script working for you now? or are you still experiencing similar problems?

Kurt

Awaiting Diablo III..

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
  • Recently Browsing   0 members

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