public static void Click(Process_Object procObj, Program_Profile progProf) { //Adapted only for 64 bit systems? //TODO: Make alternate code for 32bit systems WindowsStructs.SetForegroundWindow(procObj.GetMWHandle()); UInt64 clickPoint = 0x0; clickPoint = clickPoint | (UInt32)(progProf.Get_OffsetY() + 5); clickPoint = clickPoint << 0x10; clickPoint = clickPoint | (UInt32)(progProf.Get_OffsetX() + 5); WindowsStructs.SendMessage(procObj.GetMWHandle(), WindowsStructs.WM_LBUTTONDOWN, (IntPtr)WindowsStructs.MK_LBUTTON, (IntPtr)clickPoint); WindowsStructs.SendMessage(procObj.GetMWHandle(), WindowsStructs.WM_LBUTTONUP, (IntPtr)WindowsStructs.MK_LBUTTON, (IntPtr)clickPoint); //WindowsStructs.SendMessage(procObj.GetMWHandle(), WindowsStructs.WM_LBUTTONDOWN, WindowsStructs.MK_LBUTTON, (UInt32)((progProf.Get_LengthY() << 0x10) | progProf.Get_LengthX())); //WindowsStructs.SendMessage(procObj.GetMWHandle(), WindowsStructs.WM_LBUTTONUP, WindowsStructs.MK_LBUTTON, (UInt32)((progProf.Get_LengthY() << 0x10) | progProf.Get_LengthX())); }
public static Bitmap Take_Snapshot_Process(Process_Object proc, Program_Profile prof) { return(Take_Snapshot_Process(proc, prof.Get_OffsetX(), prof.Get_OffsetY(), prof.Get_LengthX(), prof.Get_LengthY())); }