MerkurAlex Posted October 30, 2008 Share Posted October 30, 2008 I've gotten to the point of realizing i would need to use $WM_KEYDOWN and $WM_KEYUP or $WM_CHAR and probably something like "0x"&_StringToHex("a") but every combination i have tried has not worked im testing for notepad. And yes i have searched and cannot find anything. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 Why don't you just use Send() or ControlSend()? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 Why don't you just use Send() or ControlSend()?I knew i should have mentioned this Send() only works when the window is active and ControlSend() only works with a control. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
Josbe Posted October 30, 2008 Share Posted October 30, 2008 I've gotten to the point of realizing i would need to use $WM_KEYDOWN and $WM_KEYUP or $WM_CHAR and probably something like "0x"&_StringToHex("a") but every combination i have tried has not worked im testing for notepad.And yes i have searched and cannot find anything.What do you have (some snippet) with _SendMessage()? AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 What do you have (some snippet) with _SendMessage()?This is my current test: #include <String.au3> #include <SendMessage.au3> #include <windowsconstants.au3> _SendMessage(WinGetHandle("Untitled - Notepad"),$WM_CHAR,"0x"&_StringToHex("a"),0,0,"int","long") [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 You know you can use ControlSend() with a window right? Just leave the control ID blank. It's been discussed before. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 ... yes i know this but some programs are built to specifically block that method..... [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 (edited) Games with guards are usually the only programs built to do that. If you're making a game bot say so, you'll get more specialized help. I think all of us were assuming you were trying to send a message to another program you'd written. I really only brought up ControlSend() again specifically because of this:I knew i should have mentioned this Send() only works when the window is active and ControlSend() only works with a control. Edited October 30, 2008 by dbzfanatic Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 If it were a program i had written i would have used controlsend or another method but it is not a game bot either its just built like one it has no protection but i has no controls and it will not accept controlsend. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 What program is this? Perhaps someone here has experience with it. I personally know that java programs don't usually present anything of much value for automation so is it a java app? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 (edited) What program is this? Perhaps someone here has experience with it. I personally know that java programs don't usually present anything of much value for automation so is it a java app?Well i am not going to mention the program as it is a private app and im not supposed to tell anyone im testing if it is actually possible to send keys to the window for the creator of it.EDIT:In any case im just trying to figure out why _SendMessage() wont work the way im using it according to msdn im using it correctly but it will not send to notepad. Edited October 30, 2008 by MerkurAlex [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 Well from the autoit helpfile it says you have to use the message number and not the message itself so try that. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 Well from the autoit helpfile it says you have to use the message number and not the message itself so try that.uummm what do you think the variable im using equals? [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 $WM_KEYDOWN is a string. It's defined as a hex number yes but as passed it's still a string, or seems to react that way. Try $WM_CHAR instead of keydown (WM_CHAR = &H102) and pass the hex key to the wparam, lparam is repititions, scan code,extended,etc. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MerkurAlex Posted October 30, 2008 Author Share Posted October 30, 2008 $WM_KEYDOWN is a string. It's defined as a hex number yes but as passed it's still a string, or seems to react that way. Try $WM_CHAR instead of keydown (WM_CHAR = &H102) and pass the hex key to the wparam, lparam is repititions, scan code,extended,etc.heh if you look above at my snippet im using WM_CHAR and that &H102 is for VB my friend. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now