Page 1 of 1

Scripting - cursorPosition

Posted: Thu Mar 26, 2020 1:55 am
by lavaita
I've been trying to write a bit of script, and whilst troubleshooting it I've written another (much simpler) piece of script to just display the current numbers for various variables.

Everything about this works, except the part where it's supposed to report the cursor position

Code: Select all

logWindow.printInfo("This wave file has " + activeWave.size() + " samples");
logWindow.printInfo("Its sample rate is " + activeWave.sampleRate());
logWindow.printInfo("It has " + activeWave.numChannels() + " channels");
logWindow.printInfo("The cursor is at " + cursorPosition() + " samples");
The error I'm getting is "Can't find variable: cursorPosition"
Can anyone see what I'm doing wrongly?

Re: Scripting - cursorPosition

Posted: Thu Mar 26, 2020 11:54 am
by PG
You must write:

Code: Select all

activeWave.cursorPosition()
and not only

Code: Select all

cursorPosition()

Re: Scripting - cursorPosition

Posted: Fri Mar 27, 2020 5:09 pm
by lavaita
Thank you!