Skip to content
Home > Programming > How to get a reaction on a Recieved PM?

How to get a reaction on a Recieved PM?

Viewing 15 posts - 1 through 15 (of 60 total)
  • Author
    Posts
  • #186605
    ChiNa
    Administrator

    Hi Everyone.. To our Developers and friend:

    I am making a new Tool using (vBNET 2010), but I am kinda stuck in the middle of it all! I wanted to create an Auto-Responder sendt in PM! Just like we had in Balool! The Balool Auto-Responder was working when the “AWAY” function was activated in Pal whenever I recieved a PM message, it will then respond back to the person using the same PM Window!

    Thanks to Loco I managed to create the Status and Away functions, and I also managed to create a Text Sender using Auto-Pilots Method, but without the PalRoomSelector.dll.

    My Question Starts here:
    I am now stuck on the “PM WINDOW” part.

    How can I get a “reaction” on a recieved message in pm, and most importantly how to make sure that my responder or text will be sent using the exact PM window that I am recieving the PM from!

    I hope i could some help with this now after 2 weeks of hard work! I still cant figure it out.
    Many thanks in advance,,

    #186664
    Chike
    Member

    What exactly is the question?

    #186663
    ChiNa
    Administrator

    Hi Chike, 😀 Am not the best guy when It comes to explanations. My Bad.

    My Question is, How can I set my program to read text that I recieve in my pm…… And in this case I am not talking about Reading Last lines etc…

    #186662
    String
    Member

    @ChiNa-Man wrote:

    How can I get a “reaction” on a recieved message in pm, and most importantly how to make sure that my responder or text will be sent using the exact PM window that I am recieving the PM from!

    You would do it the same way you find the chat room window and text.
    You could do something like this:

    In a timer, watch for a window with the class name DlgGroupChat Window Class.

    If you find that class name, check to see if that window contains the control CwndIMVideoBar. Only a pm window will have this particular control.

    Now that you can reasonably assume that you have a pm window, Get the windows title, text send box and text read box the same way you do with the room window.

    You can then send text(a response) to that particular window.

    You can also get the text in the pm the same way as in a room. It is a richtextbox control.

    #186661
    Chike
    Member

    Isn’t it more simple just to check the room title to tell if it’s IM window?

    #186660
    ChiNa
    Administrator

    @String wrote:

    If you find that class name, check to see if that window contains the control CwndIMVideoBar. Only a pm window will have this particular control.


    @String
    , Very usefull method, I never thought doing it this way, and I am going to create a reaction using your method and see if that will work out! I understood everybit of it and thank god the past 2-3 weeks I got to know each Window Classes in Paltalk! Now it will be easier for me to at least have a plan.


    @Chike
    , How to check if its a room title or pm. That never crossed my mind neither..? A short explanation could be very usefull to where I am right now… thank you

    #186659
    Chike
    Member

    A rooma has a “- Voice Room” or “Private Room” in it’s title, a pm does not

    #186658
    String
    Member

    @Chike wrote:

    Isn’t it more simple just to check the room title to tell if it’s IM window?

    I don’t know if it is simpler, but yes that would certainly be another way to do it. The only problem I would foresee would be if there were other DlgGroupChat Window Class‘s that were present that had neither the “Voice Room” or “Private Room” in their title, but were not a PM window either.

    #186657
    ChiNa
    Administrator

    @Chike wrote:

    Isn’t it more simple just to check the room title to tell if it’s IM window?

    I actually did think about using the Titles but in this case does a PM WINDOW have a title? If yes, then I cant seem to find anything related to a PM Window Title. And I dont think its called “Private Room”. Is there a way to find the title, because I cant seem to get a Title of a Pm Window. But the Idea is great, thanks

    @String wrote:

    I don’t know if it is simpler, but yes that would certainly be another way to do it. The only problem I would foresee would be if there were other DlgGroupChat Window Class‘s that were present that had neither the “Voice Room” or “Private Room” in their title, but were not a PM window either.

    I agree String… I cant really find anything related that can get me a Title on a PM Window. Ps, I am still working on your method… Thanks mate

    #186656
    Chike
    Member

    Title is the text in title bar, like rooms have ” – Voice Room” or ” Private Room” in it, PM window only has the PMer name in it.
    GetWindowText is the function to get the title.

    #186655
    ChiNa
    Administrator

    Thanks for the Reply Chike, I did try that but still not sure If I did declare it right.. I will def going to give it one more try. Crossing my fingers.

    EDITED AGAIN:
    Can I get some help with the declaration of GetWindow Text please. Just not sure if I did it right the first time…

    #186654
    String
    Member

    I just noticed that Autopilots room selector dll gets the title of open pm windows. So within that source would be an example of how to do it.

    #186653
    ChiNa
    Administrator

    @String wrote:

    I just noticed that Autopilots room selector dll gets the title of open pm windows. So within that source would be an example of how to do it.

    Right on time String. I did try check the Palroomselector dll, but I was thinking to do it more simpler!
    I will check it right now.. Thanks String

    Ok Back a few minutes Later. I think I will then have to use the PalRoomselector anyways! As I explained on my first thread was that I was not using the PalroomSelector, but I think If I have to create and AutoResponder I might need the RoomSelector dll for now untill I figure out to do it without the roomselector dll.. We can consider this one Solved for now..

    My next step is to create an Auto-Responder, and If you have any Ideas for me to put in to work I would be appreciated. Thanks a Bunch Chike and String.

    #186652
    String
    Member

    Here is a function that will get the title of any DlgGroupChat Window Class ( pm or chatroom )

     Public Function FindWindowsTitleText() As String
    Dim strbuilder As New StringBuilder(1024)
    Dim PalClass As String = "DlgGroupChat Window Class"
    Dim hWndMain As IntPtr = FindWindow(PalClass, vbNullString)
    
    GetWindowText(hWndMain, strbuilder, strbuilder.Capacity)
    Return strbuilder.ToString
    
    End Function

     

    #186651
    Chike
    Member

    don’t use no dll, write your own code, it’s how you learn.

    I would create a a list of structure of window handle and title.
    Use FindWindowEx to iterate through all pm/room windows.
    Add only windows that are not room windows to the list.
    Than you are ready for your reaction.

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