+ Reply to Thread
Results 1 to 9 of 9

Thread: How to define a variable?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to define a variable?

    Hi all,
    as you can see, I'm starting with SB. I saw in the examples (dialog2, for example) a dialog window for a password that save the result in a variable (%_SB_PASSWORD%). I looked for in the script but I couldn't find where that variable is defined.
    I read the help too but I didn't find anything.
    So, any help will be appreciated.
    Thanks in advance.

    Mauricio

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to define a variable?

    Mauricio,

    %_SB_PASSWORD% is a pre-defined variable (no need to define it again). See Script Editor -> Script Variables list. All "blue" items are pre-defined runtime variables.

    You can create your own variables in the Script Editor (wherever you want, just make sure it is declared before you use it).

    Does this help?

    BTW, the use of the %_SB_PASSWORD% variable in "Dialog Demo 2.sb6" is only an example. In fact, there is no need to really check the password using an If Statement. You can just check the "Auto-verify Password" option (Advanced tab in the Dialog Properties) to automatically let the installer check the validity of the entered password.

    Friedrich

  3. #3

    Default Re: How to define a variable?

    Hi,
    I need a dialog window where the user will enter 4 variables. So, I need to define this variable before using them. How? Where?
    Thanks again.

    Mauricio

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to define a variable?

    Mauricio,

    Just use the "Set Variable..." script item in the Script Editor and create the four variables before you use them (wherever you want). Then, in your dialog, select the required variable(s). In other script functions, you may use <Ctrl><Right Mouse Button> to open a variable list.

    Does this help?

    Friedrich

  5. #5

    Default Re: How to define a variable?

    Thanks Friedrich,
    that is what I wanted!!!
    Last question: how can I protect the password entry? I want to see the ****. I know that I have a different dialog for password but I'd like to know if I can do it in the same window.
    Thanks again.

    Mauricio

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to define a variable?

    Mauricio,

    Please try the "Wizard: Set Control Properties" function (see "Set Control Properties.sb6" demo script on how to use it).

    There is a "Set Password Style" option. You can use this option to set the ****

    Does this help?

    Friedrich

  7. #7

    Default Re: How to define a variable?

    Hi again,
    I saw the wizard but, obviously, I have a new question. You use, in the example, this:
    Set Password Style to Control ID $USER_EDIT3$
    Question is: where is defined the control ID $USER_EDIT3$? Because I couldn't find it in the script.
    In my window I store the value in a variable called %MCS_PASSWORD% and, again, I couldn't find any place where to find the control ID for that variable.
    Thanks again.

    Mauricio

  8. #8
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to define a variable?

    Hi Mauricio,

    Just open the "Common Definitions.sbi" in your Script Editor (script tab).

    Check the Standard Wizard Dialog Control IDs.

    Does this help?

    Friedrich

  9. #9

    Default Re: How to define a variable?

    Thanks!!! It worked fine!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •