Jump to content

Yahoo IM


Fur
 Share

Recommended Posts

So I have a script I use to run some stuff remotely that I connect and communicate through Yahoo messenger. Unfortunately, I cannot consistently read the message contents. Sometimes it works a dozen times, some times it fails a dozen times, its all over the map with no rhyme or reason. If anyone has any ideas why the clipboard keeps coming up empty, I would sure appreciate hearing it!

Func ProcessWindow($title)
   ClipPut("")
   
   WinActivate($title)
   WinSetState($title, "", @SW_RESTORE)
   if WinWaitActive($title, "", 5) = 0 Then
      ConsoleWrite("Yahoo window never became active." & @LF)
      WinClose($title, "")
      Return
   Endif
   
   ControlFocus($title, "", "YHTMLContainer1")
   ControlSend($title, "", "YHTMLContainer1", "^a^c")
   Sleep(200)
   Return StringStripWS (ClipGet(), 3)
Endfunc
Link to comment
Share on other sites

  • 1 month later...

i was messing around with the chat portion of yahoo messenger a while back.

this is what i came up with, before i decided to work on a different chat client.

you will need to be logged into a chat room with yahoo messenger, and this chatroom must have focus for this to work.

Opt("WinTitleMatchMode", 2) 

; Disable ads
ControlDisable( "Chat", "", "Internet Explorer_Server1")
ControlHide( "Chat", "", "Internet Explorer_Server1")

ControlFocus( "Chat", "", "YHTMLContainer1") 
send("^{a}")
send("^{c}")
$text = ClipGet()
  $prevline = ""    
$i =0
Do
ControlFocus( "Chat", "", "YHTMLContainer1")
send("^{a}")
send("^{c}")
$text = ClipGet()
$text2 = StringSplit($text, @CRLF, 1)
$text3 = $text2[0]
$currentline = $text2[$text3]
If $prevline <> $currentline Then
$prevline = $currentline
MsgBox (0, "title",$currentline, 1)
EndIf
Until $i =1

if every thing has gone well, this script will popup a msgbox with the newest line of text every time the text changes.

It is really sad to see a family torn apart by something as simple as a pack of wolves.

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...