Indigo Rose Software
  #1  
Old 09-24-2004
eric_darling's Avatar
eric_darling eric_darling is offline
Indigo Rose Customer
 
Join Date: Jun 2002
Location: Southeast USA
Posts: 1,804
Check Box Variables

Quick LUA oriented question.

I tried figuring this one out on my own, but I can't seem to get this to work. I'm trying to have the installer check on the status of two checkboxes in my project. If they are checked, then the project should open external documents (one is plain txt and the other is pdf).

What am I doing wrong?

(this code appears in the screen's On Next event handler):
Code:
ReadMeResult = DlgCheckBox.GetProperties(CTRL_CHECK_BOX_01);
if ReadMeResult == "true" then
File.Open(SessionVar.Expand("%AppFolder%\\ReadMe.txt"), "", SW_SHOWNORMAL);
end

WhatsNewResult = DlgCheckBox.GetProperties(CTRL_CHECK_BOX_02);
if WhatsNewResult == "true" then
File.Open(SessionVar.Expand("%AppFolder%\\whats_new.pdf"), "", SW_SHOWNORMAL);
end

Screen.Next();
__________________
Eric Darling
eThree Media
http://www.ethreemedia.com
Reply With Quote
  #2  
Old 09-24-2004
Brett's Avatar
Brett Brett is offline
Indigo Rose Staff Member
 
Join Date: Jan 2000
Posts: 2,001
The easier way is to use the Lua variable that was assigned to the checkbox in the Checkbox properties screen ("Store state in Lua variable" field). Then you just check for that variable rather than doing GetProperties. If you do want to use the DlgCheckBox.GetProperties action, keep in mind that a table is returned, not just the checked value:

Code:
ReadMeResult = DlgCheckBox.GetProperties(CTRL_CHECK_BOX_01);
if ReadMeResult.Checked == true then
File.Open(SessionVar.Expand("%AppFolder%\\ReadMe.txt"), "", SW_SHOWNORMAL);
end
Reply With Quote
  #3  
Old 09-24-2004
eric_darling's Avatar
eric_darling eric_darling is offline
Indigo Rose Customer
 
Join Date: Jun 2002
Location: Southeast USA
Posts: 1,804
I see, it's a table.... Many thanks, Brett.
__________________
Eric Darling
eThree Media
http://www.ethreemedia.com
Reply With Quote
  #4  
Old 09-27-2004
Ted Sullivan's Avatar
Ted Sullivan Ted Sullivan is offline
Indigo Rose Staff Member
 
Join Date: Oct 2003
Posts: 825
Darryl is currently working on a really handy "example project". It will contain some great examples on how to work with each of the screen types and should be available later this afternoon.
__________________
Check out the new MSI Factory 2.0!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default check box value based on variable Terry Rasmussen Setup Factory 6.0 7 02-27-2004 03:08 PM
HOWTO: Display Conditional Text Based Upon a List Box Selection Support AutoPlay Media Studio 4.0 Examples 0 10-15-2002 11:54 AM
Packages and If Statements Medlir Setup Factory 6.0 4 05-09-2002 04:51 PM
check box on finish screen smarty Setup Factory 6.0 3 04-10-2002 09:42 AM
Variables in Text Box tbybee AutoPlay Menu Studio 3.0 2 03-07-2001 03:20 PM


All times are GMT -6. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software