X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Oleksandr Gavenko Subject: Re: simulating console input Date: Fri, 03 Sep 2010 11:21:19 +0300 Lines: 16 Message-ID: References: <20100902074703 DOT GA11464 AT gaston DOT couberia DOT bzh> <4C7FC3B4 DOT 1060606 AT cygwin DOT com> <20100903075312 DOT GA18543 AT gaston DOT couberia DOT bzh> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: <20100903075312.GA18543@gaston.couberia.bzh> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 03.09.2010 10:53, Peter Münster wrote: > So my questions are: > - Is it possible to write such a program: ConsoleKeypressSimulator.exe ? Try http://www.autohotkey.com/ Or try VBScript/JScript: $ cat command.js var process = WScript.CreateObject("WScript.Shell"); process.Run("i-use-gui-command-here --with -a --few args"); WScript.Sleep(1000); process.AppActivate(process.ProcessID); process.SendKeys("{TAB}{TAB}{TAB}{ENTER}"); $ cmd /c command.js > - If yes, what is the degree of difficulty to write that? Try upper. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple