Jump to content
Pat Stanford

Optional Dialog for Menu Item?

Recommended Posts

I am working on a script for a menu item. 

 

I would like to be able to open a dialog box to change a parameter if I am holding down a key (preferably OPTION) when selecting the menu item. I can't get this to work reliably.

 

Occasionally it will work and when it works it will normally keep working on repeated runs. But then sometimes it won't work and it won't work repeatedly. I can't figure out the pattern of when it works and when it doesn't.

 

Any ideas? Any better solutions than what I have below?

 

At the top of my script I currently have:

 

    If OPTION then 
        Begin
            N3:=IntDialog('Enter Number of Groups (Max. 10)',Num2Str(0,NumGroups));
            NumGroups:=Min(N3,10);
        End;

Share this post


Link to post

Still hoping for a better solution, but for now the following seems to work:  Option by itself does not seem to trigger properly, but combined with AUTOKEY it does.

 

  If NOT AUTOKEY(L1) AND OPTION then 
        Begin
            N3:=IntDialog('Enter Number of Groups (Max. 10)',Num2Str(0,NumGroups));
            NumGroups:=Min(N3,10);
        End;

Share this post


Link to post

I have never been able to get things like OPTION, COMMAND, etc to work, however I recall using AUTOKEY in some scripts successfully. It would be good to have reliable modifier key support.

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.

Guest
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...