- This topic has 59 replies, 5 voices, and was last updated 11 years ago by Chike.
-
AuthorPosts
-
February 15, 2013 at 9:06 pm #186605ChiNaAdministrator
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,,February 16, 2013 at 12:19 am #186664ChikeMemberWhat exactly is the question?
February 16, 2013 at 3:19 am #186663ChiNaAdministratorHi 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…
February 16, 2013 at 4:59 am #186662StringMember@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.
February 16, 2013 at 6:18 am #186661ChikeMemberIsn’t it more simple just to check the room title to tell if it’s IM window?
February 16, 2013 at 5:01 pm #186660ChiNaAdministrator@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 youFebruary 16, 2013 at 5:38 pm #186659ChikeMemberA rooma has a “- Voice Room” or “Private Room” in it’s title, a pm does not
February 17, 2013 at 12:55 pm #186658StringMember@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.
February 17, 2013 at 2:17 pm #186657ChiNaAdministrator@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
February 17, 2013 at 8:18 pm #186656ChikeMemberTitle 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.February 18, 2013 at 2:31 am #186655ChiNaAdministratorThanks 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…February 18, 2013 at 2:35 am #186654StringMemberI 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.
February 18, 2013 at 2:43 am #186653ChiNaAdministrator@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 StringOk 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.
February 18, 2013 at 3:40 am #186652StringMemberHere 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
February 18, 2013 at 4:04 am #186651ChikeMemberdon’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. -
AuthorPosts
Related
- You must be logged in to reply to this topic.