Home Technical Talk

Maxscript: Key Up (Release) Event

interpolator
Offline / Send Message
SimonT interpolator
Hi Friends,

i would like to create a hotbar like in Maya: If you hold Space pressed it appears and disappears immediately if you release the key. To start the script by pressing a key is easy: just assign a hotkey to it.

BUT how i can check during the script is running, about the state of a key? I need an event handler like "on key up ...".

thanks!

Replies

  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    somewhat related
    http://www.scriptspot.com/3ds-max/scripts/activetype-0-29
    he used a textfield to retrieve the events needed for something like that. I imagine he created some dialog instead of a rollout floater so that he could abandon close and surrounding GUI elements and with that only the input textbox is visible.
    http://www.scriptspot.com/3ds-max/scripts/activetype-0-29

    I think it shouldn't be to hard writing a macroscript set that creates and destroys a dialog with a custom set of buttons. Right now I can only spot the on release event for events and just like you stated you would need another event to catch the onPress and then the on Release. I've read somewhere that you can steal the focus with a dotNet control.

    And so for example if you could create some kind of control (text input or something) and manage to set the focus within that element - as soon as you would release any button you might be able to detect that with a event of that dotNet control.
    But it is surely possible as I have seen some games before using more complex game input controls all written in maxscript.

    he he by googling I found this, seems to be from you
    http://www.scriptspot.com/forums/3ds-max/general-scripting/key-up-event

    I thought this whole quick menu thing was already done in max, though I can't find it anymore, maybe I can find a link later
  • SimonT
    Options
    Offline / Send Message
    SimonT interpolator
    Thanks man! Arrr, i hate to find my own question via google! First you think "Wow great another person had my problem...!" and then you see that you find your own post (with zero answers) :,( I will think about this textfield stuff..
Sign In or Register to comment.