Mosquitos Posted March 10, 2006 Share Posted March 10, 2006 SAPI.SpVoice from Sykes Agent.Control from Kjactive PC messenger from Valuater expandcollapse popup#NoTrayIcon #include "GUIConstants.au3" Opt("GUICoordMode", 1) Dim $un = @UserName $talk = ObjCreate("SAPI.SpVoice") $strAgentName = "Merlin" $strAgentPath = "C:\Windows\Msagent\Chars\" & $strAgentName & ".acs" $oAgent = ObjCreate("Agent.Control") GUICtrlCreateObj($oAgent, 0, 0 , 64 , 55 ) With $oAgent .Connected = -1 $Characters = .Characters $Characters.Load($strAgentName, $strAgentPath) $Merlin = $Characters.Character($strAgentName) EndWith With $Merlin .Balloon.Style = 1 .Show EndWith Intro() Filedelete(@TempDir & "\b.tmp") RunWait("net start messenger","",@SW_HIDE) RunWait(@ComSpec & ' /c net view > ' & @TempDir & '\a.tmp',"", @SW_HIDE) Sleep(300) $file = FileOpen(@TempDir & "\a.tmp", 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileOpen(@TempDir & "\b.tmp", 1) While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $result = StringInStr($line,"\\") if $result = 1 Then $blankpos = StringInStr($line," ") $len = StringLen($line) $len = $len - $blankpos $line = StringTrimRight($line, $len) $line = StringTrimLeft($line,2) FileWrite(@TempDir & "\b.tmp", $line & "|") EndIf Wend $talk.Speak("Welcome to PC Messenger " & $un) FileClose($file) FileDelete(@TempDir & "\a.tmp") $file2 = FileReadline(@TempDir & "\b.tmp", 1) FileInstall("C:\Iemants1.bmp", @TempDir & "\Iemants1.bmp",1) $Logo = @TempDir & "\Iemants1.bmp" FileInstall("C:\transfer.wav", @TempDir & "\transfer.wav",1) $Sound_gtm = @TempDir & "\transfer.wav" FileInstall("C:\blocked.wav", @TempDir & "\blocked.wav",1) $Sound_gtd = @TempDir & "\blocked.wav" $Dummy_win = GUICreate('') $Tmesg_win = GuiCreate("PC-Messenger", 325, 320, -1, -1, -1,$WS_EX_ACCEPTFILES,$Dummy_win) GUISetFont(9, 700, -1, "MS Sans Serif") $Group_1A = GuiCtrlCreateGroup( "Message from", 10, 5, 305, 50) GUICtrlCreateLabel($un, 25, 25, 280, 20) $Group_1A = GuiCtrlCreateGroup("Message to",10, 60, 305, 50) $combo_1 = GUICtrlCreateCombo("", 120, 77, 180, 20) GUICtrlSetState(-1,$GUI_FOCUS) GUICtrlSetData(-1,$file2) $label_1 = GUICtrlCreateLabel( "Choose the PC", 25, 80, 85, 20) $Group_4 = GuiCtrlCreateGroup("Last Message Sent", 10, 200, 305, 50) $MSent = GUICtrlCreateLabel("No Recent Messages", 25, 220, 275, 20) $button_1 = GUICtrlCreateButton("Send", 57, 261, 211, 50, $BS_BITMAP) GUICtrlSetImage(-1, $Logo) GUICtrlSetTip(-1,"Press picture to send the message") $Group_3 = GuiCtrlCreateGroup("Message Text", 10, 115, 305, 80) GUICtrlCreateLabel("Please Type Your Message in the Box Below", 25, 135, 260, 20) $text = GUICtrlCreateInput("", 25, 160, 275, 20) GuiSetState (@SW_SHOW) $msg = 0 While 1 $msg = GuiGetMsg() Select case $msg = $GUI_EVENT_CLOSE FileDelete(@TempDir & "\Iemants1.bmp") FileDelete(@TempDir & "\transfer.wav") FileDelete(@TempDir & "\blocked.wav") GUISetState(@SW_HIDE) Slot() Sleep(10000) Call("Set_Exit") case $msg = $button_1 $CPUID = GuictrlRead($combo_1) If $CPUID = "" Then GUISetState(@SW_HIDE) Choose() Sleep(1000) GUISetState(@SW_SHOW) ContinueLoop EndIf $msg1 = GuictrlRead($text) If $msg1 = "" Then GUISetState(@SW_HIDE) Message() Sleep(1000) GUISetState(@SW_SHOW) ContinueLoop EndIf $runvar =RunWait(@comspec & " /c net send " & $un & " says: " & $msg1,"",@SW_HIDE) SoundPlay ($Sound_gtm,1) If $runvar > 0 Then SoundPlay ($Sound_gtd,1) GUISetState(@SW_HIDE) NotSend() Sleep(1000) GUISetState(@SW_SHOW) ContinueLoop EndIf GUICtrlSetData ( $MSent, $msg1) EndSelect WEnd Func Intro() With $Merlin .Play("Announce") .MoveTo(400,300,1000) .Speak("Welcome to PC-Messenger. " & $un) Sleep(2500) .hide EndWith EndFunc Func Choose() With $Merlin .Show .Speak(" Please choose a PC... ") Sleep(5000) .hide EndWith EndFunc Func Message() With $Merlin .Show .Speak(" Please Type a Text Message... ") Sleep(5000) .hide EndWith EndFunc Func NotSend() With $Merlin .Show .Speak(" Your Message Could Not Be Sent... ") Sleep(5000) .hide EndWith EndFunc Func Slot() With $Merlin .Show .Speak("Goodbye, " & $un) Sleep(2500) .Speak("Thank you for using PC-Messenger.") Sleep(2500) .MoveTo(0,0,1000) .Play("Wave") .hide EndWith EndFunc Func Set_Exit() $Merlin.hide Sleep(100) $oAgent = 0 Sleep(100) $talk.Speak("Goodbye " & $un) $talk.Speak("Thank you for using PC Messenger ") Exit EndFunc Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
Valuater Posted March 10, 2006 Author Share Posted March 10, 2006 (edited) very nice... just a couple of things i couldn't find the control to "turn-on" the MS messenger system the GUI disappeared and i had to close other programs to find it there is no gui tray icon to help... only shows the agent icon "show" 8) Edited March 10, 2006 by Valuater Link to comment Share on other sites More sharing options...
Mosquitos Posted March 10, 2006 Share Posted March 10, 2006 very nice... just a couple of thingsi couldn't find the control to "turn-on" the MS messenger systemthe GUI disappeared and i had to close other programs to find itthere is no gui tray icon to help... only shows the agent icon "show"8)I removed the set-up function because i found it a little bit dangerous to call the services window.If other people use this on your PC they can damaged your PC.There is also no trayicon. Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
amndalb Posted August 17, 2011 Share Posted August 17, 2011 Instead of employees getting punched in and out in their specific systems why can't you have a tool or a software kit which is being programmed and every employee who enters their cabin or the entrance enters their employee number or Id number and gets punched in??? employee timeclock Link to comment Share on other sites More sharing options...
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