a vb code to access the admin console

You can talk about VB programming here

a vb code to access the admin console

Postby Snoopy1968 » Fri Sep 14, 2007 8:42 pm


hey does anyone know how to send a messageto the combox box in the admin console ive found the post message number for the admin console but am having probelems trying to send message there
many thanks
Snoopy1968
imFiles Newbie
imFiles Newbie
 
Posts: 47
Joined: Fri Sep 14, 2007 8:29 pm

Re: a vb code to access the admin console

Postby locohacker » Fri Sep 14, 2007 10:38 pm

Umm which combo box, and are you talkign of the loging as admin screen or the admin console on the room :) I think I can help ya i done both ;)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

Re: a vb code to access the admin console

Postby Snoopy1968 » Sat Sep 15, 2007 3:19 pm

tys Loco for some reason mine seems to get to the point where it says proceed to ban
then vb just freeses and doesnt see the Ban User window i cant figure out why
Dim x As Long, editx As Long, button As Long
Dim console As Long

If (Text38 = "") Then
PalAdmin
Text38 = Trim(AdmnConsole)
Else

DoEvents
Timer8.Enabled = False
console = FindWindow("#32770", Text38)
x = FindWindowEx(console, 0&, "ComboBox", vbNullString)
editx = FindWindowEx(x, 0&, "Edit", vbNullString)
Call SendMessageByString(editx, WM_SETTEXT, 0&, "abc")
button = FindWindowEx(console, 0&, "button", "Ban Selected User")
Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0&)
Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0&)
DoEvents

PalBan ' Produces the Ban Window Title"<<<--freeses

x = FindWindow("#32770", BanWindow)

button = FindWindowEx(x, 0&, "button", "Yes")
Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0&)
Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0&)

Text38 = ""


End If
Snoopy1968
imFiles Newbie
imFiles Newbie
 
Posts: 47
Joined: Fri Sep 14, 2007 8:29 pm

Re: a vb code to access the admin console

Postby Snoopy1968 » Sun Sep 16, 2007 9:04 am

Oops i should have said the combox on the Administrative console
it enters the screename in and presses the ban selected user button
but for some reason the code will not see the "Ban User?" window
it sits there waiting from a reponce from me any ideas
Snoopy1968
imFiles Newbie
imFiles Newbie
 
Posts: 47
Joined: Fri Sep 14, 2007 8:29 pm

Re: a vb code to access the admin console

Postby locohacker » Sun Sep 16, 2007 9:24 am

Ah aigh i did a program like that :) aigh i gonna give ya the codes today, and I gonan check ya code on monday lol I dont do much on weekends :)

here the codes, it actually to separate one, one is the banner client where you put the nick to ban, the other one is the a the banner exe, it just has a timer that looks for the banwindow to execute, check it out on monaday i check the code and check mines to see if it works ;)
Attachments
Fast Bannerv2.rar
This is the banner client where the nick to be baan is included
(8.33 KiB) Downloaded 146 times
Bnv2.rar
This the actual banner which looks for the banwindow and execute the ban
(3.2 KiB) Downloaded 121 times
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

Re: a vb code to access the admin console

Postby Snoopy1968 » Sun Sep 16, 2007 9:46 am

Thoeriticyy it should work for some reason it will only see the "Ban User" Window after the Yes Button has been pressed or the no after both those buttons has beeen pressed it releaseses control of the program but it seems to sit wiating for me lol feel free Ill post both functions for you there shouldnt be any problems with them i just dont see why it wont see the window at the propriate time yeh well its good to have fun at weekends lol

Public Function EnumWindowsProc6(ByVal hndle As Long, ByVal parm As Long) As Boolean

Dim sSave As String, Ret As Long
Ret = GetWindowTextLength(hndle)
sSave = Space(Ret)
GetWindowText hndle, sSave, Ret + 1

If InStr(sSave, "Ban User") Then

Lnghnd2 = Str$(hndle)
BanClass = GetClass(Lnghnd2)
BanWindow = GetWinTitle(Lnghnd2)
End If
EnumWindowsProc6 = True


End Function
Public Function PalBan(Optional strClassname1 As String) As Long
Dim retval As Boolean
retval = EnumWindows(AddressOf EnumWindowsProc6, 0)
strClassname1 = GetClass(Lnghnd2)
PalBan = Lnghnd2
End Function
thanks for the codes ill look at them
Snoopy1968
imFiles Newbie
imFiles Newbie
 
Posts: 47
Joined: Fri Sep 14, 2007 8:29 pm

Re: a vb code to access the admin console

Postby method » Mon Nov 12, 2007 9:56 pm

I tried this code with paltalk 9.2 but it doesn't ban user . But if i open the admin window then it bans the user. Could any one help me fix this problem so in one click it does the ban instead of me opening the admin console?Thanks
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: a vb code to access the admin console

Postby Departure » Tue Nov 13, 2007 7:41 am

I did an example source code here some where in this catagory......
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Re: a vb code to access the admin console

Postby method » Tue Nov 13, 2007 9:02 am

i fixed it . i had to change the windows class name. Now working :-))
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: a vb code to access the admin console

Postby DavidR » Fri Jun 20, 2008 2:26 pm

Hi method ...
i'm new in programming. i have the same problem that you had with fast banner, had to bring up the console window then the code would work. you mentioned you had to change the window class name. are you reffering to "my window class" in form1 ? if yes, i did change it and it still doesn't work. is it also depends on the version of pal i'm using? i don't know what version this code was written for. or none of these and i just doing it wrong? lol ... last one is more like it, lollol
DavidR
imFiles Newbie
imFiles Newbie
 
Posts: 12
Joined: Fri Jun 20, 2008 2:13 pm

Re: a vb code to access the admin console

Postby DavidR » Thu Jun 26, 2008 5:07 am

got it working
DavidR
imFiles Newbie
imFiles Newbie
 
Posts: 12
Joined: Fri Jun 20, 2008 2:13 pm


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests