Jump to content

Recommended Posts

Posted

yay. All done. BUT NOT YET TESTED

...

Good work theguy0000

so far this works...

$oMSN = ObjCreate("Messenger.UIAutomation.1")

;sets windows live messenger status to 'away'
_msnmSetStatus($oMSN, "away")

Func _msnmSetStatus ($object, $iStatus)
    If NOT IsObj($object) Then Return 0
    If $iStatus = "offline" Then $iStatus = 0x0001
    If $iStatus = "available" Then $iStatus = 0x0002
    If $iStatus = "invisible" Then $iStatus = 0x0006
    If $iStatus = "busy" Then $iStatus = 0x000A
    If $iStatus = "be right back" Then $iStatus = 0x000E
    If $iStatus = "idle" Then $iStatus = 0x0012
    If $iStatus = "away" Then $iStatus = 0x0022
    If $iStatus = "on the phone" Then $iStatus = 0x0032
    If $iStatus = "out to lunch" Then $iStatus = 0x0042
    If NOT StringIsDigit($iStatus) Then Return -1
    $object.MyStatus = $iStatus
    Return $iStatus
EndFunc
  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Good work theguy0000

so far this works...

$oMSN = ObjCreate("Messenger.UIAutomation.1")

;sets windows live messenger status to 'away'
_msnmSetStatus($oMSN, "away")

Func _msnmSetStatus ($object, $iStatus)
    If NOT IsObj($object) Then Return 0
    If $iStatus = "offline" Then $iStatus = 0x0001
    If $iStatus = "available" Then $iStatus = 0x0002
    If $iStatus = "invisible" Then $iStatus = 0x0006
    If $iStatus = "busy" Then $iStatus = 0x000A
    If $iStatus = "be right back" Then $iStatus = 0x000E
    If $iStatus = "idle" Then $iStatus = 0x0012
    If $iStatus = "away" Then $iStatus = 0x0022
    If $iStatus = "on the phone" Then $iStatus = 0x0032
    If $iStatus = "out to lunch" Then $iStatus = 0x0042
    If NOT StringIsDigit($iStatus) Then Return -1
    $object.MyStatus = $iStatus
    Return $iStatus
EndFunc
yes, but I like using the constants that are at the top. $MSN_STATUS_BUSY and such. String are just....i dunno the word im looking for here :P crude? i dunno...

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

yes, but I like using the constants that are at the top. $MSN_STATUS_BUSY and such. String are just....i dunno the word im looking for here :D crude? i dunno...

like this?? :P

;status codes
$MSN_STATUS_UNKNOWN = 0x0000
$MSN_STATUS_OFFLINE = 0x0001
$MSN_STATUS_AVAILABLE = 0x0002
$MSN_STATUS_INVISIBLE = 0x0006
$MSN_STATUS_BUSY = 0x000A
$MSN_STATUS_BRB = 0x000E
$MSN_STATUS_IDLE = 0x0012
$MSN_STATUS_AWAY = 0x0022
$MSN_STATUS_PHONE = 0x0032
$MSN_STATUS_LUNCH = 0x0042
$MSN_STATUS_FINDING_SERVER = 0x0100
$MSN_STATUS_CONNECTING = 0x0200
$MSN_STATUS_SYNCING = 0x0300
$MSN_STATUS_DISCONNECTING = 0x0400

$oMSN = ObjCreate("Messenger.UIAutomation.1")

;sets windows live messenger status to 'away'
_msnmSetStatus($oMSN, $MSN_STATUS_AWAY)

Func _msnmSetStatus ($object, $iStatus)
    If NOT IsObj($object) Then Return 0
    $object.MyStatus = $iStatus
    Return $iStatus
EndFunc
Posted

like this?? :P

;status codes
$MSN_STATUS_UNKNOWN = 0x0000
$MSN_STATUS_OFFLINE = 0x0001
$MSN_STATUS_AVAILABLE = 0x0002
$MSN_STATUS_INVISIBLE = 0x0006
$MSN_STATUS_BUSY = 0x000A
$MSN_STATUS_BRB = 0x000E
$MSN_STATUS_IDLE = 0x0012
$MSN_STATUS_AWAY = 0x0022
$MSN_STATUS_PHONE = 0x0032
$MSN_STATUS_LUNCH = 0x0042
$MSN_STATUS_FINDING_SERVER = 0x0100
$MSN_STATUS_CONNECTING = 0x0200
$MSN_STATUS_SYNCING = 0x0300
$MSN_STATUS_DISCONNECTING = 0x0400

$oMSN = ObjCreate("Messenger.UIAutomation.1")

;sets windows live messenger status to 'away'
_msnmSetStatus($oMSN, $MSN_STATUS_AWAY)

Func _msnmSetStatus ($object, $iStatus)
    If NOT IsObj($object) Then Return 0
    $object.MyStatus = $iStatus
    Return $iStatus
EndFunc
yes, that is how I meant it to be used.

That's how it's used in almost the rest of autoit, i mean you don't see gui messages returning "closed", they return $GUI_EVENT_CLOSE instead. etc etc...

This way is just more clean. (IMO)

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

yes, that is how I meant it to be used.

That's how it's used in almost the rest of autoit, i mean you don't see gui messages returning "closed", they return $GUI_EVENT_CLOSE instead. etc etc...

This way is just more clean. (IMO)

Yes, much cleaner. Who's up to do the rest?? :P
  • 2 years later...

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
  • Recently Browsing   0 members

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