Scripting Checkbox mode

Is there a command that I can use in a script that can set a selection in checkbox mode for a specific file, like selectchchbox "c:\temp.txt"
Thank you

Select "temp.txt" (assuming you are in C:, already in checkbox mode, and want to tick C:\temp.txt)

(Select EXACT PATTERN="temp.txt" does the same but is better when using literal filenames.)

I have tried it but it does not select anything at all. I am in thumbnails mode with checkbox on and I used the EXACT PATTERN="my file path".
Could you try it at your end. I put that code in a button.

Thanks

It works just fine for me in thumbnails mode with checkbox on.

Select EXACT PATTERN="Some.JPG"

Regards, AB

It works if I do it with a button and I don't put the full path in the file name, only the name without the path, it works in the current folder. If I put the full path it does not select. So how can I put that code in a script, because in the script I need to put the full path in the file name.

Thanks

Why do you need the full path just because it's a script?

I have tried the following in a script. What I wanted to do on double click of a certain folder to select it (checkbox) but not to enter it.

Function OnDoubleClick(doubleClickData)

 OnDoubleClick = True

  Dim Execute
  set Execute = DOpus.NewCommand
  set Temp = "myfoldername"
  Execute.RunCommand("Select EXACT PATTERN=""" & Temp & """") 

but instead of selecting the folder it navigate to it. I must have done something wrong in my code, could you please have a look at it.

Thanks

If you create a new Command object, it has no connection to the lister unless you set it using cmd.SetSourceTab and the Tab object that's inside the doubleClickData.

But you should not do that; instead, use the Command object that is provided for you via the doubleClickData. Edit: Ignore that part, I was thinking of OnClick. Double-click isn't provided a Command object.

Also, see if any errors are appearing in the scripting log.

If you're using "option explicit" im the script, you need to "dim temp" before using the temp variable.

Also remember to return "true", to not activate the default behaviour (opening the folder).

Extract from the docs:

[quote]
bool: If you return True, the double-click will be cancelled and the file will not be opened. If you return False the double-click will be allowed to continue (this is the default).[/quote]

Oops, now I see, you already set "true" at the top! So all I can say is, nice idea! o)

I like to confirm that. In previous versions the Select command supported a path including a filename to be selected, now it does not select files anymore if they are "prefixed" with a path.

I'm surprised if Select ever worked with full paths given to it as part of the command line.

You should be able to add the files (with full path) to the scripting command object and then run Select FROMSCRIPT.

FWIW, the SelectEx add-in supports selecting items with full paths (by internally using Select FROMSCRIPT).
Find it here: Command: SelectEx (extended Select command)

Use it like this: SelectEx ITEM="C:\myfolder\myfile.txt"
Adding the "USEPATH" switch only selects "myfile.txt" if the path of the item matches the path of the tab.