Ich schreibe momentan ein Auto MSG Programm.
Das eigentliche Programm ist schon fertig und läuft auch.
Allerdings nur bei Editor,...
Ich weiß nur noch nicht was ich falsch mache es muss In 4Story Game eingebunden werden.
Ich habe es in einer Windows Form Anwendung.
Quelltet:
PHP Code:
#pragma once
#include <windows.h>
#include <iostream.h>
HWND VictWind;
VictWind=FindWindow(null,"4Story");
SetForegroundWindow(VictWind);
namespace AutoMSGC {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Zusammenfassung für Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Konstruktorcode hier hinzufügen.
//
}
protected:
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::RichTextBox^ richTextBox1;
private: System::Windows::Forms::Timer^ timer1;
private: System::Windows::Forms::Label^ label1;
private: System::ComponentModel::IContainer^ components;
private:
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
#pragma region Windows Form Designer generated code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
void InitializeComponent(void)
{
this->components = (gcnew System::ComponentModel::Container());
this->button1 = (gcnew System::Windows::Forms::Button());
this->button2 = (gcnew System::Windows::Forms::Button());
this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
this->label1 = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
//
// button1
//
this->button1->Location = System::Drawing::Point(12, 203);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(75, 23);
this->button1->TabIndex = 0;
this->button1->Text = L"Start";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// button2
//
this->button2->Location = System::Drawing::Point(93, 203);
this->button2->Name = L"button2";
this->button2->Size = System::Drawing::Size(75, 23);
this->button2->TabIndex = 1;
this->button2->Text = L"Stop";
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
//
// richTextBox1
//
this->richTextBox1->Location = System::Drawing::Point(12, 25);
this->richTextBox1->Name = L"richTextBox1";
this->richTextBox1->Size = System::Drawing::Size(503, 93);
this->richTextBox1->TabIndex = 2;
this->richTextBox1->Text = L"";
//
// timer1
//
this->timer1->Interval = 10000;
this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(12, 9);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(71, 13);
this->label1->TabIndex = 3;
this->label1->Text = L"Hier der Text:";
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(527, 238);
this->Controls->Add(this->label1);
this->Controls->Add(this->richTextBox1);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Name = L"Form1";
this->Text = L"Auto MSG | By SevenDeluxe";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
timer1->Start ();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
timer1->Stop ();
}
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
SendKeys::Send ("{Enter}");
SendKeys::Send (richTextBox1->Text);
SendKeys::Send ("{Enter}");
}
};
}
Bei "#include <iostream.h>" kommt eine Fehlermeldung:
PHP Code:
Fehler 1 error C1083: Datei (Include) kann nicht geöffnet werden: "iostream.h": No such file or directory
PHP Code:
Fehler 1 error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
PHP Code:
Fehler 2 error C2040: 'VictWind': 'int' unterscheidet sich von 'HWND' in Bezug auf die Anzahl vorgenommener Dereferenzierungen
PHP Code:
Fehler 3 error C2065: 'null': nichtdeklarierter Bezeichner
PHP Code:
Fehler 4 error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.
PHP Code:
Fehler 5 error C2365: "SetForegroundWindow": Erneute Definition; vorherige Definition war "Funktion".
PHP Code:
Fehler 6 error C2440: 'Initialisierung': 'HWND' kann nicht in 'int' konvertiert werden






