Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Various Scripting Examples
PostPosted: May 31st, 2007, 10:49 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
I've uploaded a compilation of Opus examples that use scripting, for people to play with or use.

They include:

1. An auto-generated page navigation system
2. An auto-generated Table of Contents
3. Click n Select words within a text box
4. Click n Grab
5. Unique randomised numbers
6. Randomised answer order in a quiz
7. ROT13
8. Basic cloning

They can be found under the izones menu on my website. You need Plexus installed.

www.interaktiv.co.uk

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: May 31st, 2007, 11:16 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Mack
Thank you very much for doing this
I'm looking forward to exploring your scripts and learning (hopefully!) how they work.
Cheers
Graham

_________________
Too much coffee can result in frequent toilet breaks!


For this message Graham Baglin has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: June 1st, 2007, 8:17 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Mack
I was unable to download the zip file.
Clicking on the link produces a blank window and nothing else.
Did a search on my hard drive for a new zip file without luck
Can you post the zip file here?
But in saying that Imwould recommend that all zip downloaders visit Macks website. It is awesome.
Cheers
Graham

_________________
Too much coffee can result in frequent toilet breaks!


For this message Graham Baglin has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: June 1st, 2007, 9:44 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
I think that this is yet-another-IE issue. FF lets me download the file once I've added interactive to the allow popups list.

However, I've changed the target frame so NOW both IE and FF will respond better and the file should download. You may get a downloading file warning in IE depending on the version and security setting, but once this has been accepted, it will allow the DL.

FF will simply display the standard DL security box, with is much better and a lot clearer that IE's.

Having wasted a day last week trying to change Z-layer values in a CSS template because IE does it's own thing, you may have guessed that I'm not a great IE fan :-0

Hope that the DLd scripting examples provide fruitful.

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: June 1st, 2007, 10:22 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Thanks for that Mack

Works like a charm now.

I do have Firefox, so maybe you could edit your original post advising that Firefox is the recommended browser.

Cheers and thank you once again

Graham

_________________
Too much coffee can result in frequent toilet breaks!


For this message Graham Baglin has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: July 4th, 2008, 2:32 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Hi Mack!
I interests one function (unique randomised numbers), but I cannot download the file "function.zip".
Couldnt you attach this file on the forum?
Thanks.

_________________
Opus Pro 5.5
Win XP


For this message Volgar has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: July 4th, 2008, 4:08 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
I must have moved the zip when I was tidying the website. I update the example asap but for now here is the direct link:

http://www.interaktiv.co.uk/downloads/functions.zip

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: November 7th, 2008, 6:20 am 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Hi Mack!

Thank you for your work. I use this script often.
Now i want to find a unique number, but with one exception, which is in the variable (for example $myNumber).
Give what changes to make in the code to delete the number specified in the variable, please.
Thank you.

Code:
function theRandomiser(myLimit)
{
var myNumbers = new Array()
var myMix = new Array()
var myCount = 0
var myloop

while (myCount <= myLimit-1)
   {
   
   myNumbers[myCount] = myCount+1
   myOrderedOutput = myOrderedOutput + 'Q'+myNumbers[myCount] + ' '
   myCount++
   
   }
var myCount = 0
while (myCount <= myLimit-1)
      {
      myLoop = true
      while (myLoop == true)
         {
         myRandom = String.random(myLimit)
         if (myNumbers[myRandom] != 'X') myLoop = false
         }
         myMix[myCount] = myNumbers[myRandom]
         myRandomOutput = myRandomOutput + 'Q'+myMix[myCount] + ' '
         myNumbers[myRandom] = 'X'
      
   
      myCount++
         }
}   

_________________
Opus Pro 5.5
Win XP


For this message Volgar has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 10th, 2008, 2:59 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi V!

Looked at this on Friday and couldn't work out what you wanted - it's now Monday and am none the wiser :-)

Can you clarify what you're trying to do?

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: November 10th, 2008, 4:06 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Hi Mack

This script display a list of numbers with random order, for example, from 1 to 5: 2, 1, 5, 3, 4.
Now I need to get on the list was not "3" (or any number set as variable, say $del). The result will be: 2, 4, 5, 1.

I understand that i need to set condition, but how and where - confused:)

_________________
Opus Pro 5.5
Win XP


For this message Volgar has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: November 11th, 2008, 10:49 pm 
Offline

Joined: November 3rd, 2004, 8:12 pm
Posts: 129
Location: New Brunswick, Canada
Opus: 8.6
OS: Win 8 (ASUS) - Win 7: (ASUS)
System: Asus - Windows 7 - 8 - Intel Core 3 - 4RAM - 16RAM
Mack,

Just to let you know I've tried several times to download your sample scripts but each time I'm directed to the DW web site to download the plugin.

I've uninstalled and reinstalled several versions (file sizes) of the plugin dating from 2004, until the present and I'm still directed to the DW download page.

May I also add, that I'm amazed at what you've accomplished using Opus.

All the best.

_________________
Leo Taylor
Win XP Home / Opus Pro 7.01 & 6.4 / P4-2.8 / 1.5 GB RAM / ATI All-in-Wonder 9600 /160GB-HD


For this message Leo Taylor has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 12th, 2008, 12:26 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Leo,

I tried the opus functions example and also got redirected but after it downloaded v5.5 everything was fine.

Have a look in the add/remove and see if the plugin is there and if so remove it and try again.

Am included the source for that publication here for you to play with.

Glad you like the examples. We producing some *interesting* things for our customers but things like geopaper are where the real playtime with Opus scripting takes place.

Mack


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

_________________
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: November 12th, 2008, 1:17 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi V,

That script isn't really designed to do that because it generates the list of numbers first. Basically, you'd want to create the array of numbers without $X in the array and then shuffle. I'd use a different method - something like this:

myArray = new Array(1,2,4,5)

theRandomiser(myArray)

Debug.trace(myArray)


function theRandomiser(a)
{
var l = a.length-1
var rnd
var tmp

for (var c = 0; c <= l; c++)
{
rnd = String.random(l)
tmp = a[rnd]
a[rnd] = a[c]
a[c] = tmp
}


}

This will shuffle any array which means that you can create your own lists, numbers, words, questions, etc and shuffle it. To miss an element SIMPLY don't include it in the array to be shuffled.

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: November 13th, 2008, 5:44 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Thank you, Mack!

_________________
Opus Pro 5.5
Win XP


For this message Volgar has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 63 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