- This topic has 8 replies, 5 voices, and was last updated 17 years ago by
method.
-
AuthorPosts
-
July 23, 2006 at 3:44 pm #190993
nooob
Memberhi to all
thanks to you guys and loco buddy who gave an insight into another world – the world of api thingy 😛encouraged by you guys – i am trying to make a paltalk program that does the following:
Condition: a user has admin rights in a room, but does not want to be admin all the time. so when this user joins that room – the program asks for the room owner name and admin code (the user joins the room as a normal user ). now if the this user wants to bounce someone, he just clicks the “Bounce” button and the program takes the following steps:
1 – exits the room [here i get the caption of the room for re-joining the room]
2- joins the this user as admin
3- bounces the selected user
4- exists the room again
5- joins the room again as a normal usermy problem: when the admin bounces the user and comes back again, the program clicks on the following submenu:
Actions -> Join a Chat Room
so the Rooms List window appears…now i want to search that room by putting the caption of the room into the search textfield and clicking the Go button and then when the room is found i want to join it by clicking the Join button on the same Rooms List window…BU I FAIL TO DO SOHEL ME OUT…GUYS
thanksnoob[/b]
July 23, 2006 at 9:44 pm #191001method
Memberupload u app so we look at it !
July 24, 2006 at 8:51 pm #191000nooob
Membermethod..dude..its only half of the code that i have written so far – when i am done with it i will upload it
what i want you guys to help me with is:
-how to get handles of the searchfield (and finally set a string to it), Go and Join buttons on the Rooms List window, which is opened by:
Actions -> Join a Chat RoomHELP 😥
nooob
July 25, 2006 at 2:55 am #190999Ponies
Membererm. reshack?
July 25, 2006 at 4:49 am #190998BattleStar-Galactica
MemberI dont have code in vb6 but here is the code in visual c++
first to display the room search do this
HWND parent =::FindWindow(“SEINFELD_SUPERMAN”,NULL);
::PostMessage(parent, WM_COMMAND,(WPARAM) 32834,(LPARAM) 0);
Sleep(100); //here let the time room dialog search list to be loadedHWND WTL_SplitterWindow,hdlg,hedit,button;
HWND parent =::FindWindow(“ATL:0053D390”,NULL);
WTL_SplitterWindow=::FindWindowEx(parent,0,”WTL_SplitterWindow”,NULL);
WTL_SplitterWindow=::FindWindowEx(WTL_SplitterWindow,0,”WTL_SplitterWindow”,NULL);
WTL_SplitterWindow=::FindWindowEx(WTL_SplitterWindow,0,”WTL_SplitterWindow”,NULL);
hdlg=::FindWindowEx(WTL_SplitterWindow,0,”#32770″,NULL);
hedit=::FindWindowEx(hdlg,0,”Edit”,NULL); //here is the search field
button=::FindWindowEx(hdlg,0,”Button”,NULL); //here is the button go//here simulate mouse down mouse up before send room name to field search room
::SendMessage((HWND)hedit,WM_LBUTTONDOWN,1,1);
::SendMessage((HWND)hedit,WM_LBUTTONUP,1,1);Sleep(100);
::SendMessage(hedit,WM_SETTEXT,(WPARAM)0,(LPARAM)”myroom”);//here simulate mouse down mouse up on button go
::SendMessage((HWND)button,WM_LBUTTONDOWN,1,1);
::SendMessage((HWND)button,WM_LBUTTONUP,1,1);like method said, we dont know what is your code, so we cannot guessing. u can convert that code to your vb6 code. I get sick with vb6 so i dont code with vb6 or vbnet no more 😆
July 25, 2006 at 2:13 pm #190997nooob
Membernanomachine…ty that was a great help..coz i was on a complete wrong track lol
just to see if i could click the Go button – i have this code (with ur help):
pwh = FindWindow("seinfeld_superman", vbNullString)
PostMessage pwh, WM_COMMAND, 32834, 0& 'Join a Chat Room
pwh = FindWindow("ATL:0053D390", vbNullString)
wtlsplitterwindow = FindWindowEx(pwh, 0&, "WTL_SplitterWindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "WTL_SplitterWindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "WTL_SplitterWindow", vbNullString)
hdlg = FindWindowEx(wtlsplitterwindow, 0, "#32770", vbNullString)
hedit = FindWindowEx(hdlg, 0, "Edit", vbNullString) 'serach field
button = FindWindowEx(hdlg, 0, "Button", "Go") ' button go
Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0&)
Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0&)but the button does not get clicked….:shock:
CAN U SEE WHATS WRONG WITH ITty for ur time
nooob
July 25, 2006 at 2:39 pm #190996BattleStar-Galactica
Memberhere is my example onclicked on that button
/here simulate mouse down mouse up on button go
::SendMessage((HWND)button,WM_LBUTTONDOWN,1,1);
::SendMessage((HWND)button,WM_LBUTTONUP,1,1);send message mousedown mouseup to that button and the two last parameters 1,1 are the pos x,y of the mouse on that button. I dont try with vb but maybe someone here has tried it. let see if someone has done it. loco maybe…
bwt do you find the correct button handle.
July 25, 2006 at 9:20 pm #190995nooob
Membernanomachine….i think thats the problem i.e. maybe my handle of the button isn’t correct …
using the same call i.e. :
Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0&)
Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0&)…works for another button.
come on vb gurus….HELP ME
nanomachine…ty once again .. 🙂
where is loco…lol
nooob
November 12, 2006 at 4:54 pm #190994autopilot
Member@nooob wrote:
using the same call i.e. :
Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0&)
Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0&)i use this in VB2005:
Dim status as Integer
status = SendMessage(button, WM_KEYDOWN, VK_SPACE, 0)
status = SendMessage(button, WM_KEYUP, VK_SPACE, 0)But this is like you said, used for a different button (but you would think that it would work for the button you want as long as you get “button” to equel the correct handle).
autopilot
edit: didn’t notice date on post… lmao
-
AuthorPosts
Related
- You must be logged in to reply to this topic.