Jump to content
Sign in to follow this  

Error with for loop, string splitting and gui creation

Recommended Posts


it seems that when i retreive the messages that all messages will go into the firstconversation windows opened (in the video =|EmoYasha|=) and when you close a window the next message will pop up in the first windows messages again erasing all messages there but will then behave normaly from there on.

also when i close the main window it hides the contact list plus the second chat window and only shows the chat window when i double click the icon.

I will include the loop that gets and parses messages (for the code of the entire project is very long) for the erors with messages going to the wrong place but if anyone would be kidn enough to help fix the window hiding problem or needs the full code to help please ask.

and incase any of you need to know messages are formated liek this in the mysql databse



=|EmoYasha|=:Hey Suplinzafrix:I Love You.

thanks so much,


Video example:


messages function:

Func _getmessages()
    ConsoleWrite("getting messages" & @CRLF)
    $messages = _INetGetSource($site & "/messenger/check2.php?login=" & $user & "&pass=" & $pass & "&act=info&request=messages")
    $messages = StringTrimRight($messages, 5)
    ConsoleWrite("messages:" & $messages & @CRLF)
    $messagearay = StringSplit($messages, "[/*]", 1)
    For $x2 = 1 To UBound($messagearay) - 2
        $messx = StringSplit($messagearay[$x2], ":")
        ConsoleWrite($messx[1] & @CRLF)
        If WinExists($messx[1] & " - Conversation") Then
            For $r = 0 To $MaxChildWindow - 1
                If $ChildConversation[$r] = $messx[1] Then
                    $Read = _IEBodyReadHTML($ChildShowText[$r])
                    If $Read == 0 Then
                        $Read = ""
                    _IEBodyWriteHTML($ChildShowText[$r], $Read & $messx[1] & ":" & $messx[2] & "<br>")
                    $iDocHeight = $ChildShowText[$r] .document.body.scrollHeight
                    $ChildShowText[$r] .document.parentwindow.scrollTo(0, $iDocHeight)
            $q = @extended
            _IEBodyWriteHTML($ChildShowText[$q], $messx[1] & ":" & $messx[2] & "<br>")
            GUISetCursor(3, 1)
            If Not WinActive($ChildWindow[$q]) Then
                WinFlash($ChildWindow[$q], "", 2, 250)
EndFunc   ;==>_getmessages

Share this post

Link to post
Share on other sites

Also this may be related to the hiding error above but when i hit log out or exit it exits the second opened windows and not all contact windows, and then leaves the contact list open and messages keep coming.

Share this post

Link to post
Share on other sites

Tut tut ...

If I remember correctly EmoYasha is on the banned list ... quite a big omission from your part to copy-paste directly from your log and to leave such information there ...


=|EmoYasha|=:Hey Suplinzafrix:I Love You.

That automatically raises the question ... aren't you (this account) EmoYasha trying to avoid his ban?

It is not up to me to decide this, all I will do is to ask a moderator to look into this.

If I'm wrong, you will have my apologies.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post

Link to post
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
Sign in to follow this