Jump to content
Sign in to follow this  

Away Messenger v1.0

Recommended Posts


I Got Bored Again.. xD ;) Its A Fast Easy Way 2 Set An Away Message And It Logs Who Messages You And If You Wanna Try It For Other Messengers Just Change " $Key_Word " :D

Steps :

1. Set A Message

2. When You Wanna Go Away Press Away Mode

3. Then When Your Back Press Back XD!!!!!!

Away Messenger v1.0 - Source

#Include <GUIConstants.Au3>
#Include <Date.Au3>
Opt ('GUIOnEventMode','1')
Opt ('WinTitleMatchMode','2')

Global $Away = False, $Back = True, $Key_Word = ('Conversation')

GUICreate ('Away Messenger v1.0 - By John O.','350','144','-1','-1','-1','128')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit')
$Status = GUICtrlCreateInput ('Status : Online','0','5','350','20','1')
GUICtrlSetFont ($Status, '10','','','Lucida Console')
GUICtrlSetState ($Status, $GUI_DISABLE)
$Message = GUICtrlCreateEdit ('','0','30','350','75')
GUICtrlSetFont ($Message, '10','','','Lucida Console')
GUICtrlSetColor ($Message, '0x0000FF')
$Button = GUICtrlCreateButton ('Away Mode','125','111','90','28')
GUICtrlSetFont ($Button, '10','','','Lucida Console')
GUICtrlSetColor ($Button, '0xFF0000')
GUICtrlSetOnEvent ($Button, '_Away_Mode')
GUISetState (@SW_SHOW)

While ('1')
Sleep ('10')
If $Away = True And $Back = False Then 
If WinExists ($Key_Word) Then _Message_Event (WinGetTitle ($Key_Word))

Func _Message_Event ($Full_Title)
ClipPut ('Away Message : ' & @CRLF & GUICtrlRead ($Message))
WinActivate ($Full_Title)
WinSetState ($Full_Title, '', @SW_MAXIMIZE)
WinActivate ($Full_Title)
Sleep ('1000')
Send ('{CtrlDown}{V}')
Send ('{CtrlUp}')
Sleep ('500')
Send ('{Enter}')
Sleep ('500')
WinClose ($Full_Title)
_Log ($Full_Title)

Func _Away_Mode ()
If GUICtrlRead ($Message) <> '' Then 
GUICtrlSetData ($Status, 'Status : Away')
GUICtrlSetData ($Button, 'Back')
GUICtrlSetOnEvent ($Button, '_Back')
GUICtrlSetColor ($Button, '0x0000FF')
GUICtrlSetState ($Message, $GUI_DISABLE)
$Away = True
$Back = False

Func _Back ()
GUICtrlSetData ($Status, 'Status : Online')
GUICtrlSetData ($Button, 'Away Mode')
GUICtrlSetOnEvent ($Button, '_Away_Mode')
GUICtrlSetColor ($Button, '0xFF0000')
GUICtrlSetState ($Message, $GUI_ENABLE)
$Away = False
$Back = True 

Func _Log ($Data)
$String = StringSplit ($Data, ' -')
FileWriteLine (@ScriptDir & '\Log.txt', '[' & _NowTime () & '] ' & $String['1'] & ' Sent You A Message.')

Func _Exit ()

Hope You Enjoy ~~

Please Leave Comments, Bugs, Etc... ;)

- John

Edited by John2006

Latest Projects :- New & Improved TCP Chat

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.