Page 1 of 1

Highlight Same Words on Double Click

Posted: Mon Mar 28, 2016 12:25 am
by jussij
By default when you double click on a word in Zeus all it does is mark that word.

But it is possible to highlight other instances of the current word using the Edit, Highlight Current Word menu and naturally it is very easy to bind that menu action to any keyboard key combination.

But how can those two actions be tied together :?:

Fortunately it is very easy to tie that menu action to the mouse double click action and all that is needed is a simple macro script and a minimal configuration change.

This is what needs to be done:

1. Use the Options, Document Types menu and pick a document type to be edited.

2. Lets assume the C/C++ Document Type was selected and the Edit button used to edit that document type.

3. In the Triggers panel add the text below to the Mouse Double Click section:

Code: Select all

$zud\zScript\event_double_click_highlight.lua
Now if you open up any C/C++ document the mouse double click action will highlight all instances of the word selected by the double click.

To make this behavior standard for all document types, make the changes described above, but instead of selecting the C/C++ Document Type, make the changes to the Default Document Type.

Cheers Jussi

Highlight Same Words on Double Click

Posted: Sun Sep 24, 2017 8:25 am
by kurasov1965K
There was thread in a forum: "right click menu".
I wonder if it possible to create a right click menu for selected object.
I would be grateful for a script.
Iklip. Just beginner.

Re: Highlight Same Words on Double Click

Posted: Sun Sep 24, 2017 1:34 pm
by jussij
The right click popup menu does have a 'Macros' section and you can add a macro script to this menu using the following steps:

1. Make sure the macro you want to add is saved to this folder location:

Code: Select all

$zudzScript
You can find that folder by using the Tools, Dos Command Line menu and running this command:

Code: Select all

dir "$zudzScript"
2. Use the Options, Document Types menu to edit the document type you want the macro to appear on.

If you want the macro to appear for all documents then edit the Default Document Type.

3. Select the Macros panel.

4. Add the macro to the list making sure the Add to popup menu option is selected.

Now the macro will appear on the right click popup menu.

Cheers Jussi