Jump to content

Parameter button script


Magnus Pettersson

Recommended Posts

Hello!

I want to use buttons in my HDA to do some tasks but im pretty lost in hscript and python world yet. What i want is to get, and set channel values when i press a button.

I have used "opparm . fluidboxSize[0] ( $sizeX )" to set a parameter to some random value when pressing the button, but i have trouble getting a value from another channel somewhere else to put in the $sizeX variable. i tried doing

set sizeX = `run("opparm -d . testchannelx")`

but that returns:

opparm /obj/testpath testchannelx ( 10 )

how do i only get the value from a channel? i tried opdigits expression but that doesn't work if its float then it only returns the decimals.

if you know how to do this in python too would be cool to know :)

Cheers

/Magnus

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...