I'm thinking of a "script installer", in which newly-acquired scripts are automatically copied to the ..|Runtime|Python|poserScripts|ScriptsMenu folder
This would be of use to the less advanced Poser user, who has acquired a shiny new script. In trepidation they then go hunting through Windows Explorer for ten minutes to locate the right place to paste the script(s), in order to have the scripts show up in the Poser User Interface. Maybe they get it wrong. It would be nice to automate the install.
IN POSER:
The following PoserPython script can be used to detect the install folder of the running Poser, and print the path, and could be developed as a script-installer....
import poser
import os
scriptPath = os.path.split(poser.AppLocation())[0]
scriptPath = os.path.join(scriptPath, "Runtime", "Python", "poserScripts", "ScriptsMenu")
if os.path.exists(scriptPath):
print scriptPath
else:
msg = "The Poser ScriptsMenu folder cannot be found"
dlg = poser.DialogSimple.MessageBox(msg)
.... and this should work regardless of if the user has "Smith Micro|Poser 11| or ..|Poser Software|Poser 11| or has installed Poser to some other curiously named folder on a obscure hard-drive.
OUTSIDE POSER:
However, running the above script requires the user to install the script in Poser first, which rather defeats the object. Since they already know how and where to install a script.
So my mind then turned to the idea of a "script installer" that would not require Poser to be running. A Windows .BAT file might do it. Include the .BAT in the folder with the new scripts, the user clicks on it, and the folder and its .py script(s) are sent to the proper ..|Runtime|Python|poserScripts|ScriptsMenu folder.
The problem is how to have the .BAT detect the correct path for Poser 11, when there could be many Poser.exe files on the system (Poser 2014, 11, 12). And when the target could be installed on C:\ D:\ or Z:\ etc, and under any curious folder name.
Before I look further a Windows-only .BAT files, is there a good cross-platform way to tackle the problem? Or perhaps someone has already solved the "help newbies install a Poser script" problem?
Learn the Secrets of Poser 11 and Line-art Filters.