WhatPulse Forums
Bloopy presents a "WhatPulse AFK" script for mIRC - Printable Version

+- WhatPulse Forums (http://whatpulse.org/forums)
+-- Forum: Community (/forumdisplay.php?fid=34)
+--- Forum: General Discussion (/forumdisplay.php?fid=52)
+--- Thread: Bloopy presents a "WhatPulse AFK" script for mIRC (/showthread.php?tid=46)

Pages: 1 2 3


Bloopy presents a "WhatPulse AFK" script for mIRC - Bloopy - 08-09-2005 10:15 AM

edit: Since WhatPulse v2, this does not work. I use a manual away script now: http://hawkee.com/scripts/33500316/

Hi, I have my computer running mIRC nearly all the time, so I decided it would be good for me to have a script that changes my nickname automatically when I go away. Now that I'm sure it works well, I'll share it with you. Most mIRC away scripts only check if you are idle on IRC, and don't know if you are at your keyboard using other programs. This one does. 8)

This script checks when WhatPulse last modified its data file to get an idea of whether you are AFK or not, and if necessary it changes your nickname according to the nicknames you have set in the options. WhatPulse checks if it needs to update its file every 5 minutes, so the effect of this script is not instant. When you go AFK, it may be an extra 6 minutes before your nick changes to your away nick. When you come back from being away, it could also be up to 6 minutes before your nick changes back. However, if you type something on IRC, your nick will change back immediately. This script should not affect WhatPulse in any way.

INSTRUCTIONS:
  • First, load the script. Place WPAFK.mrc in your mIRC directory and use the following command in mIRC:

    /load -rs WPAFK.mrc

    You will then be asked to enter a few settings.

    If you don't want to place it in your main mIRC directory, you can specify a sub-directory or path, for example:
    /load -rs scripts\WPAFK.mrc or /load -rs C:\scripts\WPAFK.mrc
  • Second, if you have WhatPulse set to pulse every few hours, I suggest you change it to pulse after a certain number of keys or when you shut down, or just pulse manually. This is because if you pulse after a certain number of hours then the script will guess that you are at your computer every time it pulses.

This script can work across multiple server connections in mIRC. Your nick will change at slightly different times on each server. The script should hopefully also work on old versions of mIRC which don't support multiple server connections. If it can't find the file, it will think that you are away all the time.

If you change your nickname the script will soon change it back, so you need to change your nickname in the script's menu. It also doesn't set any kind of away message or send any message to the channels you are on.

I'm happy with how the script works for me now, but feel free to post some questions or feature requests.


Update, October 2005:

The script can now let you have different nicknames on different networks, and it asks you for a default away suffix to add to your nickname when you go away. Your away nick doesn't have to use a suffix format though. It also remembers the nicknames you used on a network, and whether you had the script on or off for that network.

It now looks for WhatPulse's data file in C:\Program Files\WhatPulse\ by default, so you may not need to tell it where WhatPulse is. You can also set a different location when you need to.

You can now set an away time: the number of minutes before you are considered away. This means you can go away and come back for 5-10 minutes at a time without your nickname changing often. You can also specify to temporarily disable the script for a number of minutes - this is good if you are just back for a moment and you don't want the script to think you are back from away.



Bloopy presents a "WhatPulse AFK" script for mIRC - smitmartijn - 08-09-2005 05:26 PM

Good idea in a way, but WhatPulse writes the WhatPulse.bin file every ~5 minutes even if you're AFK.


Bloopy presents a "WhatPulse AFK" script for mIRC - Bloopy - 08-09-2005 09:24 PM

I've been using this away script and it works just as I described. The modified time of the file that I am reading doesn't change unless a key or mouse button has been pressed or the program has pulsed during that 5 minutes.


Bloopy presents a "WhatPulse AFK" script for mIRC - smitmartijn - 08-10-2005 05:41 AM

I blame Windows. ;-)

It does write the file every 5 minutes, but if it's the same file size (nothing has changed) Windows doesn't change the mtime. Nice. :-)


Bloopy presents a "WhatPulse AFK" script for mIRC - Bloopy - 08-10-2005 06:06 AM

Windows is clever! Rolleyes


Bloopy presents a "WhatPulse AFK" script for mIRC - antido - 08-11-2005 07:14 AM

Windows is not, windows is a well-covered ripper Wink


Bloopy presents a "WhatPulse AFK" script for mIRC - Large Duck - 08-11-2005 02:41 PM

lovely


Bloopy presents a "WhatPulse AFK" script for mIRC - RadarListener - 08-11-2005 10:59 PM

antido Wrote:Windows is not, windows is a well-covered ripper Wink
Big Grin so true. If FF didn't have tabbed browsing, per-pixel alpha png rendering and so on then IE7 wouldn't either.


Bloopy presents a "WhatPulse AFK" script for mIRC - Shawchert - 08-15-2005 06:10 AM

windows is evil EVIL i tell you!


Bloopy presents a "WhatPulse AFK" script for mIRC - eXoR - 08-15-2005 03:46 PM

I think it's better to use a /scid -atl /nick %nick.WPafk instead of just /nick, as that will change the nick for all servers you're on and not just the one you currently have focus on.
Should work when you're only on one server as well.