By “current”, I mean when you double-click on a bin and you are inside it.
I need a script that imports a file in another specified bin, while respecting the current active bin as its parent bin.
While inside a bin (i.e., double-clicking a bin brings you inside it), simply using app.project.importFiles() would respect the current active bin. So far so good.
However, if I need to create a new bin and import the file inside it, then I have to create the new bin first inside the current bin so I can pass that ProjectItem to importFiles().
The problem is that I can’t find a way to get the ProjectItem of the currently opened bin.
What is a good way to achieve this?