Search found 484 matches

by Julianon
27 Jan 2017, 16:45
Forum: Script & Plugin Development
Topic: Defid doesn't allow keyboard access to checkboxes
Replies: 0
Views: 190

Defid doesn't allow keyboard access to checkboxes

In the interests of DOpus perfection: I have a var oDlg = DOpus.dlg dialogue with four checkboxes and a few buttons. A . When there is no defid line such as oDlg.defid=2 : — Pressing DownArrow puts the focus amongst the checkboxes, allowing them to be ticked or unticked with the spacebar. — Pressing...
by Julianon
13 Jan 2017, 03:21
Forum: Script & Plugin Development
Topic: How to test of a variable is a vector?
Replies: 6
Views: 471

Re: How to test if a variable is a vector?

A nice addition in V12.3.3 — thanks very much. With some quick experimentation, I notice that it works with all the DOpus.Create objects, such as vectors, a path created by scriptCommandData , a Date created by DOpus.Create.Date () but not by new Date () , a Vars object, a Command object, but not an...
by Julianon
10 Jan 2017, 15:59
Forum: Script Buttons & Add-Ins
Topic: A script to sort on substrings of the filestem
Replies: 0
Views: 228

A script to sort on substrings of the filestem

This simple script allows sorting on substrings of the filestem. For example: 1. In a directory where many filestems have an eight-digit date at the end, one may want to sort on these last eight characters, and then on the rest of the filestem. 2. In a directory where filestems begin with a three-di...
by Julianon
08 Jan 2017, 03:53
Forum: Script & Plugin Development
Topic: How to test of a variable is a vector?
Replies: 6
Views: 471

Re: How to test of a variable is a vector?

The question arose from a bug in a half-written script. I created a vector, then created a vector as one of its entries. But because of my mistake, the entry was an empty string instead of a vector. Then I saved the whole vector as a persistent variable, then retrieved it when I ran the script again...
by Julianon
07 Jan 2017, 21:13
Forum: Script & Plugin Development
Topic: How to test of a variable is a vector?
Replies: 6
Views: 471

How to test of a variable is a vector?

How do I test if a variable is a vector? Using typeof only tells me if it is an object.
by Julianon
05 Jan 2017, 19:25
Forum: Script & Plugin Development
Topic: Can one add a sortkey to an existing column?
Replies: 5
Views: 383

Re: Can one add a sortkey to an existing column?

Thanks, leo. That confirms what I had expected. Your suggestion is better than my workaround. I will leave the Name column alone, and because I use keystrokes to sort, the new column can be 1 pixel wide. Then the sort string can go into the display scriptColData.value in case one ever needs to widen...
by Julianon
05 Jan 2017, 17:21
Forum: Script & Plugin Development
Topic: Can one add a sortkey to an existing column?
Replies: 5
Views: 383

Can one add a sortkey to an existing column?

Can one add a sortkey to an existing column? I only know how to specify scriptColData.sort for a new column. Reason : I want to be able to sort by any chosen substring of the filestem, possibly reversed. This substring could be the 8-digit datestring at the end of many items, or the text following s...
by Julianon
02 Jan 2017, 21:05
Forum: Script Buttons & Add-Ins
Topic: Command: Go-Relative (go to next/prev sibling folder)
Replies: 14
Views: 4443

Re: Command: Go-Relative (go to next/prev sibling folder)

I've taken the dangerous liberty of adding some bells and whistles to leo's script. Apologies, leo, in advance for my inevitable mistakes and misunderstandings. In particular, I'm not confident that I've understood the significance of all the checks in the code. 1. I rewrote it in JScript because I ...
by Julianon
24 Dec 2016, 15:02
Forum: Script & Plugin Development
Topic: Using the Parent method
Replies: 5
Views: 702

Re: Using the Parent method

Thanks for all that, tbone, it makes the situation very clear. I'm used to passing-by-reference from TeX, where most things are passed by reference unless you do something. The method you give of passing numbers, strings and Booleans by reference is interesting and worth knowing. And thank you, leo,...
by Julianon
23 Dec 2016, 21:47
Forum: Script & Plugin Development
Topic: Using the Parent method
Replies: 5
Views: 702

Re: Using the Parent method

Thanks very much, aussieboykie, for confirming the behaviour. I had no idea until this morning that anything like this was happening — at least I was able to identify it. It's the abiding pass-by-reference and pass-by-value question. I wonder if you, or anyone else, happens to have a URL for a good ...
by Julianon
23 Dec 2016, 17:45
Forum: Script & Plugin Development
Topic: Using the Parent method
Replies: 5
Views: 702

Using the Parent method

I'm misunderstanding something badly here. The following code sets a variable pChild to be the current source path, then clones it to pHead, after which the parent directory of pHead is obtained: var pChild = DOpus.FSUtil.Resolve (scriptCommandData.Func.sourcetab.path) var pHead = pChild // var pHea...
by Julianon
10 Nov 2016, 21:40
Forum: Script & Plugin Development
Topic: Rules for the date string used by DOpus.Create.Date
Replies: 4
Views: 524

Re: Rules for the date string used by DOpus.Create.Date

Thanks Jon. I had a look at CDate, but it also uses the locale. Instead, an easy workaround is: * Build up any two-digit year to a four-digit year that differs from the current year by at most 50 years. * Arrange the date string sDate into the bigendian form yyyy-month-day. * DOpus.Create.Date (sDat...
by Julianon
08 Nov 2016, 16:17
Forum: Script & Plugin Development
Topic: Rules for the date string used by DOpus.Create.Date
Replies: 4
Views: 524

Re: Rules for the date string used by DOpus.Create.Date

Thanks, aussieboykie. I know that I can do that, but it throws errors when the data is faulty. In particular, it does not interpret a two-digit year. For example: * d.year = 2007 does indeed make the year 2007. * d.year = 07 throws an error rather than interpreting the date using the locale. This pr...
by Julianon
08 Nov 2016, 15:04
Forum: Script & Plugin Development
Topic: Rules for the date string used by DOpus.Create.Date
Replies: 4
Views: 524

Rules for the date string used by DOpus.Create.Date

What are the rules for the date string sDate used in DOpus.Create.Date (sDate) ? * sDate = "2007/08/09" and "2007-08-09" and "2007 08 09" and "2007 Aug 9" all yield 9th August 2007. * sDate = "07/08/09" and "07-08-09" and "07 08 09&quo...
by Julianon
30 Sep 2016, 20:43
Forum: Help & Support
Topic: @Toggle and Set UTILITY=Toggle problems in v12.2.1
Replies: 2
Views: 345

Re: @Toggle and Set UTILITY=Toggle problems in v12.2.1

Thanks, jon. I've installed V12.2.2, restarted, and cold rebooted a bit later. Now @Toggle:If is working OK again, I can't make DOpus crash anymore, and there is no problem with the sound. So it's all good. (And thanks for fixing up my butterfingers with the mistaken repeat posting.)
by Julianon
30 Sep 2016, 18:18
Forum: Script & Plugin Development
Topic: How to access a button variable from a script
Replies: 10
Views: 857

Re: How to access a button variable from a script

No worries any more — everything is working now exactly as I want, deleting variables within the script as they are read. I wanted to avoid arguments for two reasons. First, some of the arguments that I want to use are DOpus commands with spaces and quotation marks around paths, and I just couldn't ...
by Julianon
30 Sep 2016, 16:33
Forum: Script & Plugin Development
Topic: How to access a button variable from a script
Replies: 10
Views: 857

Re: How to access a button variable from a script

Thanks, leo. That clears everything up. I don't want the variables hanging around afterwards, so I will use Src:MyVar and turn each variable off again within the script.
by Julianon
30 Sep 2016, 00:53
Forum: Script & Plugin Development
Topic: How to access a button variable from a script
Replies: 10
Views: 857

Re: How to access a button variable from a script

Success! You've cracked it, tbone. Thanks very much. For the record, I changed the 'Standard Function' DOpus button to: @Set Glob:MyGlobalVar=Wallaby @Set Lst:MyListerVar=Kangaroo @Set Src:MyTabVar=Dingo TestSnippetA that is, I inserted the scope Src: into the third line. The output is now what I wa...
by Julianon
29 Sep 2016, 23:02
Forum: Script & Plugin Development
Topic: How to access a button variable from a script
Replies: 10
Views: 857

Re: How to access a button variable from a script

Thanks leo, tbone and aussieboykie. I should have added that I know that I can do it by parameters, but that I want to do it using variables set by @Set in an ordinary DOpus button because of the mess that you get into with multiple parameters when the value of some variables contains spaces. To be ...

Go to advanced search