Page 1 of 1

Select a range of e.g. buttons by script

Posted: Thu Oct 27, 2016 12:27 pm
by pderks
Hi,

in card 1 I have a layout of 4 x 25 buttons. In the following cards I need an each different number (1 … 7, 25 … 40, …) of them.

Creating and outfitting buttons on their cards is very time consuming. Is there a scripted option, to select, copy and paste such a range of buttons, fields, … at a single blow ?

Regards and thanks

Peter

Re: Select a range of e.g. buttons by script

Posted: Thu Oct 27, 2016 12:35 pm
by Klaus
Hi Peter,

a clever naming scheme will always help, so you will be able to do something like this:

Code: Select all

...
go cd 1 
# if neccessary
repeat with i = 1 to 7
  set the selected of btn ("button" & i) to TRUE
end repeat
copy
select empty
go cd 2
paste
...
Best

Klaus

Re: Select a range of e.g. buttons by script

Posted: Thu Oct 27, 2016 3:47 pm
by dunbarx
Another way is something like this.

Code: Select all

on mouseUp
   repeat with y = 1 to 3
      copy btn y to card yourDestinationCard
   end repeat
end mouseUp
It is up to you to manage how the buttons are "selected", but the copy command does what you need directly.

Craig Newman

Re: Select a range of e.g. buttons by script

Posted: Thu Oct 27, 2016 4:18 pm
by pderks
@ Klaus
@ Craig

thank you for your really needed (and quick) help.

Peter