FMA Posted March 16 Share Posted March 16 I have a code that looks something like this: Get Keyboard input -> get mouse coordinates at click -> place object at position of mouse click and with scale of keyboard input So for example: press 7, click 0,0 --> get object at 0,0 with scale 7. My problem is that tool commands can only really be activated when you click with your mouse. Since the keyboard input happens before the click there would have to be an additional click before the keyboard input which is not optimal because I want the whole thing as efficient as possible. I can of course get the mouse/position input first and the keyboard/scale input second but this would also necessitate an extra step to signify when the keyboard input is complete (which would normally happen through the mouse click). It also wouldn't allow me to run a temptool that shows the appearance/scale of the object before you past it/click. Then there is the option to run all of this in a loop, something like: REPEAT Get Keyboard input get mouse coordinates at click place object UNTIL But this has the problem that, while I am in a loop I can't really use the other functions of the program like zooming in or shifting the screen which makes the whole thing a bit uncomfortable to use. This might be a little bit complicated to get around. Is there any way to activate a tool with a key stroke, or to get access to the normal program functions during a loop? Would be great if anybody knows if that is possible. I can share the whole code if needed. Quote Link to comment
Pat Stanford Posted March 16 Share Posted March 16 If you need to get keyboard input, make it a menu command instead of a tool. 1 Quote Link to comment
JBenghiat Posted March 17 Share Posted March 17 22 hours ago, FMA said: This might be a little bit complicated to get around. Is there any way to activate a tool with a key stroke, or to get access to the normal program functions during a loop? Would be great if anybody knows if that is possible. I can share the whole code if needed. No, not in Vectorscript 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.