Multi-click menus

Post topics about HALion scripting.
Post Reply
User avatar
abject39
Member
Posts: 327
Joined: Sat Jan 17, 2015 8:20 pm
Location: Ventura, Ca
Contact:

Multi-click menus

Post by abject39 »

I've created a macro page with a menu and deactivate "Checkable". According to the developers manual this option can recall a script function repeatedly when it is clicked. I cannot get this to work at all. I want to create a menu with two items. Every time I click the options it does not seem to perform the function a second time. For example if I use a Boolean created parameter I expect it to run the script again getting a new false or new true value but instead it is the same. I tried using a string and I've tried using an array but nothing has prevailed. Has anyone gotten this function to actually work?
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.

AposMus
Member
Posts: 230
Joined: Fri Nov 14, 2014 11:41 am
Contact:

Re: Multi-click menus

Post by AposMus »

You have to define you parameter like this:

Code: Select all

table = {'Item1', 'Item2', 'Item3'}
	
function onMenu()
	print(Menu)
end

defineParameter{
	name = 'Menu',
	onChanged = onMenu,
	writeAlways = true,
	strings = table,
	default = 1,
}
By default a Halion parameter won't trigger the callback if the value doesn't change. Setting writeAlways to true changes that.
You're probably going to have to work in the boolean based on the number value of the string list array.
Cubase Pro 8.5.2
Halion 6
HSO
Padshop Pro
Dark Planet

User avatar
abject39
Member
Posts: 327
Joined: Sat Jan 17, 2015 8:20 pm
Location: Ventura, Ca
Contact:

Re: Multi-click menus

Post by abject39 »

Thanks! I'll try this!
AposMus wrote:
Tue Apr 07, 2020 6:31 pm
You have to define you parameter like this:

Code: Select all

table = {'Item1', 'Item2', 'Item3'}
	
function onMenu()
	print(Menu)
end

defineParameter{
	name = 'Menu',
	onChanged = onMenu,
	writeAlways = true,
	strings = table,
	default = 1,
}
By default a Halion parameter won't trigger the callback if the value doesn't change. Setting writeAlways to true changes that.
You're probably going to have to work in the boolean based on the number value of the string list array.
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.

User avatar
abject39
Member
Posts: 327
Joined: Sat Jan 17, 2015 8:20 pm
Location: Ventura, Ca
Contact:

Re: Multi-click menus

Post by abject39 »

I just tried it. "writealways" was the part I needed to make it work for me. Thank you again!
My vision is uncompromising: to transcend my clients dreams by mesmerizing their audience with the world's finest audio arrangements and products.

Post Reply

Return to “Halion Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest