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 


Visual C++ 2008 SendKeys help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
the the the
Master Cheater
Reputation: 46

Joined: 15 Jun 2008
Posts: 429

PostPosted: Sat Apr 04, 2009 9:30 pm    Post subject: Visual C++ 2008 SendKeys help Reply with quote

Hey, how can I send keys with vis c++2008? I can't figure it out.. And I don't want it to send to a specific app, I want it to send to the current active app window...

+REP (If I can)

Please help, I want to make an autotyper!
Code:
   private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
             timer1->Enabled=true;
          }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
             timer1->Enabled=false;
       }
private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) {
          timer1->Interval=(textBox2->Text);
            SendKeys.send(textBox1->Text);
            timer2->Enabled=true;
       }
private: System::Void timer2_Tick(System::Object^  sender, System::EventArgs^  e) {
          timer2->Interval=80;
         SendKeys("{ENTER}");
          timer2->Enabled=false;
       }


I think that is right, but I am not sure, I get these errors on build:
Code:

1>c:\REMOVED\asciicatautotyper\Form1.h(181) : error C2664: 'System::Windows::Forms::Timer::Interval::set' : cannot convert parameter 1 from 'System::String ^' to 'int'
1>        No user-defined-conversion operator available, or
1>        There is no context in which this conversion is possible
1>c:\REMOVED\asciicatautotyper\Form1.h(182) : error C2143: syntax error : missing ';' before '.'
1>c:\REMOVED\asciicatautotyper\Form1.h(182) : error C2143: syntax error : missing ';' before '.'
1>c:\REMOVED\asciicatautotyper\Form1.h(187) : error C2440: '<function-style-cast>' : cannot convert from 'const char [8]' to 'System::Windows::Forms::SendKeys'
1>        No constructor could take the source type, or constructor overload resolution was ambiguous



this is mostly double clicking the timer and editing code etc..
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sun Apr 05, 2009 6:52 am    Post subject: Reply with quote

Hide your window and bring focus to the application you want to sendkeys to. Like Microsoft.VisualBasic.AppActivate("Text Of The Window To Activate") I wonder if this is outdated. Opps it vb..
_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
the the the
Master Cheater
Reputation: 46

Joined: 15 Jun 2008
Posts: 429

PostPosted: Sun Apr 05, 2009 8:36 am    Post subject: Reply with quote

VB Embarassed

I made an auto typer before, and it sent the keys to whatever the current application was, which is how I want it. But if thats not possible, tell me how to send it to firefox.exe...

would I do firefox.sendkeys...?
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sun Apr 05, 2009 10:54 am    Post subject: Reply with quote

asciicat wrote:
VB Embarassed

I made an auto typer before, and it sent the keys to whatever the current application was, which is how I want it. But if thats not possible, tell me how to send it to firefox.exe...

would I do firefox.sendkeys...?


Sendkeys sends keys to the current focused window so to send it to firefox you must bring it into focus using Microsoft.VisualBasic.AppActivate(title) title is the name of the window.
Back to top
View user's profile Send private message
the the the
Master Cheater
Reputation: 46

Joined: 15 Jun 2008
Posts: 429

PostPosted: Sun Apr 05, 2009 11:37 am    Post subject: Reply with quote

ok, I'll try that
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Apr 05, 2009 11:48 am    Post subject: Reply with quote

Code:

SendKeys.send(textBox1->Text);


wat? SendKeys has a class?
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sun Apr 05, 2009 12:08 pm    Post subject: Reply with quote

Lol didn't see that

private: System::Void timer2_Tick(System::Object^ sender, System::EventArgs^ e) {
timer2->Interval=80;
SendKeys("{ENTER}");
timer2->Enabled=false;
}
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