|
#1
|
||||
|
||||
|
How to show Variables
In 4.0 I could ask to create a text file like this:
TextFile.Write ("C:\flash\%newname%.txt", "%newname%") In 5.0 I don't know how to show the variable as an variable: TextFile.WriteFromString("C:/flash/newname", "", false); |
|
#2
|
||||
|
||||
|
You will have to use the concatenate .. to combine the strings together. Or you can use the String.Concat to combine them as well. Try this
TextFile.WriteFromString("C:/flash/".. newname , "", false); |
|
#3
|
||||
|
||||
|
Thx for the reply Tigg...
I tried it out but it doesn't work. What i'm doing is this, I am having the end user name a new text file by having them add the name in an input box. When they hit done, it's suppose to add a text file into a folder that's already on their drive with what ever they named it. TextFile.WriteFromString("C:/flash/".. newfile, "", false); I need a .txt extention on the end. Can you elaborate? Last edited by Bruce; 11-03-2003 at 05:10 PM. |
|
#4
|
||||
|
||||
|
I got it I think...
TextFile.WriteFromString("C:/flash/".."newflashcard.txt", "", false); I needed to add the quotes" " around newflashcard.txt. Thanks buddy! |
|
#5
|
||||
|
||||
|
I put in the word for a knowledge base entry on the quotes and escape backslash Bruce so I'm sure something will pop-up at some point... Takes a minute to get used to but it makes sense once you get the hang of it.
![]() Corey Milner Creative Director, Indigo Rose Software |
|
#6
|
||||
|
||||
|
Well, I was off base! It didn't work! POOP!
TIGGER HELP! |
|
#7
|
|||
|
|||
|
Bruce you need to do two concatations (is that a word?)
"C:\\folder\\"..newfile..".txt" Last edited by Worm; 11-03-2003 at 08:00 PM. |
|
#8
|
||||
|
||||
|
No i'm trying to make a text file with the name that the end user gives AMS.
I'll give that a try, Thanks |
|
#9
|
||||
|
||||
|
Yeah, sorry I forgot about the double \\ to escape the backslashes. That'll learn me to try it before I open my big mouth
|
|
#10
|
||||
|
||||
|
It's tricky until it becomes habit, we've all been got by that at one point.
![]() A small knowledge base entry defintively outlining the new quotes and backslashes will give us somewhere to link people to... Corey Milner Creative Director, Indigo Rose Software |
|
#11
|
||||
|
||||
|
Ok so should it look like this?
TextFile.WriteFromString("C:\flash\".. newname..".txt" , "", false); :confused: |
|
#12
|
|||
|
|||
|
TextFile.WriteFromString("C:\\flash\\".. newname..".txt" , "", false);
|
|
#13
|
||||
|
||||
|
THAT'S IT! Thanks everyone!
|
|
#14
|
||||
|
||||
|
Hi Bruce,
Remember it always depends upon what is a variable and what is a string. Strings always need to be within quotes, Variables do not, but they need to be concatenated with strings (..) if you want to ‘add’ them into a string.. I hope that information helps.
__________________
MSI Factory The Next Generation Intelligent Setup Builder |
|
#15
|
||||
|
||||
|
Thanks Mark
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 01:36 AM.









Linear Mode
