Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 6:09 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: write an array in the registry
PostPosted: February 9th, 2005, 9:39 am 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
hi,

is it possible with opus pro04 to write a variable array in the registry?
I can't select my array variable when i use the action "write data to registry" , and opus pro04 have only the function "ReadRegistryKey" in scripting !
What i try to achieve is :
- in a page, i have 6 text input with index 0,1,2,3,4,5 of an array variable
- when i click on a button "send", i want to write the array in the registry

(if it is not possible with opus pro04, is it possible with opus proXE ?)

thank's for help
Benoit

_________________
Opus Pro 06, Win XP.


For this message benoit has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 9th, 2005, 12:15 pm 
Offline

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

Thank you for your enquiry.

The Write Data to Registry action should allow you to write an array variable to the registry. I have achieved this using the following procedure;

- Create a blank new publication
- Add a script object to the page
- Create an array of number using the following syntax:

Code:
var myarray = new Array("1","2","3","4","5")


- Now click Publication > Publication Properties > Variables
- Click New and create a new variable named myarray with a default blank text value
- Click Apply and OK to confirm the changes
- Now add a button to the page
- In the button actions, apply a Write Data to Registry action
- Set the Source Variable to newarray
- Set the Destination Label to Test
- Click Apply and OK to confirm the changes
- Now preview the page and click the button
- Exit the preview and click Start > Run
- Clear the current contents of the Open: field and type "regedit"
- Click OK. The Registry Editor should appear
- Navigate to HKEY_CURRENT_USER\Software\Digital Workshop\Opus Publication Data
- Look through all of the subfolders until you find the one containing the Test key
- The value of 'Test' should be 1,2,3,4,5

I hope this helps. Please do not hesitate to contact me if you have any further queries.

Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


For this message Robin Garrett has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 9th, 2005, 1:23 pm 
Offline

Joined: November 9th, 2004, 10:35 am
Posts: 49
Location: Canterbury UK
Hi Benoit,

I have attached a sample which I think does what you need.



Andy Piddock


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


For this message Andy Piddock has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 9th, 2005, 3:17 pm 
Offline

Joined: November 9th, 2004, 10:35 am
Posts: 49
Location: Canterbury UK
Whoops! left this in the example after looking at what Robin had posted, not required.

Andy Piddock


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


For this message Andy Piddock has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 9th, 2005, 6:31 pm 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
thank you Robin...
thank you Andy. with your script i have see my mistake. I was trying to pass the variable array of the input box, directly with the "write data to registry"... and it was not possible...
now, that's ok.

thank you
Benoit

_________________
Opus Pro 06, Win XP.


For this message benoit has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 40 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