Indigo Rose Software
  #1  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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);
Reply With Quote
  #2  
Old 11-03-2003
TJ_Tigger's Avatar
TJ_Tigger TJ_Tigger is offline
Indigo Rose Customer
 
Join Date: Sep 2002
Location: Sol 3
Posts: 3,188
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);
Reply With Quote
  #3  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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.
Reply With Quote
  #4  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
I got it I think...

TextFile.WriteFromString("C:/flash/".."newflashcard.txt", "", false);

I needed to add the quotes" " around newflashcard.txt.

Thanks buddy!
Reply With Quote
  #5  
Old 11-03-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
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
Reply With Quote
  #6  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
Well, I was off base! It didn't work! POOP!

TIGGER HELP!
Reply With Quote
  #7  
Old 11-03-2003
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
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.
Reply With Quote
  #8  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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
Reply With Quote
  #9  
Old 11-03-2003
TJ_Tigger's Avatar
TJ_Tigger TJ_Tigger is offline
Indigo Rose Customer
 
Join Date: Sep 2002
Location: Sol 3
Posts: 3,188
Yeah, sorry I forgot about the double \\ to escape the backslashes. That'll learn me to try it before I open my big mouth
Reply With Quote
  #10  
Old 11-03-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
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
Reply With Quote
  #11  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
Ok so should it look like this?

TextFile.WriteFromString("C:\flash\".. newname..".txt" , "", false); :confused:
Reply With Quote
  #12  
Old 11-03-2003
Worm Worm is offline
Indigo Rose Customer
 
Join Date: Jul 2002
Location: USA
Posts: 3,937
TextFile.WriteFromString("C:\\flash\\".. newname..".txt" , "", false);
Reply With Quote
  #13  
Old 11-03-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
THAT'S IT! Thanks everyone!
Reply With Quote
  #14  
Old 11-04-2003
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
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
Reply With Quote
  #15  
Old 11-04-2003
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
Thanks Mark
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



All times are GMT -6. The time now is 01:36 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