View Full Version : Assigning Symbol Var to Compiler Var?
Doug I
03-15-2008, 12:55 PM
Hi,
I was wondering if there was a way for the value of a symbol variable to be passed to a Compiler Variable?
Can I use #Set a Compiler Variable to grab the value of a symbol?
Thanks,
Doug
linder
03-15-2008, 01:44 PM
Hi Doug,
It's similar to this one:
http://www.lindersoft.com/forums/showthread.php?t=7790
Just do:
#const $MY_VALUE$ = Prompt for Value
#set compiler variable [TEST] = "$MY_VALUE$"
Set Variable %MY_VAR% to "[TEST]"
Display Message Box "Variable Value is: %MY_VAR%" -- "No problem"
Does this help?
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Doug I
03-15-2008, 04:51 PM
Hi,
Thanks Friedrich for you quick response to my questions. As always, excellent support!
You suggestion did not exactly work right, but it did point me in a different direction to fix my problem.
I was not using constants... I was using #def. Since I jump between command line batches and running the script interactively, I chose #DEF to grab the command line values. However, #const can also do the same.
The big difference is that your example shows that a constant can pass its value to a compiler variable. You cannot do the same for a preprocessor symbol. At least I tried every combo, and it never worked.
So, I switched my batch file vars from symbols to constants by changing /DS to /SC and was able to accomplish my goal. Thanks.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.