Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 27th, 2025, 5:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: ASCII characters
PostPosted: April 26th, 2005, 3:52 pm 
Offline

Joined: April 21st, 2005, 4:47 pm
Posts: 43
Location: Southampton, UK
Within Opus 4.5 script, I would like to embed formatting characters such as tab and line feed within a single string variable.

I've tried a variety of the usual suspects such as chr(nn) to include ASCII codes but no luck as yet. Can it be done?

TIA


Top
 Profile  
 
 Post subject:
PostPosted: April 26th, 2005, 4:03 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

You can insert a tab using the escape string \t or a line return using \n.

The attached publication demonstrates this in action.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 6th, 2005, 9:18 am 
Offline

Joined: April 21st, 2005, 4:47 pm
Posts: 43
Location: Southampton, UK
Doh! Belatedly, thank you - blindingly obvious.

However, ideally I'd still like to be able to use certain other characters, for example ascii 7 (BEL) without the need for playing a sound file.

Thanks, Linnet


Top
 Profile  
 
 Post subject:
PostPosted: July 6th, 2005, 10:30 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Linnet wrote:
However, ideally I'd still like to be able to use certain other characters, for example ascii 7 (BEL) without the need for playing a sound file.

That's a real blast from the past! I'm afraid that's never going to work.

If you want sounds without including the sound resources just use the Play System Sound action or script function - these use the standard Windows sound events and play whatever sounds the user has associated with them.

This is particularly useful for error and warning messages since it will then play the sound the user associates with such messages, rather than whatever the publication designer has chosen.

_________________
ddww Opus Developer


Last edited by Duncan Lilly on July 6th, 2005, 11:32 am, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 6th, 2005, 10:39 am 
Offline

Joined: April 21st, 2005, 4:47 pm
Posts: 43
Location: Southampton, UK
Hi Duncan

This was a 'for example' (since ascii 7 is near the start of the list...) The app in question is incidentally not multimedia-oriented and may well be used on desktop machines without speakers.

However, the guts of the question - and I apologise if it didn't have enough emphasis - was whether or not script will support a reference to characters by ascii (dec/hex) value rather than standard escape combinations. Suspect not however! 8-)

Linnet


Top
 Profile  
 
 Post subject:
PostPosted: July 6th, 2005, 2:19 pm 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
Hi Linnet

The answer is actually yes (sort of)

You can represent anything on the ascii chart with the
undocumented script command String.fromCharCode()

var a = "002"
var STX = String.fromCharCode(a)

HTH

Chris

_________________
Opus Resources and Services


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 6 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group