Leomund Posted May 22, 2012 Share Posted May 22, 2012 (edited) ControlSend doesn't send {ALTDOWN} but it will send characters (a-z). Why is that? Also, Send("{ALTDOWN}" works. Edited May 22, 2012 by Leomund Link to comment Share on other sites More sharing options...
Danyfirex Posted May 22, 2012 Share Posted May 22, 2012 (edited) You should read. ControlSend: Sends a string of characters to a controlSend: Sends simulated keystrokes to the active window. Edited May 22, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Leomund Posted May 22, 2012 Author Share Posted May 22, 2012 (edited) Sorry, I don't get why the difference between control and active window is important. Also, ControlSend('!') works with notepad. Extrapolate? I've read. (I tried to use winspector with my telnet but nothing? I'm guessing I have to find some other way of sending commands.) Edited May 22, 2012 by Leomund Link to comment Share on other sites More sharing options...
Danyfirex Posted May 22, 2012 Share Posted May 22, 2012 (edited) difference is that control can be anything inside of a windows. maybe a textbox,listbox. do you understand? Edited May 22, 2012 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Leomund Posted May 22, 2012 Author Share Posted May 22, 2012 Hmm, yeah. I think I understand. I'm still confused as to why it will send a character but not alt key, using same controlID (handle). Link to comment Share on other sites More sharing options...
Danyfirex Posted May 22, 2012 Share Posted May 22, 2012 look this example Run(@WindowsDir & "notepad.exe", "", @SW_MAXIMIZE) WinWaitActive("[CLASS:Notepad]") Send("Today's time/date is {F5} {ENTER}") ; here I simulate the key "f5" if you lock in notepad-edition-f5 return the time/date ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window F5 ENTER") ;here I use controlsend to send string of characters. Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Leomund Posted May 22, 2012 Author Share Posted May 22, 2012 ControlSend("[CLASS:Notepad]","","Edit1",'!f')It doesn't seem I'm going to solve my problem. Thanks though.I would be a little surprised if I'm really not supposed to use controlsend for the ALT key. Link to comment Share on other sites More sharing options...
Danyfirex Posted May 22, 2012 Share Posted May 22, 2012 what do you want to make exactly? Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut 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