Hello, I am very new to VB.net. I know some other languages but this seems completely different, anyways, I am trying to make an autoclicker and auto skill leveler for an online mmorpg. I have the code doing what I want it to; however, I was wondering if I could somehow dynamically search for the game window PID and attach it to that window so it would level stuff in the background so I could do work at the same time. Any ideas?
[CODE]Public Class Form1
Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Const MOUSEEVENTF_MOVE As Int32 = &H1 ' mouse move
Const MOUSEEVENTF_LEFTDOWN As Int32 = &H2 ' left button down
Const MOUSEEVENTF_LEFTUP As Int32 = &H4 ' left button up
Const MOUSEEVENTF_RIGHTDOWN As Int32 = &H8 ' right button down
Const MOUSEEVENTF_RIGHTUP As Int32 = &H10 ' right button up
Const MOUSEEVENTF_MIDDLEDOWN As Int32 = &H20 ' middle button down
Const MOUSEEVENTF_MIDDLEUP As Int32 = &H40 ' middle button up
Const MOUSEEVENTF_ABSOLUTE As Int32 = &H8000 ' absolute move
Const MOUSEEVENTF_WHEEL As Int32 = &H800 ' wheel button rolled
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Timer1.Stop() End Sub Private Sub MyMethod1() Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position) mouse_event(&H8, 0, 0, 0, 1) mouse_event(&H10, 0, 0, 0, 1) End Sub ...