Jump to content

aaah "stuck!"


AceLoc
 Share

Recommended Posts

well ..

#Include <Array.au3>
$MSN = _MSNCreate()

;--------------------------------Func _MSNCreate--------------------------------
Func _MSNCreate()
$MSN = ObjCreate('messenger.msgrobject')
$MSN2 = ObjCreate('Messenger.MessengerApp')
$Functions = ObjEvent($MSN,"_msn_")
Dim $Val
$Val = _ArrayCreate("", $MSN, $MSN2)
If IsObj($Val[1]) And IsObj($val[2]) Then
    Return $Val
    Else
    Return 0
EndIf
EndFunc

;--------------------------------Func _MSNGetName--------------------------------
Func _MSNGetName($Object)
If IsObj($Object[1]) Then 
    $Name = $Object[1].LocalFriendlyName
    Else
    $Name = 0
EndIf
Return $Name
EndFunc

;----------------------------Func _MSNGetEmailAdress-----------------------------
Func _MSNGetEmailAdress($Object)
If IsObj($Object[1]) Then 
    $Name = $Object[1].LocalLogonName
    Else
    $Name = 0
EndIf
Return $Name
EndFunc

;-------------------------------Func _MSNSetState--------------------------------
Func _MSNSetState($Object, $State)
    If Not IsObj($Object[1]) Then Return 0
    If $State = "offline" Then $State = 1
    If $State = "online" Then $State = 2
    If $State = "invisible" Then $State = 6
    If $State = "out to lunch" Then $State = 66
    If $State = "on the phone" Then $State = 50
    If $State = "idle" Then $State = 18
    If $State = "away" Then $State = 34
    If $State = "brb" Then $State = 14
    If Not StringIsDigit($State) Then Return -1
$Object[1].LocalState = $State
Return $State
EndFunc

;--------------------------------Func _MSNLogOff---------------------------------
Func _MSNLogOff($Object)
If IsObj($Object[1]) Then
$Object[1].Logoff
Return 1
Else
Return 0
EndIf
EndFunc

;--------------------------------Func _MSNGetState--------------------------------
Func _MSNGetState($Object)
If Not IsObj($Object[1]) Then Return 0
$State = $Object[1].LocalState
    If $State = 1 Then $State = "offline"
    If $State = 2 Then $State = "online"
    If $State = 6 Then $State = "invisible"
    If $State = 66 Then $State = "out to lunch"
    If $State = 50 Then $State = "on the phone"
    If $State = 18 Then $State = "idle"
    If $State = 34 Then $State = "away"
    If $State = 14 Then $State = "brb"
    If $State = 512 Then $State = "Connecting to Server"
    If $State = 1024 Then $State = "Disconnecting from Server"
    If $State = 256 Then $State = "Finding Server"
    If $State = 768 Then $State = "Synchronizing with Server"
If Not StringIsDigit($State) Then
Return $State
Else
Return 0
EndIf 
EndFunc

;---------------------------------Func _MSNLogin---------------------------------
Func _MSNLogin($Object)
If Not IsObj($Object[2]) Then Return 0
$Object[2].AutoLogin
Return 1
EndFunc

;----------------------------Func _MSNOpenChatWindow-----------------------------
Func _MSNOpenChatWindow($Object, $Email)
If Not IsObj($Object[2]) Then Return 0
$Object = $Object[2]
$Win = $Object.LaunchIMUI($Email)
Return $Win
EndFunc

;----------------------------Func _MSNCloseChatWindow----------------------------
Func _MSNCloseChatWindow($Win)
If Not IsObj($Win) Then Return 0
$Win.Close
Return 1
EndFunc

;-------------------------------Func _MSNSendText--------------------------------
Func _MSNSendText($Win, $Msg)
If Not IsObj($Win) Then Return 0
$Win.SendText($Msg)
Return 1
EndFunc

;-----------------------------Func _MSNWindowMembers-----------------------------
Func _MSNWindowMembers($Win)
If Not IsObj($Win) Then Return 0
$Mem = $Win.Members.Count
Return $Mem
EndFunc

;------------------------------Func _MSGGetChatText------------------------------
Func _MSNGetChatText($Win)
If Not IsObj($Win) Then Return 0
$His = $Win.History
Return $His
EndFunc

it doesnt create the "msn window" any idea's ? :)

THanks!

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...