GP SoftwareTwitter
Opus FAQsManualCommandsObjects

@disablenosel directory wildcards


#1

I'm trying to disable a button using @disablenosel in v12.10 unless a single folder is selected where the path meets the following wildcard criteria:

*\homedata\USERS\

I've got the numdirs=1 working but the wildcard on the end isnt working.

As I use dual display I would Ideally like a wildcard that only enables the button if BOTH the left and right folder paths match the above wildcard. This will ensure that the button is only active if a single directory beneath the USERS directory in the left pane is selected, and the same path on a different drive is selected.

For example, this would be a valid directory selection:
Source : C:\homedata\USERS\Steve
Dest : D:\homedata\USERS\

If I can only restrict when the wildcard path of the selected pane matches then that would be a start.


#2

@disablenosel tests the selection. If you want to test the current path, use @disableifpath

(I'm not sure if you can use both at once or not. It might work. If not, a script could have extra logic to prevent the button doing anything in the wrong folders, but not to enable/disable it dynamically.)


#3

Thanks Leo.
Using each on its own works but putting both into the same button gives some very wierd results, for example:

@disablenosel:numdirs=1
@disableifpath:!C:\Windows\System32

  1. go into C:\Windows - disabled
  2. select 1 folder in C:\Windows - disabled
  3. go into C:\Windows\System32 with no directory selected - enabled
  4. select as many folders as you wish - still enabled
  5. arrow up a level to C:\Windows with System32 automatically selected - still enabled
  6. select any other single folder - still enabled
  7. select 2 folders - disabled
  8. go back to selecting 1 folder - disabled

I tested the above sequence using v12.10.2 beta to see if the @disableifpath fixes made any difference.


#4

I see the same thing. It would appear that the two disable tests don't work together properly when combined.

@disablenosel
@disableifpath:!c:\test

Enter c:\test with nothing selected = disabled (correct).
Select something = disabled (incorrect).
Select something else = enabled (correct).
Select something else = disabled (incorrect).

Now...

Enter some other folder with nothing selected = disabled (correct).
Select something = disabled (correct).
Select something else = enabled (incorrect).
Select something else = disabled (correct).


#5

Thanks for the report, this will be fixed in the next update.