Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 9th, 2025, 9:41 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: saving the contents of a variable that includes a <
PostPosted: August 3rd, 2008, 3:38 pm 
Offline

Joined: August 3rd, 2008, 2:22 pm
Posts: 2
I am making an article builder for a website that constructs pages from pre-built chunks of html code with a user-entered text heading and text content slotted into it.

Opus reads a text file with the code eg <div class="contentItem"/>
and puts it in a variable, fine.

Displaying the contents of the variable shows everything is there- however as the some of the content is (naturally) wrapped in < > it does not get written out to disc by Opus as it thinks the <> refers to a variable within Opus.

Is there a way - maybe some escape character - to tell opus that the <> is to be not to be interpreted, but is just plain text?

I have tried putting the "<" in quotes etc.

les


For this message lesh has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: August 3rd, 2008, 6:32 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Opus' escape character is backslash (\) but if you are saving the example string given using scripting as either a string in quotes or string in a variable then this problem shouldn't occur.

IE Either:

textObj = OpenFile("c:\\myText.txt")
textObj.WriteLine( '<div class="contentItem"/> ')

or

myFish = '<div class="contentItem"/> '
textObj = OpenFile("c:\\myText.txt")
textObj.WriteLine(myFish )

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 4th, 2008, 6:20 pm 
Offline

Joined: August 3rd, 2008, 2:22 pm
Posts: 2
Thanks,
I had put the prototype together with "Actions" not script. I will switch to script as per your examples and that should do the trick then.

les


For this message lesh has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 68 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group