user52 Posted December 19, 2006 Posted December 19, 2006 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
theguy0000 Posted December 19, 2006 Posted December 19, 2006 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 EndFuncyes, 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 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
user52 Posted December 19, 2006 Posted December 19, 2006 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 crude? i dunno...like this?? ;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
theguy0000 Posted December 19, 2006 Posted December 19, 2006 like this?? ;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 EndFuncyes, 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
user52 Posted December 20, 2006 Posted December 20, 2006 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??
yehia Posted January 6, 2009 Posted January 6, 2009 any func or object to notify for received msgs? My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine
yehia Posted January 6, 2009 Posted January 6, 2009 i found this one in the udfs func _msngetchattext($win) if not IsObj($win) then return 0 $his = $win.History return $his endfunc this var $win what do it refares for? i tried to put the window name but didnt work and returned 0 My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine
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