Normal Topic @RedirectProces(command, feed) (Read 7058 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
@RedirectProces(command, feed)
May 18th, 2018 at 3:36pm
Print Post Print Post  
Hello, I'm having some trouble understanding this command. I get that there is a pipeline for input/output and that you give the program you want input then it returns output and you hopefully send that back to Sesame.

My problem is that I don't understand the "(command, feed)" part of it.  Say I want to open cmd (command prompt) then I want to type "powershell.exe" then I want to press enter once. Then I want to send my input which is another command, is it possible to do this? Or should I use @ASyncShell() instead or a combination of the two?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: @RedirectProces(command, feed)
Reply #1 - May 18th, 2018 at 5:06pm
Print Post Print Post  
Command is the executable, with switches if needed, that you wish to run.

Feed is the data to feed to Standard Input(STDIN)

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: @RedirectProces(command, feed)
Reply #2 - May 18th, 2018 at 5:28pm
Print Post Print Post  
If I leave command blank or as "" then is the executable "cmd.exe" (Command Prompt)?
  
Back to top
 
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: @RedirectProces(command, feed)
Reply #3 - May 18th, 2018 at 5:32pm
Print Post Print Post  
On Slate I keep getting the first part of the text I want from cmd, then I get "C:\Sesame2\More?" like it's only running the first part of the program. But it's all written as one line. Example: "powershell 'C:\Users\User\PowershellScript.ps1'"
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: @RedirectProces(command, feed)
Reply #4 - May 18th, 2018 at 5:36pm
Print Post Print Post  
actiontech wrote on May 18th, 2018 at 5:28pm:
If I leave command blank or as "" then is the executable "cmd.exe" (Command Prompt)?


No. You must specify what program you wish to run. There is no default.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged