Jump to content
Developer Wiki and Function Reference Links ×

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;

Link to comment

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;

Link to comment

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.

×
×
  • Create New...