Wed, Apr 24, 6:36 PM CDT

Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Mar 19 1:03 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: assign a keyboard shortcut to a script


sergio777 ( ) posted Mon, 12 April 2021 at 11:53 AM · edited Sun, 31 March 2024 at 9:11 AM

Hi folks, is there any way to assign a keyboard shortcut to a specific script? Thanks in advance.


HartyBart ( ) posted Wed, 14 April 2021 at 6:22 AM · edited Wed, 14 April 2021 at 6:23 AM

In terms of having something in Poser allow the call of a script by a key-press, so far as I know.... that's not possible.

But one option would be to do it with a general Windows macro recorder/player such as the $40 JitBit. Record the launch of the script to a macro, set a keyboard hotkey for it to playback.

You can also have a script be a persistent one-click icon on a floating panel, which may be sufficient for you. The $10 XA Toolbar + AVFix is what you want there. They can both be configured to launch along with Poser 11. I've no idea if it XA Toolbar works yet on Poser 12, though. You can't assign hotkeys via XA Toolbar, at least so far as I know.



Learn the Secrets of Poser 11 and Line-art Filters.


adp001 ( ) posted Fri, 23 April 2021 at 8:48 AM

I'm a bit late with this, but maybe someone wants to play with it:

def my_script():
    print("My script started because F1 was pressed.")


def new_handler(event):
    keycode = event.GetKeyCode()
    if keycode == wx.WXK_F1:
        my_script()
    event.Skip()


root = poser.WxApp()
root.Bind(wx.EVT_KEY_DOWN, new_handler)

Run the script and press "F1".

Note: You have to unbind the function before you activate it a second time! If you do not, the first installed eventhandler stays active until you close Poser.




adp001 ( ) posted Fri, 23 April 2021 at 9:12 AM · edited Fri, 23 April 2021 at 9:14 AM

By the way: The script shown above is a good example of why you should not enter passwords in Poser. E.g. for downloads by Bondware/Renderosity. Every Python script is able to read what a user is typing. Especially dangerous with "compiled" scripts.




Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.