Jump to content
Developer Wiki and Function Reference Links Read more... ×
Arshan

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?

 

Thanks,

-Arshan

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.

 

-Arshan

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×