MirnesC2 Posted February 9, 2011 Share Posted February 9, 2011 Is there any other alternatives for the Send/ControlSend functions? Any other possible way of sending keystrokes? A DLL injection/call? Link to comment Share on other sites More sharing options...
GEOSoft Posted February 9, 2011 Share Posted February 9, 2011 Why are you duplicating threads? This is te same question you asked in the other thread and it has another common factor; you harping about DLL injection will make people suspicious about your true intentions. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
MirnesC2 Posted February 9, 2011 Author Share Posted February 9, 2011 What do you mean by true intentions? Link to comment Share on other sites More sharing options...
MirnesC2 Posted February 10, 2011 Author Share Posted February 10, 2011 No one wants to help me?... Link to comment Share on other sites More sharing options...
bo8ster Posted February 10, 2011 Share Posted February 10, 2011 What do you want to do that Send/Control Send cannot? It is a general interest question or is the a restriction with Send/Control Send? GEOSoft was pointing out that most ppl that require DLL injection have malicious intentions. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
wolf9228 Posted February 10, 2011 Share Posted February 10, 2011 (edited) expandcollapse popup#include <SendMessage.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> GUICreate("My GUI edit") $ControlID = GUICtrlCreateEdit("First line" & @CRLF, 176, 32, 121, 97, $ES_AUTOVSCROLL + $WS_VSCROLL) GUISetState() TextSend($ControlID,"Autoit" & @CRLF & "Autoit" & @CRLF) Sleep(1000) ;Virtual-Key Codes ;;http://msdn.microsoft.com/en-us/library/ms645540%28VS.85%29.aspx KeySend($ControlID,0x26) ;VK_UP (0x26) Sleep(1000) KeySend($ControlID,0x26) ;VK_UP (0x26) Sleep(1000) KeySend($ControlID,0x26) ;VK_UP (0x26) Sleep(1000) KeySend($ControlID,0x26) ;VK_UP (0x26) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Func KeySend($hWnd,$Virtual_Key_Code) if Not IsHWnd($hWnd) Then _ $hWnd = GUICtrlGetHandle($hWnd) _SendMessage($hWnd,$WM_KEYDOWN,$Virtual_Key_Code,0) _SendMessage($hWnd,$WM_KEYUP,$Virtual_Key_Code,0) EndFunc Func TextSend($hWnd,$Text) if Not IsHWnd($hWnd) Then _ $hWnd = GUICtrlGetHandle($hWnd) For $i = 1 To StringLen($Text) $Char = StringMid($Text,$i,1) _SendMessage($hWnd,$WM_CHAR,AscW($Char),0) Next EndFunc Edited February 10, 2011 by wolf9228 ØµØ±Ø Ø§Ù„Ø³Ù…Ø§Ø¡ كان هنا  Link to comment Share on other sites More sharing options...
MirnesC2 Posted February 10, 2011 Author Share Posted February 10, 2011 (edited) GEOSoft was pointing out that most ppl that require DLL injection have malicious intentions.I don't really even know what DLL injection is, I just thought it might be related as an alternative. expandcollapse popup#include <SendMessage.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> GUICreate("My GUI edit") $ControlID = GUICtrlCreateEdit("First line" & @CRLF, 176, 32, 121, 97, $ES_AUTOVSCROLL + $WS_VSCROLL) GUISetState() TextSend($ControlID,"Autoit" & @CRLF & "Autoit" & @CRLF) Sleep(1000) ;Virtual-Key Codes ;;http://msdn.microsoft.com/en-us/library/ms645540%28VS.85%29.aspx KeySend($ControlID,0x26) ;VK_UP (0x26) Sleep(1000) KeySend($ControlID,0x26) ;VK_UP (0x26) Sleep(1000) KeySend($ControlID,0x26) ;VK_UP (0x26) Sleep(1000) KeySend($ControlID,0x26) ;VK_UP (0x26) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Func KeySend($hWnd,$Virtual_Key_Code) if Not IsHWnd($hWnd) Then _ $hWnd = GUICtrlGetHandle($hWnd) _SendMessage($hWnd,$WM_KEYDOWN,$Virtual_Key_Code,0) _SendMessage($hWnd,$WM_KEYUP,$Virtual_Key_Code,0) EndFunc Func TextSend($hWnd,$Text) if Not IsHWnd($hWnd) Then _ $hWnd = GUICtrlGetHandle($hWnd) For $i = 1 To StringLen($Text) $Char = StringMid($Text,$i,1) _SendMessage($hWnd,$WM_CHAR,AscW($Char),0) Next EndFunc Thank you wolf. I got the textSend function down, but I'm not sure what the keySend function does? I tried replacing 0x26 (UP key) with something like 0x50(P key) just to test it, and it didn't appear in the edit box? (UP key works) For example this doesn't work... #include <SendMessage.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> $hWnd = WinGetHandle("Untitled - Notepad") sleep("5000") _SendMessage($hWnd,$WM_KEYDOWN,0x26,0) _SendMessage($hWnd,$WM_KEYUP,0x26,0) _SendMessage($hWnd,$WM_CHAR,AscW("p")) MsgBox(0,"Handle",$hWnd) Edited February 11, 2011 by MirnesC2 Link to comment Share on other sites More sharing options...
DeltaRocked Posted February 11, 2011 Share Posted February 11, 2011 Is there any other alternatives for the Send/ControlSend functions? Any other possible way of sending keystrokes? A DLL injection/call?Hi MirnesC2,the only alternative to send keystrokes without using Send or Controlsend has been explained in Search for ControlCommand() in that script.Hope you find the script useful.RegardsDelta Rocked. Link to comment Share on other sites More sharing options...
MirnesC2 Posted February 12, 2011 Author Share Posted February 12, 2011 Hi MirnesC2, the only alternative to send keystrokes without using Send or Controlsend has been explained in Search for ControlCommand() in that script. Hope you find the script useful. Regards Delta Rocked. Hey, Thanks for the reply, I tried this earlier as well. It doesn't really fit with what I am making. If someone can error check this, I think it may work. #include <SendMessage.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> $hWnd = WinGetHandle("Untitled - Notepad") sleep("5000") _SendMessage($hWnd,$WM_KEYDOWN,0x26,0) _SendMessage($hWnd,$WM_KEYUP,0x26,0) _SendMessage($hWnd,$WM_CHAR,AscW("p")) MsgBox(0,"Handle",$hWnd) 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