|
You last visited: Today at 17:28
Advertisement
[C#] Mouse Move nur in Form
Discussion on [C#] Mouse Move nur in Form within the .NET Languages forum part of the Coders Den category.
10/19/2013, 19:53
|
#1
|
elite*gold: 0
Join Date: Nov 2010
Posts: 8
Received Thanks: 2
|
[C#] Mouse Move nur in Form
Hallo, ich bin gerade dabei ein Bot für ein Spiel zu schreiben und nun bin ich bei dem Autologin. Dazu möchte ich das er meine Maus an eine bestimmte stelle in meiner Form bewegt. Das bewegen etc. funktioniert schon. Aber das fixiern auf der Form nicht so wirklich. Der Sinn dahinter ist, das ich die form egal wo hin schieben kann und es trz. funktioniert weil er den Pixel 0,0 in meiner Form sucht und dann von da aus z.B. den Pixel 395,900. Kann mir da jemand helfen?
Mfg Ramon0205
*PUSH*
|
|
|
10/20/2013, 11:05
|
#2
|
elite*gold: 1000
Join Date: Apr 2012
Posts: 1,003
Received Thanks: 208
|
Nochmal auf deutsch bitte.
|
|
|
10/21/2013, 08:29
|
#3
|
elite*gold: 666
Join Date: Apr 2011
Posts: 5,811
Received Thanks: 2,417
|
Wenn du doch schon so deine Maus bewegen kannst, frag doch ab, wo sich deine Form auf dem Bildschirm befindet und rechne von dort an weiter.
Quote:
Originally Posted by qkuh
Nochmal auf deutsch bitte.
|
Er will den Mauszeiger relativ zu seiner Form setzen.
|
|
|
10/21/2013, 10:43
|
#4
|
elite*gold: 0
Join Date: Feb 2010
Posts: 7,221
Received Thanks: 6,758
|
Du könntest das ganze direkt als Hidden-Bot erarbeiten, was dann so aussehen könnte:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lolhiddenbugclickftw
{
public partial class Form1 : Form
{
public const int WM_LBUTTONDOWN = 0x0201;
public const int WM_LBUTTONUP = 0x0202;
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
Thread rpThread;
private static IntPtr MakeLParam(int LoWord, int HiWord)
{
return (IntPtr)((HiWord << 16) | (LoWord & 0xffff));
}
public Form1()
{
InitializeComponent();
rpThread = new Thread(new ThreadStart(giveRP));
}
private void button1_Click(object sender, EventArgs e)
{
rpThread.Start();
}
private void button2_Click(object sender, EventArgs e)
{
rpThread.Abort();
}
private void giveRP()
{
while (true)
{
// Payment Method
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(226, 408));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(226, 408));
Thread.Sleep(1000);
// Price
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(812, 263));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(812, 263));
Thread.Sleep(5000);
// ToU
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(503, 339));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(503, 339));
// Remember
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(503, 358));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(503, 358));
// Continue - 1
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(743, 278));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(743, 278));
Thread.Sleep(5000);
// Continue - 2
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(644, 301));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(644, 301));
Thread.Sleep(5000);
// Back
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONDOWN, IntPtr.Zero, MakeLParam(639, 416));
PostMessage(FindWindow("ApolloRuntimeContentWindow", "PVP.net Client"), WM_LBUTTONUP, IntPtr.Zero, MakeLParam(639, 416));
Thread.Sleep(5000);
}
}
}
}
Für die FindWindow-Methode kannst du am besten AutoIt nutzen:
Class wäre der erste Parameter und Title der zweite.
|
|
|
10/21/2013, 10:48
|
#5
|
elite*gold: 5
Join Date: Mar 2008
Posts: 460
Received Thanks: 436
|
---
Hühnchenkopf
hat's ausführlich mit Code beantwortet daher brauchst du meine Antwort nicht mehr.
|
|
|
10/21/2013, 11:56
|
#6
|
elite*gold: 0
Join Date: Feb 2010
Posts: 7,221
Received Thanks: 6,758
|
Mein Code klickt übrigens direkt auf die Position, die Maus wird nicht bewegt, es wird einfach einfach ein Mouse- down / up simuliert auf die Position die angegeben wird, demnach musst du nur noch deine Eingaben tätigen.
|
|
|
|
Similar Threads
|
Mouse Click Move
01/26/2012 - Metin2 - 0 Replies
Hello I Have a Question for all the people who have experience in Metin2 Hacking, what function gets called when Mouse Walking I been moving my bot using the fuction that gets called be pressing the keys for movement and teleporting in small steps, the way that I am doing this gives me alot of problems I think the correct way would be calling the fuction that gets executed when left mouse click, I havent had any luck could anyone point me into the correct direction on solving this. I hope some...
|
Please Tell Me Move Speed Code (form C.E)
08/19/2011 - 12Sky2 - 3 Replies
i need it i cant find when new patch come please tell me move speed hack code (not atack just speed hack code)
thank you everbody for your helps :handsdown:
|
Visual Basic mouse Move Dll?
10/04/2010 - .NET Languages - 4 Replies
Hi,
Wie kann ich in Visual basic eine Dll erstellen die wen man sie im Spiel injectet und F12 drückt Zu verschiedenen stellen im spiel geht und dort klickt?
Ich hoffe das ihr mir helfen könnt!
|
Mouse auto move while botting! dwnld link here
05/11/2008 - Rappelz - 4 Replies
Hello i have found one interesting tool. You can make mouse auto move with this. There is also option to auto buttons press and etc. but for my works mouse move only. I think that is because of HACKSHIELD but I don't know exactly.
Here is download link Auto Mouse - Reviews and free Auto Mouse downloads at Download.com
Try it and say how it goes for you!
If auto buttons press wont work for you too, then you have to hold mouse button 2 to keep screen moving.
I hope it will help to...
|
How to npt move when using mouse double hit?
04/06/2006 - Conquer Online 2 - 3 Replies
when i use mouse double hit that lvling in tg. If some1 come near by it will go out. Does any1 know how to get not move?
|
All times are GMT +2. The time now is 17:28.
|
|