SelectCh question

Discuss DMXIS Python macro programming, and post any new macros here!
Post Reply
RyanMcRobb
Posts: 13
Joined: Sat May 30, 2020 2:40 am

SelectCh question

Post by RyanMcRobb » Sun May 31, 2020 12:08 am

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: 1875
Joined: Sat Sep 15, 2012 4:53 pm

Re: SelectCh question

Post by Dave Brown [admin] » Sun May 31, 2020 9:58 am

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 DMXIS | D-Pro | Show Buddy | Show Buddy Active | ArtNetMon

RyanMcRobb
Posts: 13
Joined: Sat May 30, 2020 2:40 am

Re: SelectCh question

Post by RyanMcRobb » Sun Jun 07, 2020 12:30 am

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: 13
Joined: Sat May 30, 2020 2:40 am

Re: SelectCh question

Post by RyanMcRobb » Sun Jun 07, 2020 4:18 am

Capture.PNG
Capture.PNG (9.48 KiB) Viewed 258 times
This is what is says on the Macro Output Console.

RyanMcRobb
Posts: 13
Joined: Sat May 30, 2020 2:40 am

Re: SelectCh question

Post by RyanMcRobb » Sun Jun 07, 2020 11:16 am

i butchered some code from other macros and it worked!

Code: Select all

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

Post Reply