SelectCh question

Discuss macro programming, and post any new macros here!
RyanMcRobb
Posts: 36
Joined: Sat May 30, 2020 2:40 am
Has thanked: 3 times

SelectCh question

Post by RyanMcRobb »

I want to write a macro that selects the same channels each time. When I write:

Code: Select all

SelectCh(17-21 ch, 1 sel)
Nothing happens.

Any tips?
Dave Brown [admin]
Posts: 2123
Joined: Sat Sep 15, 2012 4:53 pm
Has thanked: 5 times
Been thanked: 17 times

Re: SelectCh question

Post by Dave Brown [admin] »

You need to write a little Python code as follows:

Code: Select all

startCh = 17
endCh = 21
for ch in range(startCh, endCh)
   SelectCh(ch, 1)
Dave Brown - db audioware
Author of Show Buddy Setlist | Show Buddy Active | ArtNetMon
RyanMcRobb
Posts: 36
Joined: Sat May 30, 2020 2:40 am
Has thanked: 3 times

Re: SelectCh question

Post by RyanMcRobb »

Hi Dave,

thanks a bunch for the reply.

I pasted your code directly and nothing happened. Is there any other code I need to add to make it work?
RyanMcRobb
Posts: 36
Joined: Sat May 30, 2020 2:40 am
Has thanked: 3 times

Re: SelectCh question

Post by RyanMcRobb »

Capture.PNG
Capture.PNG (9.48 KiB) Viewed 4786 times
This is what is says on the Macro Output Console.
RyanMcRobb
Posts: 36
Joined: Sat May 30, 2020 2:40 am
Has thanked: 3 times

Re: SelectCh question

Post by RyanMcRobb »

i butchered some code from other macros and it worked!

Code: Select all

for ch in range(86,90):
   SelectCh(ch, 1)
   
Post Reply