Jump to content

GetMouse live update while running script

Recommended Posts

Hi All,


In the Vectorscript Function Reference, the example code seems to imply it would allow a live updating message readout of mouse coordinates while the mouse is moved around until a key is pressed, ending the script: http://developer.vectorworks.net/index.php/VS:GetMouse


However, when I try using this code (I tried both the VectorScript and Python version - both with same result) it has no actual message output until I click a key ending the script.


Am I missing something? Eg. is there some flag that is needed for the script to render during a loop instead of only after completion? Or am I misunderstanding the purpose of the example script, and it is supposed to only create the output after the script is done running?




Share this post

Link to post

There is a "bug" in the MESSAGE() procedure (or a bad design choice) that causes the Message to only display at the end of script execution.


Probably not really useful for what it sounds like you are doing, but for debugging purposes, I use AlrtDialog. You have to hit return after each occurrence, but at least with a CONCAT you can display a string for trouble shooting purposes.



Share this post

Link to post

Ah, thanks for this, Pat.


Is there any way to show a live updating piece of info in a script? I'm imagining something like the Tape Measure Tool where it updates in real-time as you move the mouse.



Share this post

Link to post

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...