Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Accepting Users inputs on output window (https://www.kinook.com/Forum/showthread.php?t=4903)

Shiamak 09-02-2011 03:58 PM

Accepting Users inputs on output window
 
Hello,

I have a scripts that expects a user input (Y/N) during build time, though the output is being thrown on standard output which is the visual Build output window but the output windows doesnt accpet user inputs?

Is there a way to achieve this? I am using VisualBuild 7.7.

I appreciate your help.

kinook 09-02-2011 04:06 PM

The Visual Build console app does not prompt for or accept user input in the console. You would need to prompt in another window (for instance, using InputBox, MsgBox, or similar -- see the Prompt.bld sample).

Shiamak 09-02-2011 05:24 PM

How do you apply this input to OUTPUTWINDOW?

In output window my scripts doesnt even wait but it works find in MS DOS window.

kinook 09-02-2011 05:30 PM

You don't apply it to the console window, you would store the result in a macro and use that in the rest of your script (conditional build rule, etc.).

Shiamak 09-02-2011 05:37 PM

I am sorry if I confused you, the Input has to be to a script (PHP) that is being run by VisualBuild via output window.

Is it possible?
This input is needed at the run time, not at the command line.

kinook 09-02-2011 06:16 PM

The output window doesn't run anything, it just logs output from steps in the project. I'm not quite clear on what you're trying to accomplish, but PHP is typically hosted in a web server--perhaps you could use the HTTP action to call the web server with the PHP script and use the results as needed?
http://www.kinook.com/VisBuildPro/Manual/http.htm

Shiamak 09-19-2011 03:30 PM

OK, here it is..

I have a php script that generates a choice menu for the user to choose from, I want to run this script from within visual build and want user (ME) to provide an input so the script can take appropriate action.

Is it possible?

BTW: this PHP script needs to be run in CMD.

kinook 09-20-2011 11:01 AM

If you are calling php.exe to run your script, and the script is sending a prompt to stdout and waiting for a response on stdin, there isn't a way to accept user input in the console and send it to the process from Visual Build.

Shiamak 09-20-2011 01:00 PM

Is there any other way of doing this ?

kinook 09-20-2011 03:10 PM

If you configure the Run Program step that calls php.exe to Read program output from None and uncheck Hide application window, you can respond to a prompt from a console app called from the build. Then set the exit code of the process based on the response and use that exit code in the next step of Visual Build as needed.
http://www.kinook.com/VisBuildPro/Ma...gramaction.htm


All times are GMT -5. The time now is 07:17 AM.


Copyright © 1999-2023 Kinook Software, Inc.