 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
RandomHeart
Joined: 24 Mar 2009 Posts: 11
|
Posted: Sun Nov 08, 2009 4:20 am Post subject: |
|
|
| Is it possible to run multiple commands in a pipe with cmdret.dll? |
|
| Back to top |
|
 |
widow Guest
|
Posted: Thu Nov 19, 2009 1:40 am Post subject: |
|
|
| RandomHeart wrote: | | Is it possible to run multiple commands in a pipe with cmdret.dll? |
You mean like this?
| Code: | | cmd /k netstat -ano|find /i "connected" && IF ERRORLEVEL==1 echo a>.\log.txt |
|
|
| Back to top |
|
 |
RandomHeart
Joined: 24 Mar 2009 Posts: 11
|
Posted: Fri Nov 20, 2009 4:50 am Post subject: |
|
|
| Yes, but without using cmd |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2446
|
Posted: Sat Dec 19, 2009 8:33 am Post subject: |
|
|
| Anonymous wrote: | why this doesnt work
| Code: | ; CMDret DLL version 3.1 (or greater) required
Run, Notepad,,, notepid
WinWait, ahk_pid %notepid%
WinWaitActive, ahk_pid %notepid%
CMD := "dir"
ControlGet, OutputWindow, Hwnd,, Edit1, ahk_pid %notepid%
if OutputWindow <> 0
StrOut := DllCall("cmdret.dll\RunInControl", "str", CMD, "Uint", OutputWindow, "str", "Edit", "int", "1") |
|
It doesn't work because dir is not an executable file. You would need to load the command interpreter first. | Code: | ; CMDret DLL version 3.1 (or greater) required
Run, Notepad,,, notepid
WinWait, ahk_pid %notepid%
WinWaitActive, ahk_pid %notepid%
CMD := "cmd /c dir c:"
ControlGet, OutputWindow, Hwnd,, Edit1, ahk_pid %notepid%
if OutputWindow <> 0
StrOut := DllCall("cmdret.dll\RunInControl", "str", CMD, "Uint", OutputWindow, "str", "Edit", "int", "1") |
|
|
| Back to top |
|
 |
luvan
Joined: 17 Mar 2007 Posts: 24
|
Posted: Sun Dec 20, 2009 6:55 pm Post subject: I do not under stand |
|
|
But
| Code: | | CMD := "cmd /c dir c: /s" |
will not work
 |
|
| Back to top |
|
 |
segalion Guest
|
Posted: Fri Jan 15, 2010 2:56 pm Post subject: Problems with cmdret |
|
|
I was using CMDret (runreturn) example funtion succesfully until I have in problems with timing in some cases executing (I suppose) large commandline curl parameter.
Seems that if I use CMD direct comand, it returns in less than 2 seconds. And when I use the same CMDret function it takes more than 15 secs.
Is there any limit with size of parameter command?
Maybe a problem with directory locations? I was using allways the full path... |
|
| Back to top |
|
 |
segalion Guest
|
Posted: Mon Jan 18, 2010 4:27 pm Post subject: |
|
|
| Sorry by the previous post. Thats was an error with timers stuffs. The function work fine (as cmd.exe) as expected calling first than call the timers... |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2446
|
Posted: Sun Jan 31, 2010 6:19 am Post subject: Re: I do not under stand |
|
|
| luvan wrote: | But
| Code: | | CMD := "cmd /c dir c: /s" |
will not work
 |
Which operating system are you using? |
|
| Back to top |
|
 |
autoh0tkey.com-user
Joined: 03 Mar 2010 Posts: 1
|
Posted: Wed Mar 03, 2010 11:58 am Post subject: |
|
|
Some command line programs require User Input. How can I do to insert it?
Like:
| Code: | c:\prog\>server_login.exe
Enter your user name
John
Enter your password
x3343
Verifying .... |
Thanks! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|