FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Modularization

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
ganwell
Newbie


Joined: 16 May 2007
Posts: 1

PostPosted: Wed May 16, 2007 2:07 pm    Post subject: Modularization Reply with quote

Hello

I have 10 copies of following script:

http://fangorn.ch/n/blog/permanent-code/salling-midi-control/

The only difference between the scripts is the property controloffset. Is there a way to define the 10 scripts as instances of a base script?

I like to have 10 scripts, because it simplifies storage of slider and button states. I don't want to have a array of controloffsets containing records for siders and buttons.

I'm looking for something like:

[code:1]
property controloffset : 0
property buttons : {"-", "-", "-", "-", "-", "-"}
property sliders : {0, 0, 0, 0, 0, 0}
property slider : 1
property default_inc : 5
property current_inc : default_inc
property pressed : true

include "ControlBase.scpt"
[/code:1]

I appreciate any ideas and tips.

Best,
Ganwell
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Wed May 16, 2007 4:35 pm    Post subject: Reply with quote

Hi,

This is currently not possible. But it sounds like it'd be feasible to modify the script you linked to; parametrize it; and you'd get the exact behavior you want.

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group