Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Include <Misc.au3>
- Global $dll32 = DllOpen("user32.dll")
- AdlibRegister("_hotkey", 250)
- Global $aStatus
- $oSkype = ObjCreate('Skype4COM.Skype')
- $oSkypeEvent = ObjEvent($oSkype,'Skype_')
- $oError = ObjEvent('AutoIt.Error','MyErrFunc')
- If Not $oSkype.Client.IsRunning Then
- $oSkype.Client.Start()
- EndIf
- While 1
- Sleep(250)
- If $oSkype.CurrentUserStatus = $oSkype.Convert.TextToUserStatus('ONLINE') Then
- ExitLoop
- Else
- $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus('ONLINE'))
- EndIf
- WEnd
- $oSkype.Attach()
- ;~ $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus('BUSY'))
- While 1
- $status = "Aktives Fenster: " & WinGetTitle("[ACTIVE]")
- If $status = "Aktives Fenster: VLC Media Player" Then
- $status = "Anime schauen"
- $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus('BUSY'))
- EndIf
- If $status <> "Aktives Fenster: " Then $oSkype.SendCommand($oSkype.Command(0, 'SET PROFILE RICH_MOOD_TEXT ' & $status))
- Sleep (1000)
- WEnd
- Func Skype_AttachmentStatus($aStatus)
- TrayTip("Active Status", 'Attachment status ' & $oSkype.Convert.AttachmentStatusToText($aStatus), 5, 1)
- If $aStatus = $oSkype.Convert.TextToAttachmentStatus('AVAILABLE') Then
- $oSkype.Attach()
- EndIf
- EndFunc
- Func MyErrFunc()
- ConsoleWrite('Skype4COM Error !' & @CRLF)
- EndFunc
- Func _hotkey()
- If _IsPressed("1B", $dll32) Then Exit
- Sleep (100)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement