Page 1 of 2

Junctions, again...

Posted: 02 Feb 2012 16:03
by Marco
When the proper options are set in Configuration, the info tip obtained by hovering over a junction shows its target. Is there any way I can obtain that info via scripting?
<prop #xxx> doesn't seem to do the trick (I tried every index from 1 to 300), and <get > shouldn't work either (after reading what the help says).
How can I do?

Re: Junctions, again...

Posted: 02 Feb 2012 17:52
by admin
You cannot. Currently.

I would tend to enhance the SC property. Would need some special syntax to add XY-specific fields that have no chance to ever collide with future MS fields (they add them by the hundreds to every new Windows version).

Maybe like this, using an asterisk * as prefix:

Code: Select all

text property("*JunctionTarget", [item=<curitem>]);

Re: Junctions, again...

Posted: 02 Feb 2012 17:57
by Marco
Ok, thanks. I stay tuned :roll:

Re: Junctions, again...

Posted: 02 Feb 2012 18:03
by highend
Doesn't

Code: Select all

  text property("LinkTarget", <curitem>);
deliver the correct information?

Re: Junctions, again...

Posted: 02 Feb 2012 18:04
by admin
Thinking about it it would be cooler to use a new command name, "propertyex" hmm... :? Any ideas?

Re: Junctions, again...

Posted: 02 Feb 2012 18:06
by Marco
highend wrote:Doesn't

Code: Select all

  text property("LinkTarget", <curitem>);
deliver the correct information?
Sadly no. A blank window pops. And nothing more.
admin wrote:Thinking about it it would be cooler to use a new command name, "propertyex" hmm... :? Any ideas?
I wonder how you make XY getting that info. May give some ideas...

Re: Junctions, again...

Posted: 02 Feb 2012 18:09
by admin
Marco wrote:
highend wrote:Doesn't

Code: Select all

  text property("LinkTarget", <curitem>);
deliver the correct information?
Sadly no. A blank window pops. And nothing more.
admin wrote:Thinking about it it would be cooler to use a new command name, "propertyex" hmm... :? Any ideas?
I wonder how you make XY getting that info. May give some ideas...
Works here under XP (for LNKs, not for junctions). Which nicely demonstrates the problem with Windows shell properties.

Re: Junctions, again...

Posted: 02 Feb 2012 18:11
by Marco
admin wrote:Works here under XP. Which nicely demonstrates the problem with Windows shell properties.
How is that possible? I'm under XP too, yet it doesn't work. Selecting a junction in the list, pasting that code in the address bar and then Enter does nothing (useful).
EDIT: ah ok, for links.

Re: Junctions, again...

Posted: 02 Feb 2012 18:12
by admin
Marco wrote:
admin wrote:Works here under XP. Which nicely demonstrates the problem with Windows shell properties.
How is that possible? I'm under XP too, yet it doesn't work. Selecting a junction in the list, pasting that code in the address bar and then Enter does nothing (useful).
Sorry, I was not exact: it works for LNKs, not for junctions.

Re: Junctions, again...

Posted: 02 Feb 2012 18:19
by admin
OK, I quickly added this -- undocumented -- little trick. These 2 things will wokr in the next beta:

Code: Select all

text property("#JunctionTarget");
text property("#LinkTarget");
Syntax just like it has always been with SC property...

Re: Junctions, again...

Posted: 02 Feb 2012 18:24
by Marco
Wow, can't wait to see it!

Meanwhile I was writing :oops:
Well, if prop() can't obtain this info then there are two roads: using get(), adding some other field to it, or creating (as you suggest) a propextd() function.
I wouldn't go for the asterisk thing because would generate confusion: if prop() is born to show only the properties that the OS exposes "naturally"/"natively", then it should remain as it is.

Re: Junctions, again...

Posted: 02 Feb 2012 18:29
by admin
On top you'll get this:

Code: Select all

text property("#label");
text property("#tags");
text property("#comment");
8)

Of course, all with [item=<curitem>] as 2nd argument.

Re: Junctions, again...

Posted: 02 Feb 2012 18:38
by Marco
Thank you :D

Re: Junctions, again...

Posted: 02 Feb 2012 18:54
by admin
Question to heavy scripters: Could it be that up to now there was no way to retrieve label, tags, comment of a given item? Can it be true?

Re: Junctions, again...

Posted: 02 Feb 2012 19:00
by TheQwerty
admin wrote:Question to heavy scripters: Could it be that up to now there was no way to retrieve label, tags, comment of a given item? Can it be true?
Report