Minor scripting related wishes (a generic thread)

Features wanted...
admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

LOL + WOW, quite some effort to get a simple variable. :mrgreen: (sorry, but no time now to think about this... later...)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Minor scripting related wishes (a generic thread)

Post by TheQwerty »

admin wrote:LOL + WOW, quite some effort to get a simple variable. :mrgreen: (sorry, but no time now to think about this... later...)
Well that's quite some effort to eliminate the need for the simple variable. ;)

Alternately an intermediate approach could be:

Code: Select all

Get('MenuCaption', cid);
Returns the menu caption corresponding to the specified command ID.
Or an empty string if the specified ID is not part of the menu.
That would work just as well for eliminating my need to identify and parse the language file.

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

That looks doable. :)

klownboy
Posts: 4147
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

Hi Don,

I wrote a small script the other day which will select or highlight those image files in a folder which are a specific aspect ratio. See this thread http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=9969 In weeding through an issue, it was discovered that we could not use the property name "Orientation" in either the "Property" or "Report" command. I can use "::text property("ImageX");" and "::text property("ImageY");" etc. in the AB but not property("Orientation"). I know we can use the property index for orientation, #245 (i.e., ::text property ("#245"); It works fine for me here in the states, but in Germany, the same property is #254 with a different Windows version.

As you state in the help, if you run "::msg property("#245 n");" in the AB, the resultant message is: "Orientation: Rotate 270 degrees". So, "Orientation" is indeed the name of the property, yet it doesn't appear that we can use that name with property or report. By the way, "Orientation" is displayed in XY's Metadata. Typically, the orientation of an image is "Normal" but it can also be "Rotated 90 degrees" and "Rotated 270 degrees" as well (for portraits).

You state in the help that the indexes and names have changed with nearly every revision of Windows, but as you state, you have "XYplorer-specific properties" like "Orientation". For consistancy in scripts would it be possible for you to have the property name, "Orientation" work in Report and Property commands across these different systems and languages since we know the property index value is different?

Thanks,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

I understand but AFAIK it's not possible. This is one of the dark areas of Windows.

klownboy
Posts: 4147
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

Hi Don, sorry for being a pain and this is certainly not a big deal, but I'm not sure I understand the logic. The property name "Orientation" is presently already provided in XY's Metadata when you read meta on a JPG. So somehow you must be retrieving property Index value, in my case #245, to get the resultant "Orientation" property listed in Metadata (#245 as listed in File Info Tips). You must have the Windows index value of #245, or whatever the number is for the system, cross-referenced or tied in someway to "Orientation" in Metadata already. So I guess I'm not sure why "orientation" couldn't be used with property or report. Is it a matter of consistency across systems...isn't the generic property name "Orientation" listed for a JPG image in Metadata on everyone's system?
Thanks again,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

It's not on my system. No "Orientation" anywhere nor is "Orientation" supported by XY.

klownboy
Posts: 4147
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

OK, now I'm confused as well as old. "Orientation is not supported by XY" so why do I get these...the 1st clip is from XY's Configuration-File info Tips, the 2nd from XY's Metadata. :eh:
orientation _01.JPG
orientation _01.JPG (41.49 KiB) Viewed 2154 times
orientation _02.JPG
orientation _02.JPG (54.97 KiB) Viewed 2154 times
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

This is your english windows. I don#t even know what#s it called in german.

klownboy
Posts: 4147
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

Hey again Don, for your info only, this is what highend found out "Orientation" was on his German system.
Metadata:
Ausrichtung: Normal
Ausrichtung: Um 90° drehen
Ausrichtung: Um 270° drehen

#254 is the correct id.

Windows Server 2012 Datacenter German
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

OK, I have "Ausrichtung" as #244 in my Win7. But this does not help, does it?

klownboy
Posts: 4147
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

I see what you're saying in that there is no consistency. On highend's system "Orientation" or I should say "Ausrichtung" is #254, your system #244, my Win7 #245 and I just checked my Windows 8 system and it's #254. But, to display the correct information in Metadata (e.g., "Orientation: Normal" or "Ausrichtung: Um 90° drehen"), didn't you somehow have to tie the property name whether it's called "Orientation or "Ausrichtung" to the correct index value across various systems (and we know it's different)?
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

These are just locale specific column headers for the extended details view. They won't work as literal property identifiers. Really, believe me, there is no hope.

klownboy
Posts: 4147
Joined: 28 Feb 2012 19:27

Re: Minor scripting related wishes (a generic thread)

Post by klownboy »

No problem at all Don. I just wanted to understand and it's always nice to have scripts working across different operating systems if at all possible. For this last small script, I'll just have to tweak the "Orientation" index from #245 to #254 on the Windows 8 machine. So I learned something...I didn't realize that until we started this conversation.
Thanks again,
Ken
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60635
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Minor scripting related wishes (a generic thread)

Post by admin »

You know, I'm not the average Windows-basher, but in this case it really makes me angry that they a) made such a mess, and b) did not even document it.

OK, I could add a little function get("propertyindex", columnheader) where you would input "Ausrichtung" as columnheader and it would return e.g. 244, if you are lucky and hit a german Windows. But this is all so stupid... working around/against Windows... argh.

Post Reply