Page 1 of 1

Accessing ui objects from script

Posted: Tue Jul 01, 2008 2:10 pm
by klavelle
This may be a dumb question, but I'm trying to figure out how to access UI objects' properties from MSICode.

For example, if I wanted to run some scripts checking for specific registry keys, or disk space, or whatever, I then need to shift some objects around in a specific dialog. So if one of the said scripts reports that there isn't enough disk space, I need to show a specific image and a specific text label in the applicable dialog.

Thoughts?

Posted: Tue Jul 01, 2008 6:49 pm
by Alex_Ronquillo
klavelle,

The only way in which you can interact with dialogs in through variables. IA does not support changing dialog objects or properties from script.

Posted: Wed Jul 02, 2008 9:26 am
by klavelle
Well, that's unfortunate. Not being able to access UI objects or their properties from MSICode seems like an absolutely massive limitation. Is there any particular reason why this isn't possible?

Are there any plans to implement something like this?

No Dynamic UI

Posted: Mon Jun 22, 2009 3:59 pm
by Tiago
Yeah... I wanted to enable/disable the parameters on my custom dialog according to the components selected by the end-user on the "componentstree" dialog, but as stated by Klavelle, so far, that seems to be impossible on IA... A sad thing indeed. :(

Posted: Mon Jun 22, 2009 7:02 pm
by MichaelNesmith
What did you want to do? You can always use Get Component State into a variable that will read either TRUE or FALSE, and then you can drop a label on your form which has its caption set to that $VARIABLE$, this way you can just enable/disable/show/hide/etc. your dialog controls based on whether $VARIABLE$=TRUE or not.

Posted: Tue Jun 23, 2009 8:16 am
by Tiago
Thanks for the advice, Michael! That worked real fine! :D