Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 05:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



VB6 autologin request for help

Discussion on VB6 autologin request for help within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2006
Posts: 19
Received Thanks: 6
VB6 autologin request for help

Hello,

I am writing an autologin in VB6. i am having a problem that i have been fighting for about 3 weeks now. whenever i set my name and password it shows it on the client screen, but the client doesnt recognise it.

Code:
PostMessage FlashWindow, WndMsg.WM_MOUSEACTIVATE, ConquerWindow, WndMsg.WM_LBUTTONDOWN
PostMessage FlashWindow, WndMsg.WM_SETCURSOR, FlashWindow, WndMsg.WM_LBUTTONDOWN
PostMessage FlashWindow, WndMsg.WM_LBUTTONDOWN, 1, &H2B20248
PostMessage FlashWindow, WndMsg.WM_LBUTTONUP, 0, &H2B24208
For i = 1 To Len(Text3.Text)
PostMessage FlashWindow, WndMsg.WM_CHAR, Asc(Mid$(Text3.Text,i, 1)), 0
Next i
This is the code that is not working. Should i be using a different API?
I assure you that my handles are correct.

I am not looking for someone to give me a handout of code, just a push in the right direction. Also, if there is another post about this somewhere, i appologize. I did search the forums first.

Riddled with confusion,
Lazlo
lazlo is offline  
Old 05/06/2009, 21:49   #2
 
clintonselke's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 348
Received Thanks: 2,175
Nope... the API ur using is fine. The problem is the conquer log-in screen does not respond to key-press events. It will only respond to a key-down event followed by a key-up event.

Edit: what i mean is instead of WM_CHAR, use a WM_KEYDOWN, delay a bit, then follow it with a WM_KEYUP for each key press.
clintonselke is offline  
Old 05/06/2009, 23:30   #3
 
elite*gold: 0
Join Date: Apr 2006
Posts: 19
Received Thanks: 6
I tried that as well. I get the same result. With the WM_CHAR though, I am not sure about the lParam. I have set it up like this:
Code:
        PostMessage FlashWindow, WndMsg.WM_KEYDOWN, &H44, 0
        Sleep 200
        PostMessage FlashWindow, WndMsg.WM_KEYUP, 0, 0
        Sleep 200
I have tried using the vk constants and the vbkey to no avail. No matter what I do, I get the same results, or it just doesn't work.
lazlo is offline  
Old 05/06/2009, 23:31   #4
 
elite*gold: 12
Join Date: Mar 2009
Posts: 383
Received Thanks: 1,317
I want to add that clinton have already made an autologin in AutoIt.
If you just want a autologin you can use his
Edit:
If you want download AutoIt, just google it
Alexios is offline  
Old 05/07/2009, 01:06   #5
 
elite*gold: 0
Join Date: Dec 2007
Posts: 108
Received Thanks: 42
I had/have the same problem in autoit. clinton's solution was more of an alternative than a fix. I assume you're getting the "Wrong password" message not the "Failed to login: Invalid account or password!" message.
Belth is offline  
Old 05/07/2009, 03:25   #6
 
elite*gold: 0
Join Date: Apr 2006
Posts: 19
Received Thanks: 6
This time its the invalid account or password error.
lazlo is offline  
Old 05/07/2009, 03:37   #7
 
elite*gold: 0
Join Date: Dec 2007
Posts: 108
Received Thanks: 42
Are you sure it's getting all the characters? Even typing manually flash log in seems slow on receiving input. Try putting a delay in between characters.
Belth is offline  
Old 05/07/2009, 04:33   #8
 
elite*gold: 0
Join Date: Apr 2006
Posts: 19
Received Thanks: 6
Yes. It plainly prints out the account, and there are exactly enough stars in the password box. If I check the memory location, it is empty, and loggin in obviously does not work.

If you scroll up you will see that I have a 200ms delay between down and up clicks.
lazlo is offline  
Old 05/07/2009, 05:26   #9
 
clintonselke's Avatar
 
elite*gold: 0
Join Date: Feb 2007
Posts: 348
Received Thanks: 2,175
ok...

what about

PostMessage hUsernameTextbox,WM_SETTEXT,NULL,(LPARAM)pcText
PostMessage hPasswordTextbox,WM_SETTEXT,NULL,(LPARAM)pcText
?

However to requires the handles to the username & password text boxes. I'll look up how to do this.

Edit: ok, FindWindowEx() function can get the handles for the username and password boxes.

HWND FindWindowEx(
HWND hwndParent,
HWND hwndChildAfter,
LPCTSTR lpszClass,
LPCTSTR lpszWindow
);

so we have

hUsernameTextbox = FindWindowEx(FlashWindow, NULL, NULL, "LOGINPASS")
hPasswordTextbox = FindWindowEx(FlashWindow, NULL, NULL, "LOGINUSER")

im not 100% sure yet of these.

Edit:
Quote:
Originally Posted by lazlo View Post
I tried that as well. I get the same result. With the WM_CHAR though, I am not sure about the lParam. I have set it up like this:
Code:
        PostMessage FlashWindow, WndMsg.WM_KEYDOWN, &H44, 0
        Sleep 200
        PostMessage FlashWindow, WndMsg.WM_KEYUP, 0, 0
        Sleep 200
I have tried using the vk constants and the vbkey to no avail. No matter what I do, I get the same results, or it just doesn't work.
also for lparam for WM_KEYDOWN & WM_KEYUP can be found from here


Note: Also for WM_KEYUP, u need to specify which key was released... and if there are capital letters in ur username or password, then u will need to send a WM_KEYDOWN for shift, then a WM_KEYDOWN for ur letter, then a WM_KEYUP for ur letter, then a WM_KEYUP for ur shift.

Edit:
There is also a SendKeys() function in vb that is pretty much exactly the same as the one in autoit (i didn't know about it). It might be an easier way than posting WM_KEYDOWN & WM_KEYUP events.
clintonselke is offline  
Old 05/07/2009, 16:51   #10
 
elite*gold: 0
Join Date: Apr 2006
Posts: 19
Received Thanks: 6
ok from the top...

the flashwindow (class name "MacromediaFlashPlayerActiveX") does not have any child windows to find. If you use spy++, you will see that it has no child windows.

the FindWindowEX would be setup as such:
Code:
hUserNameTextbox = FindWindowEX(FlashWindow,0&,vbnullstring,"LOGINUSER")
Which returns a zero. Where did you derive "LOGINUSER", or was this just a placeholder?

As far as the keydown and key up events, if I declare the key in the key up it posts the character 2 times in the textbox. I have tried it many ways, and it doesn't work with anything I do.
I have hard coded one account and pass into my routine until I have this issue resolved. After I get it loggin in properly, I will create the routine to convert the text from a textbox and input it into its respective place in the client.

to use sendkeys the textbox must have focus and must be the top level window. you cannot use it on a background window. It is also does not work very well, and most programmers stay away from it, probably why you haven't heard of it before now. For the types of programs that we are writing, it is uselss.
lazlo is offline  
Reply


Similar Threads Similar Threads
[Request]RSRO Autologin!
01/10/2010 - Silkroad Online - 4 Replies
everyone opening 12 clientless goldbots chars ,in this case the server is over crowded , just pressing Enter and traffic. does anyone got Autologin tool/autoit for it? thanks! :rolleyes:
[Autologin] New autologin for SBOT => log12project
10/06/2009 - SRO Hacks, Bots, Cheats & Exploits - 66 Replies
Hey guys ! First , i hopes that there is the right section and that im allowed to post thats ... anyway its only to shar a nice tool ive found ! So... A friend gave me a link for an autologin named log12 As i know the firsts versions comes out somes weeks ago Ive tried it and its working fine for me !
[Request]SJSRO Autologin(Support minimized)
08/29/2009 - SRO Private Server - 2 Replies
Hello , anyone have an SJSRO Auto-loggin which support minimized client? i've tried two but they doesn't works.. thanks!
Request autologin
03/15/2009 - SRO Private Server - 3 Replies
Havent been here long autologin v7 is deleted no autologin in sticky, can any1 give me link to thread?
[REQUEST]AutoLogin
07/06/2008 - SRO Private Server - 0 Replies
Hey i just need to ask u guyz a thing. dosent it exist autologin for ecsro that start,close the client if you get dc?? if you got i only ask if u guyz can send me a link. i heard that DesWa will have a good autologin.



All times are GMT +2. The time now is 05:42.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.