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)
-   -   Checkboxes (https://www.kinook.com/Forum/showthread.php?t=113)

gdanko 05-28-2003 03:25 PM

Checkboxes
 
Is there a way to bring up a form with checkboxes? Can VBScript do such a thing?

I want the user to click the servers they want to deploy software to and click a submit button. The rest I can handle myself. :)

kinook 05-28-2003 04:29 PM

VBScript only provides InputBox (single string) and MessageBox (yes/no/cancel) built-in. But you can create your own custom actions which get called from the build to display a custom dialog (with checkboxes, combos, validation, etc.) and store the inputs in temorary macros for later steps in the build. See 'user actions' in the help index; a VB6 sample that provides custom prompting like this is available in the Prompt.bld sample (User Action section). This FAQ also discusses the prompt options that are available: http://www.kinook.com/Forum/showthread.php?threadid=37

gdanko 05-28-2003 04:31 PM

Hmm I am thinking the .ini file may be a better approach. I can have switches.. Do this, dont do this.. and certain steps can be performed based on whether or not a certain switch is set in an .ini :) Let's see.

pjaquiery 05-28-2003 04:43 PM

We use an app that receives email instructions from our users to get builds done. A typical email body would look like:

run build prerelease Chart5 "Project=Bugfix/CFW5.0.2"

where the "build prerelease Chart5" bit is the name of a VBP project in a particular folder, and the "Project=Bugfix/CFW5.0.2" bit sets the temporary variable Project to the value Bugfix/CFW5.0.2.

The software also schedules a nightly build for us and manages our Red Faction map voting system :-).

gdanko 05-28-2003 04:50 PM

Oh you can launch stuff from the command line? Sorry, this is my second day of doing this.

I have a funny error/bug where I have this as my .ini file.

[Global]
NewMachineConfig = No

[Batch1]
NumberOfServers = 2
Server0 = WWW6
Server1 = WWW7
Server2 =
Server3 =
Server4 =
Server5 =
Server6 =
Server7 =
Server8 =
Server9 =

I can use this command to assign the value of NumberOfServers to a variable:

Application.Macros(vbldTemporary).Add "SERVERNAME","[%READ_INI(C:\deploy.ini,Batch1,NumberOfServers%]"

But I cannot do this:

Application.Macros(vbldTemporary).Add "SERVERNAME","[%READ_INI(C:\deploy.ini,Batch1,Server0%]"

Logging %SERVERNAME% in the first example returns a 2, but in the second example it is blank. It seems like for some reason I cannot read these values in. However, I am able to just post them with a log command.

I will test something. The NumberOfServers parameter is numeric, the rest are string. Let me see if changing one of them to an integer works.....

Yes! Just as I suspected.....

Application.Macros(vbldTemporary).Add "SERVERNAME","[%READ_INI(C:\deploy.ini,Batch1,Server0)%]"

This works ONLY if the value in the ini file is integer. I changed one of those that did not work to an int value and I could assign it to %SERVERNAME%.. Now.. why can't I assign a string..


All times are GMT -5. The time now is 04:28 PM.


Copyright © 1999-2023 Kinook Software, Inc.