|
You last visited: Today at 13:07
Advertisement
[Help] C# SendMessage()
Discussion on [Help] C# SendMessage() within the CO2 Programming forum part of the Conquer Online 2 category.
05/11/2010, 16:24
|
#16
|
elite*gold: 0
Join Date: Jan 2010
Posts: 121
Received Thanks: 7
|
Quote:
Originally Posted by SigmaD
I have no idea how to use that lol but thanks anyways. I'll look for info on it =p
I didn't know they had forums lol thanks
|
You are welcome, btw did you get anything from this code
Code:
#define MAKELONG(a, b) ((LONG)(((WORD)(((DWORD_PTR)(a)) & 0xffff)) | ((DWORD)((WORD)(((DWORD_PTR)(b)) & 0xffff))) << 16))
And do you know what WParam and Iparam is? (Because I obviously don't  )
|
|
|
05/11/2010, 16:37
|
#17
|
elite*gold: 0
Join Date: May 2010
Posts: 59
Received Thanks: 58
|
Quote:
Originally Posted by Nullable
Code:
MK_RBUTTON
The SHIFT key is down.
|
I don't think it matters but isn't MK_RBUTTON right mouse click?
@shimo
According to nullable the wParam is the virtual key. The values for virtual keys are on MSDN. Since I'm sending a right click I'm using 2(the value of right click) as wParam for the keydown message and IntPtr.Zero for the keyup message. As for the lParam he said it was the coordinates for the mouse click but I have no idea how to use 2 values for a single parameter.
|
|
|
05/11/2010, 16:46
|
#18
|
elite*gold: 0
Join Date: Jan 2010
Posts: 121
Received Thanks: 7
|
Quote:
Originally Posted by SigmaD
According to nullable the wParam is the virtual key. The values for virtual keys are on MSDN. Since I'm sending a right click I'm using 2(the value of right click) as wParam for the keydown message and IntPtr.Zero for the keyup message.
|
I am using SendInput it works but still I can't specify the window that I want to click on and about the Keydown and Keyup
Code:
public enum MouseFlag : uint
{
MOVE = 0x0001,
LEFTDOWN = 0x0002,
LEFTUP = 0x0004,
RIGHTDOWN = 0x0008,
RIGHTUP = 0x0010,
MIDDLEDOWN = 0x0020,
MIDDLEUP = 0x0040,
XDOWN = 0x0080,
XUP = 0x0100,
WHEEL = 0x0800,
VIRTUALDESK = 0x4000,
ABSOLUTE = 0x8000,
}
Why are you giving Keyup IntPtr.Zero ?
|
|
|
05/11/2010, 16:59
|
#19
|
elite*gold: 0
Join Date: May 2010
Posts: 59
Received Thanks: 58
|
Because I don't need a virtual key for keyup. The keyup message doesn't do anything, it just tells the program that the key is no longer down.
|
|
|
05/11/2010, 22:38
|
#20
|
elite*gold: 0
Join Date: Jan 2010
Posts: 121
Received Thanks: 7
|
Quote:
Originally Posted by SigmaD
Because I don't need a virtual key for keyup. The keyup message doesn't do anything, it just tells the program that the key is no longer down.
|
I am getting tired if you found any answer please share 
btw in case you haven't found it yet here
Code:
private static IntPtr MakeLParam(int LoWord, int HiWord)
{
return (IntPtr)((HiWord << 16) | (LoWord & 0xffff));
}
This is how you insert two values into 1 parameter
And if you managed in this please share your code
|
|
|
 |
|
Similar Threads
|
C++ SendMEssage Problem
12/11/2010 - C/C++ - 53 Replies
Hey Comunity,
bin C++ Anfänger und hab da ein Problem.
Und zwar möchte ich Tastendrücke mithilfe meines Programms simulieren,
da hab ich mir gedacht, dass ich SendMessage benutze.
Mein Problem ist jetzt, dass ich nicht weiß, wo ich das Parameter
für die "zu drückende" Taste hinschreiben soll bzw. in welcher Form;
als Hex oder VK_KEY_? . Der Bot soll einfach nur ununterbrochen
"w" drücken, jedoch krig ich es einfach nicht hin.
Bei Google hab ich nix gefunden, MSDN hab ich nicht...
|
C++ SendMessage Problem
08/02/2010 - C/C++ - 1 Replies
Also ich versuche gerade in C++ einen kleinen Spammer zu programmieren habe aber leider ein Problem.
Mein Code:
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
|
delphi sendmessage
07/27/2010 - General Coding - 3 Replies
hallo leute ich hab mal eine frage ob mir jemand kurz erläutern könnte wie ich mit sendmessage eine mausbewegung in einem minimierten fenster ausgebe
ich habe embarcadero rad studio 2010
hier ist der bisherige "source":
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
|
sendmessage?
12/26/2008 - CO2 Programming - 0 Replies
just wondering how it works in C# tried few tutorials with notepad in it and it doesnt send the letters/close it even it finds the window this is how i got it so far (pretty much copypasted, just to see how it works...)
private static extern IntPtr FindWindow(string winClass, string WinName);
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
private static extern IntPtr PostMessage(IntPtr hWnd,...
|
how do i sendmessage a password box
05/11/2007 - Conquer Online 2 - 11 Replies
HI,
I'm trying to sendmessage the password to the password box. It gives me the *** in the box but when i click the enter button it gives me the wrong password error.
any help would be appreciated
|
All times are GMT +1. The time now is 13:08.
|
|