Anonymní profil Kalir44 – Programujte.com
 x   TIP: Přetáhni ikonu na hlavní panel pro připnutí webu

Anonymní profil Kalir44 – Programujte.comAnonymní profil Kalir44 – Programujte.com

 

Příspěvky odeslané z IP adresy 178.253.148.–

Kalir44
C / C++ › While a checkBox
3. 7. 2014   #191840

ano je to obyčejný 1-levelový pointer z Cheat Enginu, ale jak sem psal, ono to funguje, když kliknu ten checkBox tak to funguje jak ma, avšak program prestane pracovat, a nejde to vypnout.

Je tedy pak jiná možnost, ne prez timer která by ,,fungováni" prepsávani pameti umožnila?

Kalir44
C / C++ › While a checkBox
3. 7. 2014   #191829

ukaž mi to v príkladu, skoušel sem neco, ale nefunguje.

Kalir44
C / C++ › While a checkBox
3. 7. 2014   #191826

Ne, nevím.

Ohodne lepší by bylo, ukázat mi, v nejakém kodu, jak to má vypadat, jestli mam dat to while do toho timeru nebo co..

Kalir44
C / C++ › While a checkBox
3. 7. 2014   #191819

No, vlastne nechapu.

V GUI sem docela nováček, mohl bys zde uvest priklad, jak by to s tim timerem melo vypadat?

Kalir44
C / C++ › While a checkBox
2. 7. 2014   #191787

soucre code :  

#include <Windows.h>
#include <stdio.h>
#include <string>

#define Address 0x00785198 // Address By Cheat engine
#define Offset 0xd2ed58 // Hex Offset By Cheat Engines
#define Value 23452




int main()
{
 
}

int UIMain()
{
	
	return 0;
}


#pragma once

namespace TESTJJJJJ {

	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>
	/// Summary for lol
	/// </summary>
	public ref class lol : public System::Windows::Forms::Form
	{
	public:
		lol(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~lol()
		{
			if (components)
			{
				delete components;
			}
		}


	private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::CheckBox^  checkBox1;

	protected: 

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
			this->SuspendLayout();
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(13, 9);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 2;
			this->button1->Text = L"button1";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &lol::button1_Click);
			// 
			// checkBox1
			// 
			this->checkBox1->AutoSize = true;
			this->checkBox1->Location = System::Drawing::Point(112, 107);
			this->checkBox1->Name = L"checkBox1";
			this->checkBox1->Size = System::Drawing::Size(80, 17);
			this->checkBox1->TabIndex = 3;
			this->checkBox1->Text = L"checkBox1";
			this->checkBox1->UseVisualStyleBackColor = true;
			this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &lol::checkBox1_CheckedChanged_2);
			// 
			// lol
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(284, 262);
			this->Controls->Add(this->checkBox1);
			this->Controls->Add(this->button1);
			this->Name = L"lol";
			this->Text = L"lol";
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion

    private: System::Void SpeedPosuvaci()
			 {
				 Sleep (2);
				 if (checkBox1->Checked)
				 {
					 *(int*)((*(int*)Address) + Offset) = Value;
				 }
				 Sleep (2);
			 }
	private: System::Void textBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) {
				
			 }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 //float i = float::Parse(textBox1->Text);
				 
				 				
			 }

	private: System::Void checkBox1_CheckedChanged_2(System::Object^  sender, System::EventArgs^  e) {
				/* while ((this->checkBox1->Checked)&1)
									 {
										 Sleep (50);// Hotkey Function
                                     *(int*)((*(int*)Address) + Offset) = Value;
									 Sleep (50);
				}*/
				 if (checkBox1->Checked)
				 {
					 while (checkBox1->Checked)
					 {
					 Sleep (1);
					 SpeedPosuvaci();
					 Sleep (1);
					 }
				 }
				 else
				 {
					 SpeedPosuvaci();
				 }
				 
				
				 
			 }
	};
}


skrátka, když na ten checkBox1 kliknu, jadro Whilu se začne dít (funguje to psaní Value do pointra) ale ma forma prestane pracovat, a neda se to vypnout, ani nic podobneho, nevim čim to je, skoušel sem tam dávát i Sleep (50); a však, stejne nefunguje, to znamená, že je chyba nekde jinde.

prosím o pomoc, diky predem

 

 

Hostujeme u Českého hostingu       ISSN 1801-1586       ⇡ Nahoru Webtea.cz logo © 20032024 Programujte.com
Zasadilo a pěstuje Webtea.cz, šéfredaktor Lukáš Churý