I am so close to get what I need, one variable away from happiness
Here is a very good example of what I need to do and even with the ideas suggested I still cannot figure out how to achieve what I want.
I launch a file from a CustomScriptButton, at some point I write:
- Code: Select all
DeviceSetParam,1,2,Playback Transport,but16mode
but16mode is a variable that is set by the user using another button, its value is either 192(loop) or 64(play)
In a perfect world I would reference the variable but16mode using the ID of the CustomScriptButton, I came up with the following using what I learned in this thread:
- Code: Select all
VValue,_tmp_pbmode,but
VAdd,_tmp_pbmode,_tmp_pbmode,MyID
VAdd,_tmp_pbmode,_tmp_pbmode,mode
DeviceSetParam,1,2,Playback Transport,_tmp_pbmode
it doesn't work, even though the value of _tmp_pbmode is but16mode the parameter is viewed as a string and not as the value referenced by that string, fair enough. I need to assign the value to another temporary variable which would be int. This is the result (_tmp_pbmode is string, _tmp_butmode is int):
- Code: Select all
VValue,_tmp_pbmode,but
VAdd,_tmp_pbmode,_tmp_pbmode,MyID
VAdd,_tmp_pbmode,_tmp_pbmode,mode
VValue,_tmp_butmode,_tmp_pbmode
DeviceSetParam,1,2,Playback Transport,_tmp_butmode
Still doesn't work.
If you have any idea how to do what I want your help would be greatly appreciated.
Regards