Esa-Matti Posted July 24, 2006 Posted July 24, 2006 The following does not send a CTRL-C to the console app I am running. StdinWrite($ConsoleProc,"^c") All it does is send the string "^c". The app can only be closed with a CTRL-C. Any ideas?
PsaltyDS Posted July 25, 2006 Posted July 25, 2006 The following does not send a CTRL-C to the console app I am running. StdinWrite($ConsoleProc,"^c") All it does is send the string "^c". The app can only be closed with a CTRL-C. Any ideas? Ctrl-c is hex 0x03, but I don't know if StdInWrite() will accept a hex number for the string. You could try: StdinWrite($ConsoleProc, 0x03) ...but it may just throw an error. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Graywalker Posted January 19, 2011 Posted January 19, 2011 (edited) Ctrl-c is hex 0x03, but I don't know if StdInWrite() will accept a hex number for the string. You could try: StdinWrite($ConsoleProc, 0x03) ...but it may just throw an error. Nope, that doesn't work. Tried it. Also tried StdinWrite($ConsoleProc,Hex(0x03)) and StdinWrite($ConsoleProc,BinaryToString(00000011)) and StdinWrite($runping,00000011) All seem to be sending ^C to the stdin stream... and doing nothing. So.... ??? ... still working on it.... Edited January 19, 2011 by Graywalker
PsaltyDS Posted January 20, 2011 Posted January 20, 2011 Seriously, you had to dig up a post over four years old...? How about just ControlSend() to the window with an empty control spec? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
LoWang Posted March 7, 2012 Posted March 7, 2012 Psalty so would you rather have him make a new thread for the same thing? This shows up on the top of google results if you search for it, so I think there is nothing wrong with bumping it until somebody finally finds out how to do it I also need this right now and I wonder that after 6 years nobody found a solution! This looks like a favourite problem in other languages too. And about that controlsend idea - this might work, but have you ever needed to press ctrl+c in a gui application? This is needed for a console apps of course. Please somebody check this. And yes maybe it was posted somewhere already and I am just bad at searching, so I apologize in advance
BrewManNH Posted March 7, 2012 Posted March 7, 2012 And you dig up the same thread after a year of it being dormant with no information that's going to help anyone, instead of starting a new thread and linking to this one? Forum ettiquette looks down on necroing 6 year old threads that don't have anything useful in it, asking if anyone has found a fix for it yet. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
LoWang Posted March 7, 2012 Posted March 7, 2012 (edited) Allright I apologize for my misunderstanding of this unwritten forum ettiquette:) Can you please explain to me what is the advantage of making new thread with a link to this one instead of replying directly to it? I think it would just be more difficult for people to read it and see what others already tried and what did not work. I consider failed attempts to be usefull information too... Edited March 7, 2012 by LoWang
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