Skip to content

a vb code to access the admin console

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #187738
    Snoopy1968
    Member

    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

    #187748
    Admin
    Administrator

    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 😉

    #187747
    Snoopy1968
    Member

    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

    #187746
    Snoopy1968
    Member

    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

    #187745
    Admin
    Administrator

    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 😉

    #187744
    Snoopy1968
    Member

    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

    #187743
    method
    Member

    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

    #187742
    Departure
    Member

    I did an example source code here some where in this catagory……

    #187741
    method
    Member

    i fixed it . i had to change the windows class name. Now working :-))

    #187740
    DavidR
    Member

    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

    #187739
    DavidR
    Member

    got it working

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