Skip to content

PaltalkScene 9.2 Source codes

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #187818
    Departure
    Member

    Okay people, This might get people interested again with programming apps for paltalk 😕

    The following source codes is for:

    1. Sending Text to paltalk
    2. Getting Text from paltalk
    3. Cleaning Text that has been retrived from paltalk

    I code slighly diffrent from Admin and the other paltalk programmers here so it might be worth your while to take a look

    //Enjoy, and I hope to see more pepole coding apps for paltalk.

    #187830
    Admin
    Administrator

    Thanks man, I gonna see if I can use some of ya codes on getting the last line, tha shit is killing me lol

    #187829

    cool … I believed this can be recode so that it is comparable with 8.5, 9.0+, and 9.2

    #187828
    autopilot
    Member

    @GoScripted-Com wrote:

    cool … I believed this can be recode so that it is comparable with 8.5, 9.0+, and 9.2

    if you want a project that will send text to any version of pal8 or 9, you can use this

    #187827

    The link doesnt work. Maybe after the latest renovations loco did killed the article.

    #187826

    a cow was killed

    #187825
    Chike
    Member

    @Admin wrote:

    Thanks man, I gonna see if I can use some of ya codes on getting the last line, tha shit is killing me lol

    The main problem is that line count changes when you resizing the room, and also text may be too fast. What I do is to save the last character in the text and see if there are any new.
    In case there are more characters I run over all the lines that start after last known character to the current last character. That way I don’t miss any text.

    Haven’t looked at Departure’s code to see if that’s what he’s doing.

    #187824
    Admin
    Administrator

    Damn, and how would you do that 🙂 cause the code i am using suks or I dont really know, I mean I dont know if its the programs themselves that dont process the last line fast enough or the program actually dont take the last line allthe time 🙄

    #187823
    Chike
    Member

    @Admin wrote:

    Damn, and how would you do that 🙂

    For me it’s even not that critical because i do everything in pal process subclassing the text window 😉 by doing this I am sure the text window size can’t change.
    At start i do


    lines =SendMessage(rich20, EM_GETLINECOUNT, 0, 0);
    last_index = SendMessage(rich20, EM_LINEINDEX, lines - 1, 0);

    then each time i check


    lines = SendMessage(rich20, EM_GETLINECOUNT, 0, 0);
    index = SendMessage(rich20, EM_LINEINDEX, lines - 1, 0);
    if (index <= last_index)
    return;
    last_line = 1 + SendMessage(rich20, EM_EXLINEFROMCHAR, 0, last_index);

    And then go over the lines last_line to lines, as I am confident the lines are not going to change during this time.
    For you it may be a bit more complicated. Maybe get the line by index and after you get the text make sure the line index didn’t change, and if it did do it over gain.

    #187822
    Admin
    Administrator

    aighty, the what i will try next thanks 🙂

    #187821
    Chike
    Member

    Actually there’s a little bug in my code, since the room text is sometimes cleared.
    The second part should be changed to update new text length:


    lines = SendMessage(rich20, EM_GETLINECOUNT, 0, 0);
    index = SendMessage(rich20, EM_LINEINDEX, lines - 1, 0);
    if (index < last_index) {
    last_index = index;
    return;
    }
    if (index == last_index)
    return;
    last_line = 1 + SendMessage(rich20, EM_EXLINEFROMCHAR, 0, last_index);

    In case you’re polling you may lose some text at this point, but i can’t see a way to avoid it.
    Maybe check the last line anyway, as I am guessing the trigger for clearing the text is when a new text is inserted and the text exceededs certain length, or line count.

    #187820
    Admin
    Administrator

    Ah, now you lost me lol, but why would you loose some text, you mean is the line is too long?

    #187819
    Chike
    Member

    If you are polling, with a timer, and more than one line was added since last time you checked and then part of the text was cleared.
    The text is now shorter, and the last_index must be aupdated to a new value that is less than it was before, so there is no way to tell what text is new and what you already checked.
    But it is very rare that it happens, I wouldn’t worry about it at all. At most the bot will miss a command once a day.
    I was just pointing the possibility it may happen LOL

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.