Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


WinApi: ENTER is not send

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Coder4
How do I cheat?
Reputation: 0

Joined: 08 Sep 2012
Posts: 3

PostPosted: Sat Sep 08, 2012 7:38 am    Post subject: WinApi: ENTER is not send Reply with quote

Hi,

I'm trying to write a text into a textfield and simulate the ENTER button. This field is inside a java applet.

However, ENTER is ignored. The text is written in the field, but ENTER is not pressed. Can you please help me?

The site is knuddelz.de, I want to fill out the fields and press enter.

Code:
        SendMessage(&H500932, WM_SETTEXT, 0, "myNickname")
        SendMessage(&H1E05FE, WM_SETTEXT, 0, "myPassword")
        SendMessage(&H160A52, WM_SETTEXT, 0, "myRoom")

        SendMessage(&H160A52, WM_CHAR, WM_ENTER, 0&)


In case of success, a small window would appear.

Thanks.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Sat Sep 08, 2012 12:39 pm    Post subject: Reply with quote

WM_ENTER is not the proper code. You want VK_RETURN.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Coder4
How do I cheat?
Reputation: 0

Joined: 08 Sep 2012
Posts: 3

PostPosted: Sat Sep 08, 2012 3:04 pm    Post subject: Reply with quote

Thanks. I've tried

Code:
PostMessage(&H9084E, WM_KEYDOWN, VK_RETURN, &H1C001)
PostMessage(&H9084E, WM_CHAR, VK_RETURN, &H1C001)
PostMessage(&H9084E, WM_KEYUP, VK_RETURN, &HC01C0001)

But this is also not working.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Sat Sep 08, 2012 4:51 pm    Post subject: Reply with quote

Try using one of the following API instead:
- keybd_event
- SendInput

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Coder4
How do I cheat?
Reputation: 0

Joined: 08 Sep 2012
Posts: 3

PostPosted: Sat Sep 08, 2012 5:12 pm    Post subject: Reply with quote

I've noticed that under Java 6 everything is working fine - as it should be.

But under Java 7 just Enter is not working.

As I've written, the box is inside a java applet.

I have no idea why it's not working with this version. Has anybody an idea?

@Wiccaan: Thanks, but I think with this methods the box has to be in the foreground or focus. Enter should work also when it's not.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites