how do i sendmessage a password box

04/21/2007 17:55 stirge#1
HI,

I'm trying to sendmessage the password to the password box. It gives me the *** in the box but when i click the enter button it gives me the wrong password error.

any help would be appreciated
04/25/2007 05:48 Hiyoal#2
is it the right password. Send the script files script. Ill take a look. Cancel out the password by the way. Just give some random password like "huyusu".

Wat prog u using?? VB

I use Autoit so commands are simple.

[Only registered and activated users can see links. Click Here To Register...]

Hiyoal

Autoit can make background files and macros just the same as VB. Its much easier though.

<hr>Append on Apr 25 2007, 06:14<hr> Sry I posted link wrong:

[Only registered and activated users can see links. Click Here To Register...]
04/25/2007 07:12 GrimReaper91#3
Wot is he talking about O_o
04/25/2007 07:43 teh_n00b#4
Quote:
Originally posted by GrimReaper91@Apr 25 2007, 07:12
Wot is he talking about O_o
He is making a script that will autologin.
So he clicks the script, and it will log him on without him having to type user and pass all the time..
Thats what i got out of his post :)

From what i know of VB, it should be like C/C++, where there might be a trailing 0 or something to stop the string. But yea.. if the code isnt too secret or too long, post it.. and we will have a look.. :)
04/25/2007 13:07 1994clint#5
Quote:
Originally posted by GrimReaper91@Apr 25 2007, 07:12
Wot is he talking about O_o
lol i dunno wat he talkin about to XD
04/25/2007 13:59 bossdude#6
just type in ur pass copy and paste dont work no more
04/25/2007 18:25 ElitePvper#7
show us the code and we might help
04/27/2007 18:50 stirge#8
sorry for the delay, im offshore and the internet is rare. i am writing this code in VB6 and the problem is in the one line.

Code:
 * 

 * *Call SetForegroundWindow&#40;ConquerWindow&#41;
 * *Call SendMessage&#40;AccountBox, WM_SETTEXT, 0, Text1.Text&#41;
 * *'=============================================================================
the following line is where the problem is. there is an additional step to setting text to a password box. if you know what it is, or a different way please tell.

Code:
 * *Call SendMessage&#40;PasswordBox, WM_SETTEXT, 0, &#34;&#34; & Text2.Text&#41;


Code:
 * *Dim passwordboxlayer As Long
 * *passwordboxlayer = FindWindowEx&#40;ConquerLogonWindow, ByVal 0&, &#34;Button&#34;, &#34;&#34;&#41;
 * *Call SendMessage&#40;passwordboxlayer, BM_CLICK, 0, vbNullString&#41;
 * *Sleep &#40;200&#41;
 * *'=============================================================================
 * *Call SendMessage&#40;Enterbutton, BM_CLICK, 0, vbNullString&#41;
When I finally get this code working properly, I will release it in a bas file fully commented so everyone can understand it and hopefully learn from it. All that is left is this one piece.
04/30/2007 15:11 teh_n00b#9
Quote:
Call SetForegroundWindow(ConquerWindow)
Code:
 
  Call SendMessage&#40;AccountBox, WM_SETTEXT, 0, Text1.Text&#41;
  Call SendMessage&#40;PasswordBox, WM_SETTEXT, 0, &#34;&#34; & Text2.Text&#41;
Why aren't those 2 lines almost alike?, except for where they are suppost to put the text?
Whats with the "" & in front of the password?

Have you tried without???

Like this:
Code:
 
  Call SendMessage&#40;AccountBox, WM_SETTEXT, 0, Text1.Text&#41;
  Call SendMessage&#40;PasswordBox, WM_SETTEXT, 0, Text2.Text&#41;
04/30/2007 19:30 evanxxxm#10
didnt co change it a while ago so that ur copy and paste pw doesnt work?
what i meant is for example:
when u type in ABCDEFG
in the system, they might replace it with A1B1C1D1E1F1G1 and send to the server
thats why when u copy and paste ABCDEFG will give u the wrong pw command.
therefore if u use VB to send ABCDEFG to the pw box, it denies.
05/10/2007 19:31 stirge#11
teh_noob

in the end it will be the same, i was playing with the password. i was adding some text to the front of the password. the text is going in right, it just not going in

after the program puts the pw in i can delete the last character, retype it and it will work. the text going into the box is correct. its just not "setting" the text to the password box.

what tq did was put an invisible button on top of the password box to hide it. thats what im calling the passwordboxlayer in my code. as far as i can tell its not affecting putting the text in the password box.

the code i have works, i just need another line to finish it. thats the line that "sets" the text. i just cant remember how to do it. last time i did something like this was over 10 years ago, and i dont have that code anymore.
05/11/2007 02:46 inSertCoiN#12
Try sending the password by keydown/keyup letter by letter, not using the WM_SETTEXT.

I also have a question...
How do you find the hWnd's of the Username/Password box and the OK button?