If you want to run a Python script each time when Poser starts, you can do so by editing Poser’s poserStartup.py file.
1) First locate your poserStartup.py file, which is what loads your chosen Python scripts whenever Poser starts. For me, in Poser 11.2, this startup file is located in…
C:\Program Files\Smith Micro\Poser 11\Runtime\Python\poserScripts
The location may be different for some, but poserStartup.py is very likely to be in Program Files folder. As such it may be protected by Windows. If so then you you need to copy it out in order to edit it.
2) Make a safe backup of the poserStartup.py file. Then copy it out to somewhere on your PC that allows file editing (e.g. the Windows Desktop), and open this copy with the free Notepad++. A .PY script file just a text file.
As shown below, as an example, we then add lines that start SnarlyGribbly’s AVfix script, and with this fix loaded we can then run the very useful XA – Toolbar plugin in Poser 11.2…
poser.ExecFile(“C:\\Program Files\\Smith Micro\\Poser 11\\Runtime\\Python\\poserScripts\\ScriptsMenu\\Snarlygribbly – fix Poser 112 errors\\avfix.pyc”)
poser.ExecFile(“C:\\Program Files\\Smith Micro\\Poser 11\\Runtime\\Python\\poserScripts\\ScriptsMenu\\FavoriteScripts\\XS – Toolbar and macros\\XA.pyc”)
It looks complicated, but it’s just a poser.ExecFile instruction followed by the path to the script we want to automatically start. Don’t forget to manually add all the double \\’s! PoserPython needs them on the file-path. Also, note that if you’re copy-pasting my example, PoserPython might not like WordPress’s fancy curly ” marks, and these may need to be re-typed as plain ordinary ” marks.
The above instruction lines are added one on each new line, and placed at the foot of the poserStartup.py file.
This also works for SnarlyGribbly’s poserStartup.py that is meant for Reality. Although that is meant to start AVfix on its own, both of the above lines still need to be added to the end of his poserStartup.py. This seems counterintuitive, after all: “if AVfix is started by SnarlyGribbly’s special poserStartup.py then why call it again?” Because that’s how Poser 11 likes it, and it won’t start XA.pyc without first seeing an explicit full-path call to avfix.pyc.
3) The file is then saved. You then copy the fixed poserStartup.py and over-write the original in C:\Program Files\..
4) Start Poser, and your chosen scripts should now start up automatically. In this example, Dimension3D’s XA – Toolbar starts automatically. This useful toolbar can be configured to do all sorts of things with a single click. For instance, you can drag-and-drop the new free Sketch Presets Manager for Poser script on it, and it automatically makes a button that starts this script with one click. More automation, less clicks!
If you get a “non ascii” error message, it is likely you copied the script path from a blog like this rather than from the Windows Explorer path. e.g ..\\ScriptsMenu\\FavoriteScripts\\XS – Toolbar and macros\\ is not the same on the this blog as \\ScriptsMenu\\FavoriteScripts\\XS – Toolbar and macros\\ copied from Windows Explorer and the extra \’s added. This is because the – bit of the path is encoded as non-ascii by the blog, and PoserPython can’t handle that.
Pingback: PzDB no longer sold – MyClone Poser and Daz Studio blog