I have a tool using autostart.Autostart works every time you start Renoise. For example, different cases to boot Renoise:
Case 1) Invoke renoise.exe,logical
Case 2) Invoke any related (and linked) file with Renoise, a skin (xrnc), a song (xrns)… etc.
My question is:Is there any way to avoid running a function if Renoise is in Case 2), specifically when initiating an xrns (with renoise closed previously)?
I mean, something like that (the idea):
The song: song.xrns
The function: function xxx() end
if not load a song xrns then
xxx()
end
That is, I do not want to load a function if I am in case 2.Is this possible in some way? A condition of this style. This function xxx() is run with autostart.
Well thought, only I want it to run xxx() when running renoise.exe directly.
Not a built-in feature, no. But you could use therenoise.tool().app_release_document_observable to detect that a new song is about to be loaded.
So, attach a notifier and then raise some flag that indicates “document has been released” and use that to suppress the auto-launch.
Thanks! I’ll look, see if I can build some trick with this.Autostart will still work, but not a specific function that runs with autostart.It’s a strange case, I know…
Finally, I have chosen to give the user control before closing the tool for Renoise’s next start. This prevents all possible Renoise execution data from different compatible file formats.