Hghlight User on nick list of the room?

You can talk about VB programming here

Hghlight User on nick list of the room?

Postby locohacker » Sat Oct 22, 2005 9:56 am


Hey I was working a little on the admin bot, but here my big problem :)

I can,t highlight the nick on the room list accurately, lol I being using this code to hightlight the nick

Code: Select all
Dim mywindowclass As Long, wtlsplitterwindow As Long, atlb As Long
Dim syslistview As Long
mywindowclass = FindWindow("my window class", Text5)
wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
atlb = FindWindowEx(wtlsplitterwindow, 0&, "atl:005047b8", vbNullString)
syslistview = FindWindowEx(atlb, 0&, "syslistview32", vbNullString)
Call SendMessageByString(syslistview, WM_LBUTTONDOWN, 0&, 0&)
SendKeys Text6 + vbCr


where Text6 is the textbox where the nick goes :)

anyways I just wondering if anyone has being able to accurately do it, lol like with the method i am using its about 10 percent accuratley :) eheheh
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby Newbie » Sat Oct 22, 2005 4:04 pm

Code Seem To Be Ok
However. When I try to put

PostMessage mywindowclass, WM_COMMAND, 32946, 0

after
SendKeys
Then the Select nick seem to be ok, but Post message donesn't work. Something is wrong
User avatar
Newbie
imFiles Junior
imFiles Junior
 
Posts: 95
Joined: Fri Oct 07, 2005 2:51 pm

Postby NVYE » Sun Oct 23, 2005 7:39 am

Of course it doesn't work ... 'cause Sendkey is just same thing as hit a key board ..

try to send first letter only.

Example your nickname: "locohacker"

Try to find: "L"

Then if it doesn't work then find another "L"
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 234
Joined: Fri Jun 10, 2005 11:29 pm

Postby Newbie » Sun Oct 23, 2005 9:32 am

how do you know if it will find the exact user

like , in the room, there is a "locohacker" and "locohacker1"
User avatar
Newbie
imFiles Junior
imFiles Junior
 
Posts: 95
Joined: Fri Oct 07, 2005 2:51 pm

Postby NVYE » Sun Oct 23, 2005 10:04 am

Everytime you hit the first letter ... it jumps ...

eventually it comes to the right nick!
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 234
Joined: Fri Jun 10, 2005 11:29 pm

Postby locohacker » Sun Oct 23, 2005 10:06 am

NVYE What u mean send the first letter u mean using like sendmessege something like that :?:
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4361
Joined: Fri Dec 31, 2004 6:59 pm

Postby Newbie » Sun Oct 23, 2005 11:40 am

:lol:
User avatar
Newbie
imFiles Junior
imFiles Junior
 
Posts: 95
Joined: Fri Oct 07, 2005 2:51 pm

Postby NVYE » Sun Oct 23, 2005 1:10 pm

Your code:

Code: Select all
Dim mywindowclass As Long, wtlsplitterwindow As Long, atlb As Long
Dim syslistview As Long
mywindowclass = FindWindow("my window class", Text5)
wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
atlb = FindWindowEx(wtlsplitterwindow, 0&, "atl:005047b8", vbNullString)
syslistview = FindWindowEx(atlb, 0&, "syslistview32", vbNullString)
Call SendMessageByString(syslistview, WM_LBUTTONDOWN, 0&, 0&)
SendKeys Text6 + vbCr


Looks perfect.

SendKeys Text6 + vbCr

Instead use left(text6.text, 1)

'Jumps three times ...

SendKeys Left(text6.text, 1)
SendKeys Left(text6.text, 1)
SendKeys Left(text6.text, 1)

if you see it will select a nickname with first letter ...
then if you add it again ... it jumps to another nick ...

Eventually it will jump to the right nick. Maybe you use the getUID and check for the nick ... that match your nick ....

Hope this helps ... becareful for infinite loop if the nick doesn't exists.
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 234
Joined: Fri Jun 10, 2005 11:29 pm

Postby Newbie » Sun Oct 23, 2005 3:55 pm

Well there is another problem

For example , in a room, there are

"Oyah"
"locohacker"
"locohacker1"

So if we type the 3 first letters, we dont know wich locohacker we are talking about. How ever if we type the 4th letter, it will jum to Oyah.

I dont know but i have a confusion in the nickname
User avatar
Newbie
imFiles Junior
imFiles Junior
 
Posts: 95
Joined: Fri Oct 07, 2005 2:51 pm

Postby NVYE » Sun Oct 23, 2005 6:53 pm

I said ... hit the first letter only ...

Locohacker ...

Hit "L" only ...

No O or C or H

hit the first letter and it jumps ...
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 234
Joined: Fri Jun 10, 2005 11:29 pm

Postby method » Sun May 28, 2006 1:45 pm

loco did u your solve your problem in highlighting user name ? furthermore, could u tell me how to run this code ? i want to test it. What controles do i need in my form ? do i need to be admin to use this code ?looking forward to your reply.
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests