taultunleashed logoVB6 hWnd for DAOC login Dialog Window : Developer's Corner
newtopic  postreply
 [ 2 posts ] 
blue large dot

VB6 hWnd for DAOC login Dialog Window : Developer's Corner

Posted: January 18th, 2005, 1:27 pm
 
Guest
Guest's Reps:
User avatar
Sup guys, its been a while since I've came accross subclassing dialog windows that use the same classname "#32770" as others. Im tring to make myself a program that will automatically log me in when I startup my computer but in order to do so I need the hWnd of the login window to post my login info and because of the login dialog using the same window title (Dark Age of Camelot) as another window the following code doesnt seem to work...

'Attempt1
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

Function hWnd_Login() As Long
hWnd_Login = FindWindow(vbNullString, "Dark Age of Camelot")
End Function

______________________________________________

'Attempt2
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long

Function hWnd_Login() As Long
hWnd_Login = FindWindow("#32770", "Dark Age of Camelot")
End Function

_______________________________________________

Thanks in Advance -= Kaioz


Reply with quote
Posted: May 20th, 2005, 7:52 pm
 
eckseus

Total Posts: 2
Joined: May 20th, 2005, 6:59 am
eckseus's Reps: 0
User avatar
I assume you've probably figured this out by now, but for those that might be curious.

Dim daoc_loginWnd As Long
Dim daoc_loginPass As Long
Dim daoc_OK As Long
Dim daoc_EULA As Long
Dim daoc_COC As Long

daoc_loginWnd = FindWindow("#32770", "Dark Age of Camelot") '32770 window class

daoc_loginPass = FindWindowEx(daoc_loginWnd, 0&, "edit", vbNullString) 'password textbox

daoc_OK = FindWindowEx(daoc_loginWnd, 0&, "Button", "OK")

Call SendMessage(daoc_loginPass, WM_SETTEXT, 0&, ByVal "password")

Call SendMessage(daoc_OK, WM_KEYDOWN, ByVal VK_SPACE, 0&)
Call SendMessage(daoc_OK, WM_KEYUP, ByVal VK_SPACE, 0&)

Do While daoc_EULA = 0
daoc_EULA = FindWindow("#32770", "End User License Agreement")
Loop

daoc_OK = FindWindowEx(daoc_EULA, 0&, "Button", "ACCEPT")

Call SendMessage(daoc_OK, WM_KEYDOWN, ByVal VK_SPACE, 0&)
Call SendMessage(daoc_OK, WM_KEYUP, ByVal VK_SPACE, 0&)

Do While daoc_COC = 0
daoc_COC = FindWindow("#32770", "Code of Conduct")
Loop

daoc_OK = FindWindowEx(daoc_COC, 0&, "Button", "ACCEPT")

Call SendMessage(daoc_OK, WM_KEYDOWN, ByVal VK_SPACE, 0&)
Call SendMessage(daoc_OK, WM_KEYUP, ByVal VK_SPACE, 0&)



thats a rough cut of it, of course you'd want to lauch the game with a ShellExecute call then loop until you find the first hwnd for the patcher like i did for the EULA and COC windows. Then continue it from there.

The thing that baffles me is that i can't seem to find the Edit class inside the first ComboBox class that would be where you would enter an account name, there is a combobox class that shows up under Spy++ but there's nothing that goes along with it. the next ComboBox is for the character dropdown that has an Edit child. Hope this helps you or anyone else that reads this :)


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 3 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of Developer's Corner RSS Feed 

SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?