# Command: SelectEx (extended Select command)

**URL:** <https://resource.dopus.com/t/command-selectex-extended-select-command/20517>\
**Category:** Buttons/Scripts\
**Tags:** script, commands, jscript\
**Created:** [April 21, 2015, 4:32am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517 "2015-04-21T04:32:33Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [May 27, 2015, 12:50am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/21 "2015-05-27T00:50:00Z")

</div>

@kundal  
The filter-idea is tempting and might even boost performance, but I don't see this coming within the next couple of weeks.  
It would "just" allow a different way of getting the same results, so priority is not that high I'd assume?! o)

@sasa  
Would the filter editor be ok? o)

---

<div class="post-metadata">

**Author:** ![kundal](https://resource.dopus.com/user_avatar/resource.dopus.com/kundal/32/24277_2.png) [@kundal](https://resource.dopus.com/u/kundal)\
**Post date:** [May 27, 2015, 7:15am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/22 "2015-05-27T07:15:10Z")

</div>

> [@tbone](#):
>
> so priority is not that high I'd assume?!

There's no rush. For my personal needs everything is fine as it is now.

---

<div class="post-metadata">

**Author:** ![anon94230625](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@anon94230625](https://resource.dopus.com/u/anon94230625)\
**Post date:** [May 27, 2015, 3:56pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/23 "2015-05-27T15:56:30Z")

</div>

Yep, but a mix of radio-buttons and pulldowns would be better 🙂.

Unfortunately I have no time until middle of next week to design a functional layout (and an icon), which I think is necessary before programming a GUI. But if you can wait...

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [May 27, 2015, 4:38pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/24 "2015-05-27T16:38:44Z")

</div>

You sound like I would be eager to do that GUI-thing, I'm actually not! o) Though admittedly, it's interesting as an experiment! o)  
If you could provide some basic \*.html or a \*.xaml representation of a finished layout.. I'd consider putting it into working condition as an HTA (hypertext application) or powershell driven .Net-GUI.

---

<div class="post-metadata">

**Author:** ![bytespiller](https://resource.dopus.com/user_avatar/resource.dopus.com/bytespiller/32/23964_2.png) [@bytespiller](https://resource.dopus.com/u/bytespiller)\
**Post date:** [May 29, 2015, 3:46pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/25 "2015-05-29T15:46:52Z")

</div>

Oh wow that's some serious amount of (quite nice) code (over 1600 lines, 125 KB in current latest version)! 😲  
And a very powerful add-on indeed! 👍

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 5, 2015, 12:09am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/26 "2015-06-05T00:09:54Z")

</div>

Updated to v0.4.3:

- MAKEVISIBLE fixed, threw error in previous upload
- JSBREAK finetuning: return true to stop item picking, false to skip item and null/undefined will select/pick
- JSFILTER performance gain
- Usage of Confighelper v1.2 and XLog 0.3

@jsys -\> Thanks thanks! o)  
Actually it's around 60kb, but it comes in UTF16 because the upload preparation of ScriptWizard requires that.  
Not an issue I guess, but if size matters for anyone, the well known TurboImploder might also work for DO add-ins. o))  
[youtube.com/watch?v=gMZskyQyxzI](https://www.youtube.com/watch?v=gMZskyQyxzI)

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 11, 2015, 5:36pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/27 "2015-06-11T17:36:51Z")

</div>

> [@abr](#):
>
> Yes, that also looks very promising. However, i couldn't get it to work for some reason.  
> i use follwowing syntax: C:\Program Files\VideoLAN\VLC =\> vlc.exe
> 
> SelectEx: Fehler in Zeile 671, Position 3  
> SelectEx: Unerwarteter Quantifizierer (0x800a139a)

I tested your exact config-line and path and it works here, do you use the latest SelectEx version?

> [@abr](#):
>
> By the way, i already played around with your very interesting script, and saved some selections. Is it normal, that it would remember saved selections only for one Opus session, using "save selection toundfrom" a file?

What kind of saved selection are you talking about? Selections stored to memory or to file?  
Actually both of them should survive a DO restart, but maybe you can share some more details and we find what's going on. o)

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 11, 2015, 5:59pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/28 "2015-06-11T17:59:19Z")

</div>

> [@](#):
>
> I tested your exact config-line and path and it works here, do you use the latest SelectEx version?

It's version 0.4.3, which should be the newest one. Maybe i made a mistake, by just appending some lines at the bottom, like here:

```plaintext
;you can use ; or // or # to comment out lines
;syntax is: [REGEX=]<path> => [REGEX=]<item name>

;standard path (select program files)
C:\ => Program Files

;alias for path and regex for item
/home => REGEX=dopus.exe|dopusrt.exe

;env-var in path and regex for item (all log files)
%windir% => REGEX=.+\.log$

;using regex for the path
REGEX=.*\\drivers\\etc => hosts

*\Directory Opus => dopus.exe
*\Outlook => Outlook.pst
C:\Passwords => File4.txt
C:\Program Files\Light Alloy => LA.exe
...

```

So maybe it has to be applied in another way? The red lines represent your example part, the green ones are those i've added.

> [@](#):
>
> What kind of saved selection are you talking about? Selections stored to memory or to file?  
> Actually both of them should survive a DO restart, but maybe you can share some more details and we find what's going on. o)

For example, i select some random files for a test, then choose "save selection to" -\> example.txt, then "load selection from" (the same .txt file), but nothing happens.

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 11, 2015, 6:06pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/29 "2015-06-11T18:06:29Z")

</div>

Ok, i have better results now with the "store to memory" option, which loads the files fine even after a restart. Interesting feature. But the selection will be lost, only if i change the file display once, and change back.

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 11, 2015, 6:10pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/30 "2015-06-11T18:10:10Z")

</div>

Funny, but now it works, after i restarted Opus. And i did not forget to set the "autoselect" option to "true", when i tried first. 😃  
Anyway, i have to play around now a bit with this very useful script tool set.

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 11, 2015, 7:02pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/31 "2015-06-11T19:02:00Z")

</div>

tbone, i'm playing around with both scripts (Leo's and yours), and i have a suggestion for your version of the "autoselect" part. If i use the option "automatically select first file in folder" in my Opus settings, which i do, i will end up having two selected items, if i use the script to point at a certain folder. Therefore i would suggest, that you include some sort of "select none", before your script selects the given item, overriding the "first file" selection.

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 11, 2015, 8:10pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/32 "2015-06-11T20:10:26Z")

</div>

Updated to v0.4.4

- TOFILE/FROMFILE encoding-awareness added (did not always load selection-files correctly)  
SelectEx will detect unsupported encodings now (that is UTF8 and UTF16-BE) and suggest converting the files.
- new script config "AutoSelect.DeselectNoMatch" to deselect automatically selected first file

@abr

1. I was able to reproduce the FROMFILE feature not working in all conditions, maybe you like to try again. Make sure the selection-files you try to load are ANSI or UTF16-LE (UNICODE) encoded if they were not created by SelectEx. You can use notepad.exe to convert files that do not meet this requirement.

2. Suggestion implemented

3. You mean the red lines are those you added, right? o))  
This won't work, as currently there is no support for wildcards: `*\Directory Opus => dopus.exe`  
But you can use regex, which should be more versatile, like this: `REGEX=.*\\Directory Opus => dopus.exe`

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 11, 2015, 8:38pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/33 "2015-06-11T20:38:19Z")

</div>

Updated to v0.4.5:

- the AUTO feature, to trigger auto-selection from commandline (same as AutoSelect when entering a folder), is now independent from the "AutoSelect" script configs (despite the list). That means you can disable AutoSelect and still use it occasionally from a "SelectEx AUTO" button. The script configs "AutoSelect.MakeVisible" and "AutoSelect.DeselectNoMatch" also don't apply anymore if AUTO is invoked from a button or commandline (use the regular MAKEVISIBLE and DESELECTNOMATCH switches if desired).

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 11, 2015, 8:42pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/34 "2015-06-11T20:42:35Z")

</div>

I'm seriously afraid, you can fix bugs faster, than i possibly could find them 😊 . I find all of this a bit ludicrous, yet delighting. Opus is pretty much like the "rome" thing ... there's a thousand ways to it ... 😁

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 11, 2015, 9:15pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/35 "2015-06-11T21:15:29Z")

</div>

Indeed there are! o) If there's still something left I can do, let me know! o)

Btw: The new AutoSelect.DeselectNoMatch feature comes with a condition for you, the next time you encounter problems, please report asap right here - in the interests of all of us - and to raise general satisfaction, deal? o)

---

<div class="post-metadata">

**Author:** ![aussieboykie](https://resource.dopus.com/user_avatar/resource.dopus.com/aussieboykie/32/23729_2.png) [@aussieboykie](https://resource.dopus.com/u/aussieboykie)\
**Post date:** [June 11, 2015, 10:57pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/36 "2015-06-11T22:57:27Z")

</div>

👍 Congratulations @tbone on a fine piece of work.

Regards, AB

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 16, 2015, 11:55pm UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/37 "2015-06-16T23:55:08Z")

</div>

One suggestion for the Autoselect part: Maybe the existing autoselect paths could be backed up in some other place, so if we update script versions, we could retrieve them from there. At the moment, each new version starts empty, having only the default examples.

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 17, 2015, 12:40am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/38 "2015-06-17T00:40:45Z")

</div>

As long as the script's filename is unchanged, any settings should remain.  
Did you rename or alter the script's filename after/before updating?

---

<div class="post-metadata">

**Author:** ![abr](https://resource.dopus.com/user_avatar/resource.dopus.com/abr/32/62448_2.png) [@abr](https://resource.dopus.com/u/abr)\
**Post date:** [June 17, 2015, 12:55am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/39 "2015-06-17T00:55:46Z")

</div>

Hmm, that could be the reason, indeed. I'm not aware, which change i made recently to the older version, but i don't recall having had that replace dialog last time, when i updated. Which indicates, that you must be right. Thanks again!

---

<div class="post-metadata">

**Author:** ![tbone](https://resource.dopus.com/user_avatar/resource.dopus.com/tbone/32/25726_2.png) [@tbone](https://resource.dopus.com/u/tbone)\
**Post date:** [June 18, 2015, 8:33am UTC](https://resource.dopus.com/t/command-selectex-extended-select-command/20517/40 "2015-06-18T08:33:39Z")

</div>

Good! o) Btw, this is why I once suggested that DO should rely on a script-internal identifier, instead of the scripts filename to identify scripts and their settings. I guess many users are not aware, that they screw their (script) configurations and existing column setups if they rename scripts that were already in use. [Regarding v11.5.1](https://resource.dopus.com/t/regarding-v11-5-1/18718/1)

[Previous page](https://resource.dopus.com/t/command-selectex-extended-select-command/20517.md?page=1)

[Next page](https://resource.dopus.com/t/command-selectex-extended-select-command/20517.md?page=3)
