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 


Auto Text Typer (Visual Basic)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sat Mar 12, 2011 5:42 pm    Post subject: Auto Text Typer (Visual Basic) This post has 1 review(s) Reply with quote

So I want to make a program that when I press F6 will say what I've put into the text box.

Like say I put the word "Hello" in the box, then I press F6 the program will automatically type "Hello" (each time i press F6)

_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
Radiation
Grandmaster Cheater
Reputation: 14

Joined: 17 Jun 2009
Posts: 842
Location: Chernobyl

PostPosted: Sat Mar 12, 2011 5:59 pm    Post subject: Reply with quote

Use this API:

Code:
Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer


Now create a timer and put this inside:

Code:
If GetKeyPress(vbKeyF6) Then
SendKeys Text1.Text & "{enter}"
End If



Assuming Text1 is your text field.

_________________
Jesus loves you, Hitler! Smile

Playing/Embedding XM and MOD files in Visual Basic 6

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
I can spell your name backwards: ‮Hitler
Back to top
View user's profile Send private message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sat Mar 12, 2011 6:17 pm    Post subject: Reply with quote

I'm using VB2008, does that change anything?
_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI


Last edited by Chobito1337 on Sat Mar 12, 2011 6:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
Radiation
Grandmaster Cheater
Reputation: 14

Joined: 17 Jun 2009
Posts: 842
Location: Chernobyl

PostPosted: Sat Mar 12, 2011 6:42 pm    Post subject: Reply with quote

yes, i believe the api declaration might be slightly different.

and i'm not too sure about the SendKeys function in 2008... try it, see what result you get. we will go on from there

_________________
Jesus loves you, Hitler! Smile

Playing/Embedding XM and MOD files in Visual Basic 6

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
I can spell your name backwards: ‮Hitler
Back to top
View user's profile Send private message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sat Mar 12, 2011 6:44 pm    Post subject: Reply with quote

These are the errors I get:
Error 1 Name 'vbKeyF6' is not declared.
Error 2 'SendKeys' is a type and cannot be used as an expression

_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
Radiation
Grandmaster Cheater
Reputation: 14

Joined: 17 Jun 2009
Posts: 842
Location: Chernobyl

PostPosted: Sat Mar 12, 2011 7:15 pm    Post subject: Reply with quote

dang it.

i don't code in 2008, just vb6. i should start though.

anyways, look up "sendkeys" in vb 2008 on google


and look up "GetAsyncKeyState" for vb 2008 on google

_________________
Jesus loves you, Hitler! Smile

Playing/Embedding XM and MOD files in Visual Basic 6

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
I can spell your name backwards: ‮Hitler
Back to top
View user's profile Send private message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sat Mar 12, 2011 8:03 pm    Post subject: Reply with quote

OK, so I got vb6, but it still didn't work. like, I typed whatever in the text box and pressed f6 but nothing happened.
_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
Radiation
Grandmaster Cheater
Reputation: 14

Joined: 17 Jun 2009
Posts: 842
Location: Chernobyl

PostPosted: Sat Mar 12, 2011 8:36 pm    Post subject: Reply with quote

where are you sending text? have you tried sending it to a simple application like notepad?
_________________
Jesus loves you, Hitler! Smile

Playing/Embedding XM and MOD files in Visual Basic 6

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
I can spell your name backwards: ‮Hitler
Back to top
View user's profile Send private message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sat Mar 12, 2011 8:38 pm    Post subject: Reply with quote

I'm sending it into the same text box, but i tried notepad and it didnt work there either.

it also says method or data member not found when i do run with full compile.

_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Mar 12, 2011 11:27 pm    Post subject: Reply with quote

API + pinvoke.net = win
Back to top
View user's profile Send private message
Radiation
Grandmaster Cheater
Reputation: 14

Joined: 17 Jun 2009
Posts: 842
Location: Chernobyl

PostPosted: Sat Mar 12, 2011 11:37 pm    Post subject: Reply with quote

Chobito1337 wrote:
it also says method or data member not found when i do run with full compile.



on what part of code does that show up?

_________________
Jesus loves you, Hitler! Smile

Playing/Embedding XM and MOD files in Visual Basic 6

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
I can spell your name backwards: ‮Hitler
Back to top
View user's profile Send private message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sat Mar 12, 2011 11:43 pm    Post subject: Reply with quote

the text1.text part
_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Mar 13, 2011 1:50 am    Post subject: Reply with quote

case sensitive
Back to top
View user's profile Send private message
Chobito1337
Expert Cheater
Reputation: 2

Joined: 06 May 2008
Posts: 197

PostPosted: Sun Mar 13, 2011 3:20 pm    Post subject: This post has 1 review(s) Reply with quote

Auto typer complete, thanks itapa. Smile
_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
Radiation
Grandmaster Cheater
Reputation: 14

Joined: 17 Jun 2009
Posts: 842
Location: Chernobyl

PostPosted: Sun Mar 13, 2011 4:47 pm    Post subject: This post has 1 review(s) Reply with quote

no problem, i'm glad we were able to resolve this Very Happy
_________________
Jesus loves you, Hitler! Smile

Playing/Embedding XM and MOD files in Visual Basic 6

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
I can spell your name backwards: ‮Hitler
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
Goto page 1, 2  Next
Page 1 of 2

 
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