z0mgItsJohn Posted August 25, 2008 Posted August 25, 2008 (edited) 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 " 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 expandcollapse popup#Include <GUIConstants.Au3> #Include <Date.Au3> #NoTrayIcon 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)) EndIf WEnd 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) EndFunc 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 EndIf EndFunc 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 EndFunc Func _Log ($Data) $String = StringSplit ($Data, ' -') FileWriteLine (@ScriptDir & '\Log.txt', '[' & _NowTime () & '] ' & $String['1'] & ' Sent You A Message.') EndFunc Func _Exit () Exit EndFunc Hope You Enjoy ~~ Please Leave Comments, Bugs, Etc... - John Edited August 25, 2008 by John2006 Latest Projects :- New & Improved TCP Chat
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