Messaggio di errore

Access denied. You may need to login below or register to access this page.

Access Denied / User log in

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!

Login rapido

Usa il tuo social account esistente ed accedi senza bisogno di registrazione: nessuna conferma, nessuna nuova password da ricordare, veloce, facile e sicuro.

...oppure usa un account CoolSoft

Inserisci il tuo nome utente CoolSoft.
Inserisci la password associata al tuo nome utente.
Add reply | CoolSoft

Add reply

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Warning!

You're posting your message as anonymous user.

By registering you'll be allowed to receive notifications of post replies and new threads.
Registration is really quick and only requires you to choose an username and provide a valid email address.

Click here to to register.

A confirmation mail will be sent to this address.
Your email address won't be published.

Altre informazioni sui formati del testo

Filtered HTML

  • Elementi HTML permessi: <a> <blockquote> <br> <cite> <code> <dd> <del> <dl> <dt> <em> <img> <li> <ol> <p> <pre> <s> <span> <strike> <strong> <ul>
    Allowed Style properties: background-color, color, font-size, font-style, height, text-align, text-decoration, text-transform, width
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>, <c>, <cpp>, <csharp>, <drupal5>, <drupal6>, <javascript>, <php>. The supported tag styles are: <foo>, [foo].
  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Linee e paragrafi vanno a capo automaticamente.

Plain text

  • Nessun tag HTML consentito.
  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Linee e paragrafi vanno a capo automaticamente.
CAPTCHA
Questa domanda serve a prevenire lo spam e gli accessi non autorizzati.
Annulla
Posts: 1972
Joined: 25 Mar 2012 - 01:19
Re: Use global variable in dialog's ControlCustomScript

If you defined ${MAIN_SELECTION} variable outside th .nsdinc file and before including it it should work.
What's the output of the first MessageBox? I mean, what's the value of ${MAIN_SELECTION} variable?

MessageBox MB_OK|MB_ICONEXCLAMATION "Selection $(MAIN_SELECTION)" /SD IDOK

How do you store the value into the variable?
I'd like to give a look to the whole script, if you like too.
Please remove everything but the radiobuttons page and a page before/after, zip all the .nsi* files together and post it here (or send it to me through the contact form).

Anonymous user
Use global variable in dialog's ControlCustomScript

Hi! I have used Dialog Designer to create a dialog with radio buttons and worked out fine. I have successfully managed to handle radiobuttons selections. However, I have the following problem: when I switch between pages my radiobutton selection disappears. So I want to somehow store the selected value in the outside script (I used a global variable like this Var /GLOBAL MAIN_SELECTION and store the value selected in each of the onClick callbacks for each radiobutton) and then use this value when dialog is recreated (defined in CreateFunctionCustomScript). 

The script I added was the following

MessageBox MB_OK|MB_ICONEXCLAMATION "Selection $(MAIN_SELECTION)" /SD IDOK
 
${If} $MAIN_SELECTION == "1"
    MessageBox MB_OK|MB_ICONEXCLAMATION "Select radio 1" /SD IDOK
    ${NSD_Check} $hCtl_MainPage_RadioButton1
${Endif}
 
${If} $MAIN_SELECTION == "2"
    MessageBox MB_OK|MB_ICONEXCLAMATION "Select radio 2" /SD IDOK     
    ${NSD_Check} $hCtl_MainPage_RadioButton2
${Endif}
 
${If} $MAIN_SELECTION == "3"
    MessageBox MB_OK|MB_ICONEXCLAMATION "Select radio 3" /SD IDOK
    ${NSD_Check} $hCtl_MainPage_RadioButton3
${Endif}
 
${If} $MAIN_SELECTION == "4"
    MessageBox MB_OK|MB_ICONEXCLAMATION "Select radio 4" /SD IDOK
    ${NSD_Check} $hCtl_MainPage_RadioButton4
${Endif}

But it doesn't work. My question is.
1) How can I restore the selected radiobutton when going back and forth between pages (back in my case)?
2) Is it possible and how to communicate some variables between main script and scripts generated by Dialog Designer?
 
Looking forward to any tip!
Thanks in advance.