Dear all
I am trying to recover programatically the name of the patch file I’m in. The new amazing [pdcontrol] object gives me its path, but I cannot seem to find a way to get the file name, which I can then use programatically… for instance in many help files to call a given html document called the same name in another folder.
Does it make sense? Vanilla options only please!
p
Hello
I repost this because I could not understand my own title ;-)
I still try to recover programmatically the name of the file (and of the path) of a patcher. Any pointer welcome
Pa
On 29 Sep 2019, at 11:25, Pierre Alexandre Tremblay tremblap@gmail.com wrote:
Dear all
I am trying to recover programatically the name of the patch file I’m in. The new amazing [pdcontrol] object gives me its path, but I cannot seem to find a way to get the file name, which I can then use programatically… for instance in many help files to call a given html document called the same name in another folder.
Does it make sense? Vanilla options only please!
p
Pierre Alexandre Tremblay wrote:
Hello
I repost this because I could not understand my own title ;-)
I still try to recover programmatically the name of the file (and of the path) of a patcher. Any pointer welcome
hi, pierre !
just out of curiosity: why do you need to get the name of a patch ? if you are editing your patch, you should also know its name and could append it easily to [pdcontrol]'s output.
apart from that: i don't think there's a vanilla way to do what you want, somebody may correct me here.
the only method i know needs IEMGUTS' [canvasname] (get it from deken) and an example patch is attached (i also added TOF's [path] for completeness).
=======================================================================
which brings me to another small issue with PD 0.50 on windows:
when i double click this very patch (pathname has a space) and PD starts up and loads this patch i get an abbreviated name like this:
NAMETE~1.PD
if i first start PD, and THEN load this patch from the menu, the name appears correct. this only happens with names that have spaces. i also attached the same patch with an underscore that gets a normal filename when doubleclicked.
=======================================================================
on a sidenote:
i think that [pdcontrol] has great potential but is still limited at the moment. something like a "name" or "patch" message to do what pierre is looking for should be no problem. but i also would highly appreciate other querying/setting options in vanilla with this opject, like GOP status, boundaries, margins (to this day there's no way to get a GOP's margins !)
miller, what about it ? ;-)
best
oliver
Hello!
Thanks for the reply!
just out of curiosity: why do you need to get the name of a patch ?
I have 20+ objects about to be released (flucoma.org http://flucoma.org/) and each is so complex it needs a further explanation beyond the help file, which is a .html file named the same way as the object. I was trying to script an abstraction that would take the file name and look for the same but .html - and therefore not have to add 20 small bit of codes that are exactly similar apart from the potential typo I would make ;)
If that is not possible in vanilla, then I’ll do it manually, as I do not want to impose any dependencies to our users.
i think that [pdcontrol] has great potential but is still limited at the moment. something like a "name" or "patch" message to do what pierre is looking for should be no problem.
I agree, but I’m so grateful of having it anyway, and able to open html, that I won’t complain ;-)
p