Finder listview (arrange by: Kind & sort by: Name) MacOS Catalina

Got it.
I booted my iMac in Deutsch and saw that the strings which I defined by myself are wrong.

When running in Deutsch the Log History states:
set radioDescriptions to description of radio buttons
→ {“small icon size”, “large icon size”}

but my strings were : “Small Size Icons” and “Large Size Icons”.

I edited message #16 to repair that.

If it’s really that, the script was supposed to do the job when running Deutsch but supposed to fail when running English.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 30 décembre 2019 18:23:51

Don’t worry. I’m a retired potter and playing with AppleScript is my brain jogging.

It would be useful to be more precise.
When you write " it doesn’t work on my MacBook Pro", must I understand that the entire script fail or just that the Large icons aren’t selected ?

Here is a script in which I disabled many instructions keeping quite only what is related to the radio buttons supposed to rule the size of the icons.

The fact that seemingly the odd behavior strikes when the system is used in German let me think that the resources which I use to grab the localized strings aren’t the good ones.
I ran this attached script after setting my system to German.
I see no oddity.

use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use script "FileManagerLib" version "2.3.3"

script o
	-- property showViewOptions_loc : ""
	property kind_loc : "" --> "Type"
	property name_loc : "" --> "Nom"
	property sortBy_loc : "" --> "Trier par :"
	property iCloudStatus_loc : "" --> "Statut iCloud"
	property dateModified_loc : "" --> "Date de modification"
	property dateCreated_loc : "" --> "Date de création"
	property dateLastOpened_loc : "" --> "Date de dernière ouverture"
	property dateAdded_loc : "" --> "Date de l’ajout"
	property size_loc : "" --> "Taille"
	property version_loc : "" --> "Version"
	property comments_loc : "" --> "Commentaires"
	property tags_loc : "" --> "Tags"
	property useRelativeDates_loc : "" --> "Utiliser les dates relatives"
	property calculateAllSizes_loc : "" --> "Calculer toutes les tailles"
	property showIconPreview_loc : "" --> "Utiliser un aperçu comme icône"}
	property useAsDefaults_loc : "" --> "Utiliser comme valeurs par défaut"
	property smallSizeIcons_loc : "" --> "icônes de petite taille"
	property largeSizeIcons_loc : "" --> "icônes de grande taille"
	property closeButton_loc : "" --> "Bouton de fermeture"
	property alwaysOpenInListView_loc : "" --> "Toujours présenter par liste"
	property browseInListView_loc : "" --> "Naviguer en présentation par listes"
end script

Germaine()

on Germaine()
	
	set theFolder to (choose folder) --> an alias
	
	set startTime to (time of (current date))
	-- Grab the localized version of several UI elements
	set theBundle to path to application "Finder" --> an alias
	-- set o's showViewOptions_loc to localized string "N35" in bundle theBundle
	set o's kind_loc to localized string "N224" in bundle theBundle
	--> "Art"
	set o's name_loc to localized string "N220" in bundle theBundle
	--> "Name"
	set o's sortBy_loc to localized string "FR11" in bundle theBundle
	--> "Sortiert nach:"
	set o's iCloudStatus_loc to localized string "N169.39" in bundle theBundle
	--> "iCloud-Status"
	set o's dateModified_loc to localized string "N169.30" in bundle theBundle -- alt N221
	--> "Änderungsdatum"
	set o's dateCreated_loc to localized string "N169.31" in bundle theBundle -- alt N222
	--> "Erstellungsdatum"
	set o's dateLastOpened_loc to localized string "N169.32" in bundle theBundle
	--> "Zuletzt geöffnet"
	set o's dateAdded_loc to localized string "N169.38" in bundle theBundle -- alt N230
	--> "Hinzugefügt am"
	set o's size_loc to localized string "N169.33" in bundle theBundle -- alt N223
	--> "Größe"
	set o's version_loc to localized string "N169.34" in bundle theBundle -- alt N226
	--> "Version"
	set o's comments_loc to localized string "N169.36" in bundle theBundle -- alt N227
	--> "Kommentare"
	set o's tags_loc to localized string "N169.37" in bundle theBundle -- alt N225
	--> "Tags"
	set o's alwaysOpenInListView_loc to localized string "VO15" in bundle theBundle
	--> "Immer in Listendarstellung öffnen"
	set o's browseInListView_loc to localized string "VO19" in bundle theBundle
	--> "In Listendarstellung blättern"
	
	-- CAUTION, now, two strings whose English spelling isn't reachable in resources
	set aKey to "6.title"
	set o's useAsDefaults_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Als Standard verwenden"
	-- The English string isn't available. Define it here.
	if o's useAsDefaults_loc = aKey then set o's useAsDefaults_loc to "Use as Defaults"
	
	set aKey to "49.ibExternalAccessibilityDescription"
	set o's smallSizeIcons_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Kleine Symbole"
	-- The English string isn't available. Define it here.
	if o's smallSizeIcons_loc = aKey then set o's smallSizeIcons_loc to "small icon size" -- EDITED
	log o's smallSizeIcons_loc
	
	set aKey to "491.ibExternalAccessibilityDescription" -- this is the 2nd resource defining "icônes de petite taille"
	set smallSizeIcons_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Kleine Symbole"
	-- The English string isn't available. Define it here.
	if smallSizeIcons_loc = aKey then set smallSizeIcons_loc to "small icon size"
	log smallSizeIcons_loc
	
	set aKey to "48.ibExternalAccessibilityDescription"
	set o's largeSizeIcons_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Große Symbole"
	-- The English string isn't available. Define it here.
	if o's largeSizeIcons_loc = aKey then set o's largeSizeIcons_loc to "large icon size" -- EDITED
	log o's largeSizeIcons_loc
	
	set aKey to "493.ibExternalAccessibilityDescription" -- this is the 2nd resource defining "icônes de grande taille"
	set largeSizeIcons_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Große Symbole"
	-- The English string isn't available. Define it here.
	if largeSizeIcons_loc = aKey then set largeSizeIcons_loc to "large icon size"
	log largeSizeIcons_loc
	
	set aKey to "54.title"
	set o's useRelativeDates_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Relatives Datum verwenden"
	-- The English string isn't available. Define it here.
	if o's useRelativeDates_loc = aKey then set o's useRelativeDates_loc to "Use relative dates"
	set aKey to "65.title"
	set o's calculateAllSizes_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	--> "Alle Größen berechnen"
	-- The English string isn't available. Define it here.
	if o's calculateAllSizes_loc = aKey then set o's calculateAllSizes_loc to "Calculate all sizes"
	set aKey to "41.title"
	set o's showIconPreview_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle -- ou 402.title, 104.title, 205.title
	--> "Symbolvorschau einblenden"
	-- The English string isn't available. Define it here.
	if o's showIconPreview_loc = aKey then set o's showIconPreview_loc to "Show icon preview"
	
	-- Thanks to Shane Stanley this path was edited to accomodate newsystems
	set theBundle to ((path to library folder from system domain as text) & "Frameworks:ApplicationServices.framework:Versions:Current:Frameworks:HIServices.framework:Versions:Current:Resources:") as «class furl»
	set o's closeButton_loc to localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle theBundle --> "Bouton de fermeture"
	--> "Schließen-Taste"
	
	(* List the folders of the selected one *)
	-- With FileManagerLib the folder may be defined by an alias
	set theFolders to objects of theFolder result type urls array with searching subfolders without include files and include invisible items --> NSArray object
	set theFolders to theFolders as list -- a list of URLs
	-- Append the root folder to the list
	set end of theFolders to theFolder
	set nbFolders to (count theFolders) as text -- 28993
	
	-- During tests I was bored by remaining floating windows
	-- In real life you may disable this instruction.
	my closeFloatingWindows()
	
	tell application "Finder"
		repeat with aFolder in theFolders
			open aFolder -- Finder may open a «class furl» object 
			if current view of window 1 is not list view then set current view of window 1 to list view
			-- but Finder can't get properties of a «class furl» object
			if (class of aFolder) is not alias then set aFolder to aFolder as alias
			my ruleSettings(get name of aFolder)
			close window 1
		end repeat
	end tell
	set executeTime to (time of (current date)) - startTime --> 117
	tell application "Finder" to display dialog "Treated : " & nbFolders & linefeed & " in : " & executeTime & " seconds"
end Germaine

on ruleSettings(folderName)
	-- try -- enable it in real life
	tell application "System Events" to tell process "Finder"
		set frontmost to true
		keystroke "2" using {command down, control down} --> "Organiser par Type" or "Arrange By Kind"
		
		keystroke "j" using {command down} --> "Afficher les options de présentation" or "Show View Options"
		
		repeat 10 times
			tell window 1 to if (its name is folderName) and its subrole is "AXSystemFloatingWindow" then exit repeat
			delay 0.1
		end repeat
		tell window 1
			(*
class of UI elements 
-- Don't worry, I uppercased the pop up buttons to highlight the ordering changes
--> with ' old ' systems --> {checkbox, checkbox, static text, POP UP BUTTON, POP UP BUTTON, static text, group, button, button, static text}
--> with 'new' systems --> {checkbox, checkbox, static text, POP UP BUTTON, static text, POP UP BUTTON, group, button, button, static text}
role description of buttons --> {"bouton", "Bouton de fermeture"}
--> {"button", "close button"}
name of buttons --> {"Utiliser comme valeurs par défaut", missing value}
--> {"Use as Defaults", missing value}
name of pop up buttons --> {"Trier par :", "Organiser par :"}
--> {"Sort By:", "Arrange By:"}
*)
			(*
if value of checkbox (o's alwaysOpenInListView_loc) is not 1 then click checkbox (o's alwaysOpenInListView_loc) -- "Toujours présenter par liste"
if value of checkbox (o's browseInListView_loc) is not 1 then click checkbox (o's browseInListView_loc) -- "Naviguer en présentation par listes"
			
repeat 20 times -- loop for safe but here the pop up is always available at first pass
if exists pop up button (o's sortBy_loc) then exit repeat
delay 0.2
end repeat
tell pop up button (o's sortBy_loc)
(*
-- name of menu items of menu 1
--> {"Nom", "Type", "Date de dernière ouverture", "Date de l’ajout", "Date de modification", "Date de création", "Taille", "Tags"}
--> {"Name", "Kind", "Date Last Opened", "Date Added", "Date Modified", "Date Created", "Size", "Tags"}
--error number -128
*)
click it -- reveal the menu items
click menu item (o's name_loc) of menu 1 --  "Tri par Type" or "Sort by Kind"
end tell -- pop up button (o's sortBy_loc)
*)
			tell group 1
				-- class of UI elements 
				-- Don't worry, I uppercased the changing items to make them visible
				--> with ' old ' systems --> {static text, button, button, RADIO GROUP, static text, pop up button, static text, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox}
				--> with 'new' systems --> {static text, button, button, RADIO BUTTON, RADIO BUTTON, static text, pop up button, static text, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox, checkbox}
				if exists radio group 1 then
					log "We enter High Sierra code"
					-- We are here when High Sierra or older system is running. Don't know for Mojave
					tell radio group 1
						-- class of UI elements --> {radio button, radio button}
						set radioDescriptions to description of radio buttons --> {"icônes de petite taille", "icônes de grande taille"}
						--> {"small icon size", "large icon size"}
						--> {"Kleine Symbole", "Große Symbole"} -- they are the correct strings
						name of radio buttons --> {missing value, missing value} # ADDED
						title of radio buttons --> {"", ""} # ADDED
						value of radio buttons --> {1, 0}
						-- Loop which no longer assume which index is given to largeSizeIcons radio button
						-- can't define a radio button by its description to get its value
						repeat with i from 1 to count radioDescriptions
							if item i of radioDescriptions is (o's largeSizeIcons_loc) then
								log "here the radio button description matches largeSizeIcons_loc, with i = " & i
								if value of radio button i is 0 then -- Large Icons is not selected
									log "here if the  Large Icons radio button is not selected"
									click radio button i -- activate Large Icons "icônes de grande taille"
									log "we clicked the Large Icons radio button to select it"
									delay 0.1
									value of radio button i
									log "as the Large Icons radio button is supposed to be selected it's value is supposed to be 1, it is : " & result
									exit repeat
									log "point 5 with i = " & i -- we are supposed to never display that
								end if
								log "point 6 with i = " & i
							end if
							log "point 7 with i = " & i
						end repeat
					end tell --  radio group 1
					log "Exit from High Sierra Code"
				else
					log "We enter new Catalina code"
					-- We are here when Catalina is running, perhaps also under Mojave
					set radioDescriptions to description of radio buttons --> {"icônes de petite taille", "icônes de grande taille"}
					--> {"small icon size", "large icon size"}
					--> {"Kleine Symbole", "Große Symbole"} -- are you getting these strings
					# Two new instructions. I wonder if they, at last, give real name and title to radio buttons
					# It would make sense now that they are no longer located in a radio group.
					name of radio buttons --> {missing value, missing value} # ADDED
					title of radio buttons --> {"", ""} # ADDED					
					value of radio buttons --> {1, 0}
					-- Loop which no longer assume which index is given to largeSizeIcons radio button
					-- can't define a radio button by its description to get its value
					repeat with i from 1 to count radioDescriptions
						if item i of radioDescriptions is (o's largeSizeIcons_loc) then
							log "here the radio button description matches largeSizeIcons_loc, with i = " & i
							if value of radio button i is 0 then -- Large Icons is not selected
								log "here if the  Large Icons radio button is not selected"
								click radio button i -- activate Large Icons "icônes de grande taille"
								log "we clicked the Large Icons radio button to select it"
								delay 0.1
								value of radio button i
								log "as the Large Icons radio button is supposed to be selected it's value is supposed to be 1, it is : " & result
								exit repeat
							end if
							log "point 6 with i = " & i
						end if
						log "point 7 with i = " & i
					end repeat
					log "exit from Catalina code"
				end if
				(*
				tell pop up button 1 (*
get its name --> "Taille du texte :"
get title of menu items of menu 1 --> {"10", "11", "12", "13", "14", "15", "16"}
*)
					if its value is not "14" then
						click it -- reveal the menu items
						click menu item "14" of menu 1
					end if
				end tell -- pop up button 1
				
				-- Here the iCloudStatus checkbox is greyed so its value is NEVER 1
				if value of checkbox (o's iCloudStatus_loc) is 1 then click checkbox (o's iCloudStatus_loc) -- uncheck it
				if value of checkbox (o's dateModified_loc) is 0 then click checkbox (o's dateModified_loc) -- check it
				if value of checkbox (o's dateCreated_loc) is 1 then click checkbox (o's dateCreated_loc) -- uncheck it
				if value of checkbox (o's dateLastOpened_loc) is 1 then click checkbox (o's dateLastOpened_loc) -- uncheck it
				if value of checkbox (o's dateAdded_loc) is 1 then click checkbox (o's dateAdded_loc) -- uncheck it
				if value of checkbox (o's size_loc) is 0 then click checkbox (o's size_loc) -- check it
				if value of checkbox (o's kind_loc) is 0 then click checkbox (o's kind_loc) -- check it
				if value of checkbox (o's version_loc) is 1 then click checkbox (o's version_loc) -- uncheck it
				if value of checkbox (o's comments_loc) is 1 then click checkbox (o's comments_loc) -- uncheck it
				if value of checkbox (o's tags_loc) is 1 then click checkbox (o's tags_loc) -- uncheck it
				if value of checkbox (o's useRelativeDates_loc) is 0 then click checkbox (o's useRelativeDates_loc) -- check it
				if value of checkbox (o's calculateAllSizes_loc) is 0 then click checkbox (o's calculateAllSizes_loc) -- check it
				if value of checkbox (o's showIconPreview_loc) is 0 then click checkbox (o's showIconPreview_loc) -- check it
				*)
			end tell -- group 1
			
			set theButtons to buttons
			-- loop to anticipate a possible change upon the index of the useAsDefaults button
			repeat with aButton in theButtons
				if name of aButton is (o's useAsDefaults_loc) then
					click aButton
					exit repeat
				end if
			end repeat
			repeat with aButton in theButtons
				-- loop to anticipate a possible change upon the index of the close button
				if description of aButton is (o's closeButton_loc) then
					click aButton -- Close the floating window
					exit repeat
				end if
			end repeat
		end tell -- window 1
	end tell -- process "Finder" of "System Events"	
	-- end try -- enable it in real life
end ruleSettings

on closeFloatingWindows()
	tell application "System Events" to tell process "Finder"
		set frontmost to true
		set theWindows to every window -- don't change that to keep the loop working
		repeat with aWindow in theWindows
			if subrole of aWindow is "AXSystemFloatingWindow" then
				tell aWindow
					-- get description of buttons --> {"Bouton de fermeture"}
					repeat with aButton in buttons
						if description of aButton is (o's closeButton_loc) then
							click aButton -- Close the floating window
							exit repeat
						end if
					end repeat
				end tell -- aWindow
			end if
		end repeat
	end tell
end closeFloatingWindows

I ran it upon a folder whose icon size was set to Small.
It contained no subfolder.

The Log History is:


Don't click [Open this Scriplet in your Editor:]

tell application "Script Editor"
	choose folder
		--> alias "SSD 1000:Users:yvankoenig:Desktop:oups:"
end tell
tell current application
	current date
		--> date "Montag, 30. Dezember 2019 um  21:10:46"
end tell
tell application "Finder"
	path to current application
		--> alias "SSD 1000:System:Library:CoreServices:Finder.app:"
end tell
tell current application
	localized string "N224" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Art"
	localized string "N220" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Name"
	localized string "FR11" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Sortiert nach:"
	localized string "N169.39" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "iCloud-Status"
	localized string "N169.30" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Änderungsdatum"
	localized string "N169.31" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Erstellungsdatum"
	localized string "N169.32" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Zuletzt geöffnet"
	localized string "N169.38" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Hinzugefügt am"
	localized string "N169.33" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Größe"
	localized string "N169.34" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Version"
	localized string "N169.36" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Kommentare"
	localized string "N169.37" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Tags"
	localized string "VO15" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Immer in Listendarstellung öffnen"
	localized string "VO19" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "In Listendarstellung blättern"
	localized string "6.title" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Als Standard verwenden"
	localized string "49.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Kleine Symbole"
	(*Kleine Symbole*)
	localized string "491.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Kleine Symbole"
	(*Kleine Symbole*)
	localized string "48.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Große Symbole"
	(*Große Symbole*)
	localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Große Symbole"
	(*Große Symbole*)
	localized string "54.title" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Relatives Datum verwenden"
	localized string "65.title" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Alle Größen berechnen"
	localized string "41.title" from table "ViewOptionsWindow" in bundle alias "SSD 1000:System:Library:CoreServices:Finder.app:"
		--> "Symbolvorschau einblenden"
	path to library folder from system domain as text
		--> "SSD 1000:System:Library:"
	localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle file "SSD 1000:System:Library:Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:"
		--> "Schließen-Taste"
end tell
tell application "System Events"
	set frontmost of process "Finder" to true
	get every window of process "Finder"
		--> {}
end tell
tell application "Finder"
	open alias "SSD 1000:Users:yvankoenig:Desktop:oups:"
	get current view of window 1
		--> list view
	get name of alias "SSD 1000:Users:yvankoenig:Desktop:oups:"
		--> "oups"
end tell
tell application "System Events"
	set frontmost of process "Finder" to true
	keystroke "2" using {command down, control down}
	keystroke "j" using {command down}
	get name of window 1 of process "Finder"
		--> "oups"
	get subrole of window 1 of process "Finder"
		--> "AXSystemFloatingWindow"
	exists radio group 1 of group 1 of window 1 of process "Finder"
		--> true
	(*We enter High Sierra code*) (* you will read  "We enter new Catalina code" *)
	get description of every radio button of radio group 1 of group 1 of window 1 of process "Finder"
		--> {"Kleine Symbole", "Große Symbole"}
	get name of every radio button of radio group 1 of group 1 of window 1 of process "Finder"
		--> {missing value, missing value} # MAYBE name is no longer missing value for you
	get title of every radio button of radio group 1 of group 1 of window 1 of process "Finder"
		--> {"", ""} # MAYBE title is no longer "" for you
	get value of every radio button of radio group 1 of group 1 of window 1 of process "Finder"
		--> {1, 0}
	(*point 7 with i = 1*)
	(*here the radio button description matches largeSizeIcons_loc, with i = 2*)
	get value of radio button 2 of radio group 1 of group 1 of window 1 of process "Finder"
		--> 0
	(*here if the  Large Icons radio button is not selected*)
	click radio button 2 of radio group 1 of group 1 of window 1 of process "Finder"
		--> radio button 2 of radio group 1 of group 1 of window "oups" of application process "Finder"
	(*we clicked the Large Icons radio button to select it*)
	get value of radio button 2 of radio group 1 of group 1 of window 1 of process "Finder"
		--> 1
	(*as the Large Icons radio button is supposed to be selected it's value is supposed to be 1, it is : 1*)
	(*Exit from High Sierra Code*) (* you will read  "exit from Catalina code" *)
	get every button of window 1 of process "Finder"
		--> {button "Als Standard verwenden" of window "oups" of application process "Finder", button 2 of window "oups" of application process "Finder"}
	get name of button "Als Standard verwenden" of window "oups" of application process "Finder"
		--> "Als Standard verwenden"
	click button "Als Standard verwenden" of window "oups" of application process "Finder"
		--> button "Als Standard verwenden" of window "oups" of application process "Finder"
	get description of button "Als Standard verwenden" of window "oups" of application process "Finder"
		--> "Taste"
	get description of button 2 of window "oups" of application process "Finder"
		--> "Schließen-Taste"
	click button 2 of window "oups" of application process "Finder"
		--> button 2 of window "oups" of application process "Finder"
end tell
tell application "Finder"
	close window 1
		--> {}
end tell
tell current application
	current date
		--> date "Montag, 30. Dezember 2019 um  21:10:47"
end tell
tell application "Finder"
	display dialog "Treated : 1
 in : 1 seconds"
		--> {button returned:"OK"}
end tell
Ergebnis:
{button returned:"OK"}

Logically everything is supposed to behave flawlessly.
When I will have your Log History I will perhaps discover what may be wrong.
Of course, if my grand-daughter comes here tomorrow I will test upon its macBook running Catalina. She will dislike the fact that I will switch the languags but I paid the machine :wink:

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 30 décembre 2019 21:27:03

A bit of insomnia strike.
I had an idea.
Maybe, at last, under new systems, the name and/or title of a radio button is/are given ‘meaningful’ values.
Would make sense now that radio buttons aren’t located in a radio group.

Now, the message #16 contains a script offering the required features minus the columns ordering.

Four features are ready to be ruled.

I apologizes but, as I’m not an Apple’s employee, I don’t know what rules their design choices.
Not sure that Apple’s employees really know them :rolleyes:

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mardi 31 décembre 2019 16:10:09

Yvan your script is a timesaver!
I never expected that this can be done, but you did it!

I found a small issue. If arrange by is set as none (german: ohne) then

keystroke "2" using {command down, control down} --> "Organiser par Type" or "Arrange By Kind"

doesn’t work and arrange by remains as none (german: ohne)

It just works when I set arrange manually for example to name or application, etc…

Please tell me if I should delete some posts.

I wish you and your loved ones a happy new year.
Thank you for your effort :slight_smile:

Tomorrow I will try to understand why “Arrange by” doesn’t work.
It’s curious because as far as I know, shortcuts aren’t localization dependent.

Here, it does the job.
Easy to check because I always use “Arranged by : None”

Maybe I will reactivate the original scheme in which I didn’t used the shortcut but the dedicated pop up menu. All the code is already available.

You may delete #26, #25, #23, # 20.

When it will be done, in fact tomorrow, I will delete some of my messages.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mardi 31 décembre 2019 21:43:20

Happy new year to all of you.

I’m not sure to have access to a Catalina machine today.
May you the script below in English and post the Log History ?
With a bit of luck it will give useful infos.

use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use script "FileManagerLib" version "2.3.3"

script o
	-- property showViewOptions_loc : ""
	property kind_loc : "" --> "Type"
	property name_loc : "" --> "Nom"
	property sortBy_loc : "" --> "Trier par :"
	property iCloudStatus_loc : "" --> "Statut iCloud"
	property dateModified_loc : "" --> "Date de modification"
	property dateCreated_loc : "" --> "Date de création"
	property dateLastOpened_loc : "" --> "Date de dernière ouverture"
	property dateAdded_loc : "" --> "Date de l’ajout"
	property size_loc : "" --> "Taille"
	property version_loc : "" --> "Version"
	property comments_loc : "" --> "Commentaires"
	property tags_loc : "" --> "Tags"
	property alwaysOpenInListView_loc : "" --> "Toujours présenter par liste"
	property browseInListView_loc : "" --> "Naviguer en présentation par listes"
	-- property hideToolbar_loc : "" --> "Masquer la barre d’outils" 	
	property showToolbar_loc : "" --> "Afficher la barre d’outils"
	-- property hideStatusBar_loc : "" --> "Masquer la barre d’état"
	property showStatusBar_loc : "" --> "Afficher la barre d’état"
	-- property hidePathBar_loc : "" --> "Masquer la barre du chemin d’accès"
	property showPathBar_loc : "" --> "Afficher la barre du chemin d’accès"
	property showSidebar_loc : "" --> "Afficher la barre latérale"
	-- property hideSidebar_loc : "" --> "Masquer la barre latérale"
	-- property hideTabBar_loc : "" --> "Masquer la barre d’onglets"
	property showTabBar_loc : "" --> "Afficher la barre d’onglets"
	--property hidePreview_loc : "" --> "Masqu l’aperçu"
	property showPreview_loc : "" --> "Afficher l’aperçu"
	property useAsDefaults_loc : "" --> "Utiliser comme valeurs par défaut"
	property arrangeBy_loc : "" --> "Organiser par :"
	-- property smallSizeIcons_loc : "" --> "icônes de petite taille"
	property largeSizeIcons_loc : "" --> "icônes de grande taille"
	property useRelativeDates_loc : "" --> "Utiliser les dates relatives"
	property calculateAllSizes_loc : "" --> "Calculer toutes les tailles"
	property showIconPreview_loc : "" --> "Utiliser un aperçu comme icône"
	property closeButton_loc : "" --> "Bouton de fermeture" 
	property textSize_loc : "" --> "Taille du texte :"
end script

Germaine()

on Germaine()
	
	-- Grab the localized version of several UI elements
	set theBundle to path to application "Finder" --> an alias
	-- set o's showViewOptions_loc to localized string "N35" in bundle theBundle
	set o's kind_loc to localized string "N224" in bundle theBundle
	set o's name_loc to localized string "N220" in bundle theBundle
	set o's sortBy_loc to localized string "FR11" in bundle theBundle
	set o's iCloudStatus_loc to localized string "N169.39" in bundle theBundle
	set o's dateModified_loc to localized string "N169.30" in bundle theBundle -- alt N221
	set o's dateCreated_loc to localized string "N169.31" in bundle theBundle -- alt N222
	set o's dateLastOpened_loc to localized string "N169.32" in bundle theBundle
	set o's dateAdded_loc to localized string "N169.38" in bundle theBundle -- alt N230
	set o's size_loc to localized string "N169.33" in bundle theBundle -- alt N223
	set o's version_loc to localized string "N169.34" in bundle theBundle -- alt N226
	set o's comments_loc to localized string "N169.36" in bundle theBundle -- alt N227
	set o's tags_loc to localized string "N169.37" in bundle theBundle -- alt N225
	set o's alwaysOpenInListView_loc to localized string "VO15" in bundle theBundle
	set o's browseInListView_loc to localized string "VO19" in bundle theBundle
	
	
	--set o's hideToolbar_loc to localized string "FV1" in bundle theBundle
	set o's showToolbar_loc to localized string "FV2" in bundle theBundle
	--set o's hideStatusBar_loc to localized string "FV5" in bundle theBundle
	set o's showStatusBar_loc to localized string "FV6" in bundle theBundle
	--set o's hidePathBar_loc to localized string "FV11" in bundle theBundle
	set o's showPathBar_loc to localized string "FV12" in bundle theBundle
	set o's showSidebar_loc to localized string "FV13" in bundle theBundle
	--set o's hideSidebar_loc to localized string "FV14" in bundle theBundle
	--set o's hideTabBar_loc to localized string "FV18" in bundle theBundle
	set o's showTabBar_loc to localized string "FV19" in bundle theBundle
	--set o's hidePreview_loc to localized string "FV22" in bundle theBundle
	set o's showPreview_loc to localized string "FV23" in bundle theBundle
	
	
	-- CAUTION, now, some strings whose English spelling isn't reachable in resources
	set aKey to "6.title"
	set o's useAsDefaults_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "6.title". Define it here.
	if o's useAsDefaults_loc = aKey then set o's useAsDefaults_loc to "Use as Defaults"
	
	set aKey to "974.title"
	set o's arrangeBy_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "974.title". Define it here.
	if o's arrangeBy_loc = aKey then set o's arrangeBy_loc to "Arrange By:"
	(*
	-- we no longer use it
	set aKey to "491.ibExternalAccessibilityDescription"
	set o's smallSizeIcons_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- with old systems, in English, the resource isn't available -> "491.ibExternalAccessibilityDescription". Define it here.
	if o's smallSizeIcons_loc = aKey then set o's smallSizeIcons_loc to "Small Size Icons"
	*)
	set aKey to "493.ibExternalAccessibilityDescription"
	set o's largeSizeIcons_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- with old systems, in English, the resource isn't available -> "493.ibExternalAccessibilityDescription". Define it here. 
	if o's largeSizeIcons_loc = aKey then set o's largeSizeIcons_loc to "Large Size Icons"
	
	set aKey to "52.title"
	set o's textSize_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "52.title". Define it here.
	if o's textSize_loc = aKey then set o's textSize_loc to "text size:" # À VÉRIFIER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
	log o's textSize_loc
	
	set aKey to "191.title"
	set o's textSize_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "191.title". Define it here.
	if o's textSize_loc = aKey then set o's textSize_loc to "text size:" # À VÉRIFIER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
	log o's textSize_loc
	
	set aKey to "101.title"
	set o's textSize_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "101.title". Define it here.
	if o's textSize_loc = aKey then set o's textSize_loc to "text size:" # À VÉRIFIER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
	log o's textSize_loc
	
	set aKey to "396.title"
	set o's textSize_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "396.title". Define it here.
	if o's textSize_loc = aKey then set o's textSize_loc to "text size:" # À VÉRIFIER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
	log o's textSize_loc
	
	
	set aKey to "54.title"
	set o's useRelativeDates_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "54.title". Define it here.
	if o's useRelativeDates_loc = aKey then set o's useRelativeDates_loc to "Use relative dates"
	
	set aKey to "65.title"
	set o's calculateAllSizes_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "65.title". Define it here.
	if o's calculateAllSizes_loc = aKey then set o's calculateAllSizes_loc to "Calculate all sizes"
	
	set aKey to "41.title"
	set o's showIconPreview_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "41.title". Define it here.
	if o's showIconPreview_loc = aKey then set o's showIconPreview_loc to "Show icon preview"
	log o's showIconPreview_loc
	
	set aKey to "402.title"
	set o's showIconPreview_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "402.title". Define it here.
	if o's showIconPreview_loc = aKey then set o's showIconPreview_loc to "Show icon preview"
	log o's showIconPreview_loc
	
	set aKey to "104.title"
	set o's showIconPreview_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "104.title". Define it here.
	if o's showIconPreview_loc = aKey then set o's showIconPreview_loc to "Show icon preview"
	log o's showIconPreview_loc
	
	set aKey to "205.title"
	set o's showIconPreview_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
	-- In English, the resource isn't available -> "205.title". Define it here.
	if o's showIconPreview_loc = aKey then set o's showIconPreview_loc to "Show icon preview"
	log o's showIconPreview_loc
	
	-- Thanks to Shane Stanley this path was edited to accomodate newsystems
	set theBundle to ((path to library folder from system domain as text) & "Frameworks:ApplicationServices.framework:Versions:Current:Frameworks:HIServices.framework:Versions:Current:Resources:") as «class furl»
	set o's closeButton_loc to localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle theBundle --> "Bouton de fermeture"
	
	
end Germaine

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mercredi 1 janvier 2020 09:51:20

Happy new year!

I ran the script:

English Log History:

-- Don't click [Open this Scriplet in your Editor:]

tell application "Finder"
	path to current application
		--> error number -1708
	«event ascrgdut»
		--> error number -1708
	path to current application
		--> alias "macOS:System:Library:CoreServices:Finder.app:"
end tell
tell current application
	localized string "N224" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Kind"
	localized string "N220" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Name"
	localized string "FR11" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Sort By:"
	localized string "N169.39" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "iCloud Status"
	localized string "N169.30" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Modified"
	localized string "N169.31" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Created"
	localized string "N169.32" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Last Opened"
	localized string "N169.38" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Added"
	localized string "N169.33" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Size"
	localized string "N169.34" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Version"
	localized string "N169.36" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Comments"
	localized string "N169.37" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Tags"
	localized string "VO15" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Always open in list view"
	localized string "VO19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Browse in list view"
	localized string "FV2" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Toolbar"
	localized string "FV6" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Status Bar"
	localized string "FV12" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Path Bar"
	localized string "FV13" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Sidebar"
	localized string "FV19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Tab Bar"
	localized string "FV23" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Preview"
	localized string "6.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "6.title"
	localized string "974.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "974.title"
	localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "493.ibExternalAccessibilityDescription"
	localized string "52.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "52.title"
	(*text size:*)
	localized string "191.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "191.title"
	(*text size:*)
	localized string "101.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "101.title"
	(*text size:*)
	localized string "396.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "396.title"
	(*text size:*)
	localized string "54.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "54.title"
	localized string "65.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "65.title"
	localized string "41.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "41.title"
	(*Show icon preview*)
	localized string "402.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "402.title"
	(*Show icon preview*)
	localized string "104.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "104.title"
	(*Show icon preview*)
	localized string "205.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "205.title"
	(*Show icon preview*)
	path to library folder from system domain as text
		--> "macOS:System:Library:"
	localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle file "macOS:System:Library:Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:"
		--> "close button"
end tell
Result:
"close button"

German Log History: (if it helps you)

-- Don't click [Open this Scriplet in your Editor:]

tell application "Finder"
	path to current application
		--> alias "macOS:System:Library:CoreServices:Finder.app:"
end tell
tell current application
	localized string "N224" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Art"
	localized string "N220" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Name"
	localized string "FR11" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Sortiert nach:"
	localized string "N169.39" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "iCloud-Status"
	localized string "N169.30" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Änderungsdatum"
	localized string "N169.31" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Erstellungsdatum"
	localized string "N169.32" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Zuletzt geöffnet"
	localized string "N169.38" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Hinzugefügt am"
	localized string "N169.33" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Größe"
	localized string "N169.34" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Version"
	localized string "N169.36" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Kommentare"
	localized string "N169.37" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Tags"
	localized string "VO15" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Immer in Listendarstellung öffnen"
	localized string "VO19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "In Listendarstellung blättern"
	localized string "FV2" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Symbolleiste einblenden"
	localized string "FV6" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Statusleiste einblenden"
	localized string "FV12" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Pfadleiste einblenden"
	localized string "FV13" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Seitenleiste einblenden"
	localized string "FV19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Tableiste einblenden"
	localized string "FV23" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Vorschau einblenden"
	localized string "6.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Als Standard verwenden"
	localized string "974.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "974.title"
	localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Große Symbole"
	localized string "52.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Textgröße:"
	(*Textgröße:*)
	localized string "191.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Textgröße:"
	(*Textgröße:*)
	localized string "101.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Textgröße:"
	(*Textgröße:*)
	localized string "396.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Textgröße:"
	(*Textgröße:*)
	localized string "54.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Relatives Datum verwenden"
	localized string "65.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Alle Größen berechnen"
	localized string "41.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Symbolvorschau einblenden"
	(*Symbolvorschau einblenden*)
	localized string "402.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Symbolvorschau einblenden"
	(*Symbolvorschau einblenden*)
	localized string "104.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Symbolvorschau einblenden"
	(*Symbolvorschau einblenden*)
	localized string "205.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Symbolvorschau einblenden"
	(*Symbolvorschau einblenden*)
	path to library folder from system domain as text
		--> "macOS:System:Library:"
	localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle file "macOS:System:Library:Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:"
		--> "Schließen-Taste"
end tell
Ergebnis:
"Schließen-Taste"

Happy New Year to everybody!
The most difficult to debug code is redundant code, and difficult to port from one computer to another code. Therefore,

  1. Change hardcoded paths to relative paths,
  2. Putting localized string command into tell application “Finder”, changes default bundle’s value to Finder.app’s bundle. So, in bundle… no need.
  3. To check the correspondence of English names with others, it is better to use the records:

tell application "Finder"
	set kindString to localized string "N224"
	set nameString to localized string "N220"
	set sortByString to localized string "FR11"
	set iCloudStatusString to localized string "N169.39"
	set dateModifiedString to localized string "N169.30"
	set dateCreatedString to localized string "N169.31"
	set dateLastOpenedString to localized string "N169.32"
	set dateAddedString to localized string "N169.38"
	set sizeString to localized string "N169.33"
	set versionString to localized string "N169.34"
	set commentsString to localized string "N169.36"
	set tagsString to localized string "N169.37"
	set alwaysOpenInListViewString to localized string "VO15"
	set browseInListViewString to localized string "VO19"
	set showToolbarString to localized string "FV2"
	set showStatusBarString to localized string "FV6"
	set showPathBarString to localized string "FV12"
	set showSideBarString to localized string "FV13"
	set showTabBarString to localized string "FV19"
	set showPreviewString to localized string "FV23"
	set useAsDefaultsString to localized string "6.title" from table "ViewOptionsWindow"
	set groupByString to localized string "974.title" from table "ViewOptionsWindow"
	set largeIconSizeString to localized string ¬
		"493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow"
	set textSizeString to localized string "52.title" from table "ViewOptionsWindow"
	-- set textSizeString to localized string "191.title" from table "ViewOptionsWindow"
	-- set textSizeString to localized string "101.title" from table "ViewOptionsWindow"
	-- set textSizeString to localized string "396.title" from table "ViewOptionsWindow"
	set useRelativeDatesString to localized string "54.title" from table "ViewOptionsWindow"
	set calculateAllSizesString to localized string "65.title" from table "ViewOptionsWindow"
	set showIconPreviewString to localized string "41.title" from table "ViewOptionsWindow"
	-- set showIconPreviewString to localized string "402.title" from table "ViewOptionsWindow"
	-- set showIconPreviewString to localized string "104.title" from table "ViewOptionsWindow"
	-- set showIconPreviewString to localized string "205.title" from table "ViewOptionsWindow"
end tell

set libraryFolder to path to library folder from system domain as text
set bundlePath to libraryFolder & "Frameworks:ApplicationServices.framework:Versions:A:"
set bundleAlias to alias (bundlePath & "Frameworks:HIServices.framework:Versions:A:Resources:")
set closeButtonString to localized string ¬
	"AXButton:AXCloseButton" from table "RoleDescriptions" in bundle bundleAlias


return {|kind|:kindString, |name|:nameString, |Sort By|:sortByString, |iCloud Status|:iCloudStatusString, |Date Modified|:dateModifiedString, |Date Created|:dateCreatedString, |Date Last Opened|:dateLastOpenedString, |Date Added|:dateAddedString, |Size|:sizeString, |Version|:versionString, |Comments|:commentsString, |Tags|:tagsString, |Always open in list view|:alwaysOpenInListViewString, |Browse in list view|:browseInListViewString, |Show Toolbar|:showToolbarString, |Show Status Bar|:showStatusBarString, |Show Path Bar|:showPathBarString, |Show SideBar|:showSideBarString, |Show Tab Bar|:showTabBarString, |Show Preview|:showPreviewString, |Use as Defaults|:useAsDefaultsString, |Group By|:groupByString, |large icon size|:largeIconSizeString, |Text size|:textSizeString, |Use relative dates|:useRelativeDatesString, |Calculate all sizes|:calculateAllSizesString, |Show icon preview|:showIconPreviewString, |close button|:closeButtonString}

@ KniazidisR

Thanks for your wishes.

Once again, no offense intended, but it seems that you didn’t read carefully Flavour’s message.

He carefully stated :

English Log History:

– Don’t click [Open this Scriplet in your Editor:]

What was posted was not supposed to be executable code, trying to do that would issue a compile error due to the two last lines.
It’s just the contents of the Log History returned by the script which I posted in message #30 asking explicitly for these reports.
My script is just a subset of a larger script, subset which contain instructions USEFUL in the complete script. I was just lazy enough to drop the properties embedded in a script object.

Neither Flavour nor myself are fool enough to write a script embedding the expanded path in every instruction.
It’s just what the Log History report.

On your side you may think that a record would be a better way to return the results but here it’s completely irrelevant. The main script would do nothing with your record.
You just wasted your time, Flavour’s one and mine too.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mercredi 1 janvier 2020 15:55:26

Thank you.
Both were useful, at least for somebody reading carefully;)

As I haven’t access to Catalina today, I choose to drop the shortcut cmd - ctrl + 2 and re-introduced the code triggering the pop up “Arrange By”.
The edited script is available in message #16

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mercredi 1 janvier 2020 16:08:34

Once again, no offense intended,
Your script at post #16 has all the same drawbacks as the last fragment that I tried to turn into real code.

But you have never accepted something better. And I do not hope so. I want to publish my comments for people who are able to perceive something. In the end, this site is not for sharing pleasantries about grandmothers, but for finding the best solution.

You can continue to debug your code for another 50 posts. I’m not interested in looking here anymore.

No quarrelling, unpleasantness, or personal attacks please, gentlemen. You both know the rules here.

Thanks. :slight_smile:

I don’t want that this script causes any trouble… :confused:

I ran the script and got this error:

English Log History:

-- Don't click [Open this Scriplet in your Editor:]

tell application "Script Editor"
	choose folder
		--> alias "macOS:Users:nelson:Downloads:"
end tell
tell current application
	current date
		--> date "Wednesday, 1. January 2020 at 23:47:27"
end tell
tell application "Finder"
	path to current application
		--> alias "macOS:System:Library:CoreServices:Finder.app:"
end tell
tell current application
	localized string "N224" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Kind"
	localized string "N220" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Name"
	localized string "FR11" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Sort By:"
	localized string "N169.39" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "iCloud Status"
	localized string "N169.30" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Modified"
	localized string "N169.31" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Created"
	localized string "N169.32" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Last Opened"
	localized string "N169.38" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Date Added"
	localized string "N169.33" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Size"
	localized string "N169.34" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Version"
	localized string "N169.36" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Comments"
	localized string "N169.37" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Tags"
	localized string "VO15" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Always open in list view"
	localized string "VO19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Browse in list view"
	localized string "FV2" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Toolbar"
	localized string "FV6" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Status Bar"
	localized string "FV12" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Path Bar"
	localized string "FV13" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Sidebar"
	localized string "FV19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Tab Bar"
	localized string "FV23" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "Show Preview"
	localized string "6.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "6.title"
	localized string "974.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "974.title"
	localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "493.ibExternalAccessibilityDescription"
	localized string "52.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "52.title"
	localized string "54.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "54.title"
	localized string "65.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "65.title"
	localized string "41.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
		--> "41.title"
	path to library folder from system domain as text
		--> "macOS:System:Library:"
	localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle file "macOS:System:Library:Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:"
		--> "close button"
end tell
tell application "System Events"
	set frontmost of process "Finder" to true
	get every window of process "Finder"
		--> {window "FileManagerLib_stuff copy" of application process "Finder"}
	get subrole of window "FileManagerLib_stuff copy" of application process "Finder"
		--> "AXStandardWindow"
end tell
tell application "Finder"
	open file "macOS:Users:nelson:Downloads:FileManagerLib_stuff copy:"
	get current view of window 1
		--> list view
	set bounds of window 1 to {50, 50, 1100, 600}
		--> {50, 50, 1100, 600}
	get name of alias "macOS:Users:nelson:Downloads:FileManagerLib_stuff copy:"
		--> "FileManagerLib_stuff copy"
end tell
tell application "System Events"
	set frontmost of process "Finder" to true
	get name of every menu item of menu 1 of menu bar item 5 of menu bar 1 of process "Finder"
		--> {"as Icons", "as List", "as Columns", "as Gallery", missing value, "Use Groups", "Sort By", "Clean Up", "Clean Up Selection", "Clean Up By", missing value, "Hide Sidebar", "Show Preview", missing value, "Hide Toolbar", "Show All Tabs", "Show Tab Bar", missing value, "Customize Touch Bar…", "Customize Control Strip…", missing value, "Show Path Bar", "Hide Status Bar", missing value, "Customize Toolbar…", missing value, "Show View Options", "Show Preview Options", "Increase Icon Size", missing value, "Enter Full Screen"}
	keystroke "j" using {command down}
	get name of window 1 of process "Finder"
		--> "FileManagerLib_stuff copy"
	get subrole of window 1 of process "Finder"
		--> "AXSystemFloatingWindow"
	get value of checkbox "Always open in list view" of window 1 of process "Finder"
		--> 1
	get value of checkbox "Browse in list view" of window 1 of process "Finder"
		--> 1
	exists pop up button "Sort By:" of window 1 of process "Finder"
		--> true
	click pop up button "Sort By:" of window 1 of process "Finder"
		--> pop up button "Sort By:" of window "FileManagerLib_stuff copy" of application process "Finder"
	click menu item "Name" of menu 1 of pop up button "Sort By:" of window 1 of process "Finder"
		--> menu item "Name" of menu 1 of pop up button "Sort By:" of window "FileManagerLib_stuff copy" of application process "Finder"
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	exists pop up button "Arrange By:" of window 1 of process "Finder"
		--> false
	click pop up button "Arrange By:" of window 1 of process "Finder"
		--> error number -1728 from pop up button "Arrange By:" of window 1 of process "Finder"
Result:
error "System Events got an error: Can’t get pop up button \"Arrange By:\" of window 1 of process \"Finder\"." number -1728 from pop up button "Arrange By:" of window 1 of process "Finder"

German Log History:

-- Don't click [Open this Scriplet in your Editor:]

tell application "Script Editor"
    choose folder
        --> alias "macOS:Users:nelson:Downloads:"
end tell
tell current application
    current date
        --> date "Mittwoch, 1. Januar 2020 um 23:35:41"
end tell
tell application "Finder"
    path to current application
        --> alias "macOS:System:Library:CoreServices:Finder.app:"
end tell
tell current application
    localized string "N224" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Art"
    localized string "N220" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Name"
    localized string "FR11" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Sortiert nach:"
    localized string "N169.39" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "iCloud-Status"
    localized string "N169.30" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Änderungsdatum"
    localized string "N169.31" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Erstellungsdatum"
    localized string "N169.32" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Zuletzt geöffnet"
    localized string "N169.38" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Hinzugefügt am"
    localized string "N169.33" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Größe"
    localized string "N169.34" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Version"
    localized string "N169.36" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Kommentare"
    localized string "N169.37" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Tags"
    localized string "VO15" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Immer in Listendarstellung öffnen"
    localized string "VO19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "In Listendarstellung blättern"
    localized string "FV2" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Symbolleiste einblenden"
    localized string "FV6" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Statusleiste einblenden"
    localized string "FV12" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Pfadleiste einblenden"
    localized string "FV13" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Seitenleiste einblenden"
    localized string "FV19" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Tableiste einblenden"
    localized string "FV23" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Vorschau einblenden"
    localized string "6.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Als Standard verwenden"
    localized string "974.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "974.title"
    localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Große Symbole"
    localized string "52.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Textgröße:"
    localized string "54.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Relatives Datum verwenden"
    localized string "65.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Alle Größen berechnen"
    localized string "41.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
        --> "Symbolvorschau einblenden"
    path to library folder from system domain as text
        --> "macOS:System:Library:"
    localized string "AXButton:AXCloseButton" from table "RoleDescriptions" in bundle file "macOS:System:Library:Frameworks:ApplicationServices.framework:Versions:A:Frameworks:HIServices.framework:Versions:A:Resources:"
        --> "Schließen-Taste"
end tell
tell application "System Events"
    set frontmost of process "Finder" to true
    get every window of process "Finder"
        --> {window "MesseHallen" of application process "Finder"}
    get subrole of window "MesseHallen" of application process "Finder"
        --> "AXStandardWindow"
end tell
tell application "Finder"
    open file "macOS:Users:nelson:Downloads:FileManagerLib_stuff copy:"
    get current view of window 1
        --> list view
    set bounds of window 1 to {50, 50, 1100, 600}
        --> {50, 50, 1100, 600}
    get name of alias "macOS:Users:nelson:Downloads:FileManagerLib_stuff copy:"
        --> "FileManagerLib_stuff copy"
end tell
tell application "System Events"
    set frontmost of process "Finder" to true
    get name of every menu item of menu 1 of menu bar item 5 of menu bar 1 of process "Finder"
        --> {"Als Symbole", "Als Liste", "Als Spalten", "als Galerie", missing value, "Gruppen verwenden", "Sortieren nach", "Aufräumen", "Auswahl aufräumen", "Aufräumen nach", missing value, "Seitenleiste ausblenden", "Vorschau einblenden", missing value, "Symbolleiste ausblenden", "Alle Tabs einblenden", "Tableiste einblenden", "Touch Bar anpassen …", "Control Strip anpassen …", "Pfadleiste einblenden", "Statusleiste ausblenden", missing value, "Symbolleiste anpassen …", missing value, "Darstellungsoptionen einblenden", "Vorschauoptionen einblenden", "Symbole vergrößern", missing value, "Vollbildmodus"}
    keystroke "j" using {command down}
    get name of window 1 of process "Finder"
        --> "FileManagerLib_stuff copy"
    get subrole of window 1 of process "Finder"
        --> "AXSystemFloatingWindow"
    get value of checkbox "Immer in Listendarstellung öffnen" of window 1 of process "Finder"
        --> 1
    get value of checkbox "In Listendarstellung blättern" of window 1 of process "Finder"
        --> 1
    exists pop up button "Sortiert nach:" of window 1 of process "Finder"
        --> true
    click pop up button "Sortiert nach:" of window 1 of process "Finder"
        --> pop up button "Sortiert nach:" of window "FileManagerLib_stuff copy" of application process "Finder"
    click menu item "Name" of menu 1 of pop up button "Sortiert nach:" of window 1 of process "Finder"
        --> menu item "Name" of menu 1 of pop up button "Sortiert nach:" of window "FileManagerLib_stuff copy" of application process "Finder"
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    exists pop up button "Arrange By:" of window 1 of process "Finder"
        --> false
    click pop up button "Arrange By:" of window 1 of process "Finder"
        --> error number -1728 from pop up button "Arrange By:" of window 1 of process "Finder"
Ergebnis:
error "„System Events“ hat einen Fehler erhalten: „pop up button \"Arrange By:\" of window 1 of process \"Finder\"“ kann nicht gelesen werden." number -1728 from pop up button "Arrange By:" of window 1 of process "Finder"

I tried to understand…

Borrowed from message #27 by Flavour

 
# Don't click [Open this Scriplet in your ] this is a log history
# Running Catalina in English
  localized string "6.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "6.title"
   localized string "974.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "974.title"
   localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "493.ibExternalAccessibilityDescription"
   localized string "52.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "52.title"
   (*text size:*)
   localized string "191.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "191.title"
   (*text size:*)
   localized string "101.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "101.title"
   (*text size:*)
   localized string "396.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "396.title"
   (*text size:*)
   localized string "54.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "54.title"
   localized string "65.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "65.title"
   localized string "41.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "41.title"
   (*Show icon preview*)
   localized string "402.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "402.title"
   (*Show icon preview*)
   localized string "104.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "104.title"
   (*Show icon preview*)
   localized string "205.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "205.title"
   (*Show icon preview*)


Running Catalina in German

   localized string "6.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Als Standard verwenden"
   localized string "974.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "974.title"
   localized string "493.ibExternalAccessibilityDescription" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Große Symbole"
   localized string "52.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Textgröße:"
   (*Textgröße:*)
   localized string "191.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Textgröße:"
   (*Textgröße:*)
   localized string "101.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Textgröße:"
   (*Textgröße:*)
   localized string "396.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Textgröße:"
   (*Textgröße:*)
   localized string "54.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Relatives Datum verwenden"
   localized string "65.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Alle Größen berechnen"
   localized string "41.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Symbolvorschau einblenden"
   (*Symbolvorschau einblenden*)
   localized string "402.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Symbolvorschau einblenden"
   (*Symbolvorschau einblenden*)
   localized string "104.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Symbolvorschau einblenden"
   (*Symbolvorschau einblenden*)
   localized string "205.title" from table "ViewOptionsWindow" in bundle alias "macOS:System:Library:CoreServices:Finder.app:"
       --> "Symbolvorschau einblenden"
   (*Symbolvorschau einblenden*)

As you may see, the triggered keys exist and have no English value available.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) jeudi 2 janvier 2020 09:28:50

I will help you little:

for English “6.title” (that is, Use as defaults) use German

click UI Element "Als Standard verwenden" of window 1 of application process "Finder"

for English 974.title (that is, Group by) use German

click menu item "Gruppen verwenden" of menu 1 of menu bar item "Darstellung" of menu bar 1 of application process "Finder"

for large icons size use universal

click radio button 2 of group 1 of window 1 of application process "Finder"

for English Use relative dates use German

click checkbox "Relatives Datum verwenden" of group 1 of window 1 of application process "Finder"

for Text size use universal

click pop up button 1 of group 1 of window 1 of application process "Finder"

for Calculate all sizes use universal

click checkbox 12 of group 1 of window 1 of application process "Finder"

Generally, all UI Elements of group 1 of window 1 of application process “Finder”:

– {static text “Symbolgröße:” of group 1 of window 1 of application process “Finder” of application “System Events”, button 1 of group 1 of window 1 of application process “Finder” of application “System Events”, button 2 of group 1 of window 1 of application process “Finder” of application “System Events”, radio button 1 of group 1 of window 1 of application process “Finder” of application “System Events”, radio button 2 of group 1 of window 1 of application process “Finder” of application “System Events”, static text “Textgröße:” of group 1 of window 1 of application process “Finder” of application “System Events”, pop up button “Textgröße:” of group 1 of window 1 of application process “Finder” of application “System Events”, static text “Spaltenanzeige:” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “iCloud-Status” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Änderungsdatum” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Erstellungsdatum” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Zuletzt geöffnet” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Hinzugefügt am” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Größe” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Art” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Version” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Kommentare” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Tags” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Relatives Datum verwenden” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Alle Größen berechnen” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Symbolvorschau einblenden” of group 1 of window 1 of application process “Finder” of application “System Events”, checkbox “Ordner „Library“ anzeigen” of group 1 of window 1 of application process “Finder” of application “System Events”}

As you can see, some UI Elements doesn’t have name at all. They doesn’t have even the properties:

{“Symbolgröße:”, missing value, missing value, missing value, missing value, “Textgröße:”, “Textgröße:”, “Spaltenanzeige:”, “iCloud-Status”, “Änderungsdatum”, “Erstellungsdatum”, “Zuletzt geöffnet”, “Hinzugefügt am”, “Größe”, “Art”, “Version”, “Kommentare”, “Tags”, “Relatives Datum verwenden”, “Alle Größen berechnen”, “Symbolvorschau einblenden”, “Ordner „Library“ anzeigen”}

Both posts are now deleted. Do NOT throw insults around on this forum or continue this personal quarrel.

In Finder’s resources, we may see:

in English.lproj High Sierra
InfoPlist.strings
Localizable.strings
ServicesMenu.strings
SimpleGrouping.strings
SlicesAttributeNameOverrides.strings
SlicesStrings.strings

in French.lproj High Sierra
AboutWindow.strings
AirDropCollectionView.strings
AirDropDiscoverableModePopoverView.strings
AirDropIconView.strings
AirDropInfoView.strings
AirDropLegacyModePopoverView.strings
AirDropNotAvailableView.strings
ArrangeByMenu.strings
BannerView.strings
BulkRenameWindow.strings
ClipWindow.strings
ColumnCellView.strings
ColumnPreview.strings
ColumnView.strings
DecryptionPasswordSheet.strings
FFKBrowserWindow.strings
FFKMenuBar.strings
GotoWindow.strings
GroupNameField.strings
ICloudNoDocumentsView.strings
iCloudQuotaBanner.strings
ICloudSetupView.strings
ICloudUpgradeView.strings
IconCollectionGroupHeaderView.strings

InfoPlist.strings
ListView.strings
Localizable.strings
NavChooseApp.strings
PreferencesWindow.strings
ProgressErrorView.strings
ProgressStatusView.strings
ProgressStatusView2Line.strings
SearchCriteriaSheet.strings
SearchForSlice.strings
SearchScopeSlice.strings

ServicesMenu.strings
SidebarView.strings
SimpleGrouping.strings
SlicesAttributeNameOverrides.strings
SlicesStrings.strings
StatusBar.strings
TagColumnTableView.strings
TagsPrefCellView.strings
Toolbar.strings
ViewOptionsWindow.strings

in en.lproj Catalina
InfoPlist.strings
Localizable.strings
ServicesMenu.strings
SimpleGrouping.strings
SlicesAttributeNameOverrides.strings
SlicesStrings.strings

in en_AU.lproj, en_GB, en.lpoj Catalina
AboutWindow.strings
AFPUserGroupSheet.strings
AirDropCollectionView.strings
AirDropDiscoverableModePopoverView.strings
AirDropIconView.strings
AirDropInfoView.strings
AirDropLegacyModePopoverView.strings
AirDropNotAvailableView.strings
AirDropProgressView.strings
ArrangeByMenu.strings
BackupVolumeBrowserWindow.strings
BannerView.strings
BulkRenameWindow.strings
Burn.strings
ChooseAppAccessoryView.strings
ClipWindow.strings
ColumnPreview.strings
ColumnView.strings
CompressionPasswordSheet.strings
ConnectToWindow.strings
DecryptionPasswordSheet.strings
EncryptionPasswordSheet.strings
GalleryCollectionView.strings
GotoWindow.strings
ICloudNoDocumentsView.strings
iCloudQuotaBanner.strings
ICloudSetupView.strings
ICloudUpgradeView.strings
IconCollectionGroupHeaderView.strings
IconCollectionView.strings

InfoPlist.strings
InfoWindowApplyToWindow.strings
InfoWindowBurningView.strings
InfoWindowCommentsView.strings
InfoWindowGeneralView.strings
InfoWindowMoreInfoView.strings
InfoWindowNameView.strings
InfoWindowOpenWithView.strings
InfoWindowPermissionsView.strings
InfoWindowPreviewView.strings
InfoWindowSimpleHeaderView.strings
InfoWindowTaggingHeaderView.strings
ListView.strings
LoadingView.strings

Localizable.strings
MenuBar.strings
NavChooseApp.strings
NavSaveSearch.strings
PBFNewMediaWindow.strings
PreferencesWindow.strings
PreviewOptionsWindow.strings
ProgressErrorView.strings
ProgressStatusView.strings
ProgressStatusView2Line.strings
SearchCriteriaSheet.strings
SearchForSlice.strings
SearchScopeSlice.strings

ServicesMenu.strings
SidebarView.strings
SimpleGrouping.strings
SlicesAttributeNameOverrides.strings
SlicesStrings.strings
StatusBar.strings
TagColumnTableView.strings
TaggingPopoverContentView.strings
TagsPrefCellView.strings
TagSuggestionsView.strings
Toolbar.strings
ViewOptionsWindow.strings

The .strings files unavailable in the default English.lproj (High Sierra), en.lproj (Catalina) are italicized. They are numerous ones.
The needed ViewOptionsWindow.strings is bolded-italicized in both cases.

If somebody know where are defined the strings unavailable in the default English.lproj (High Sierra) or en.lproj (Catalina) I would be glad to get the info.

On the other hand, as we saw before, the organization of the UI may vary from one system to an other.
Here, radio buttons which where in a radio group of group 1 in High Sierra are directly in group 1 in Catalina.
Relying upon UI elements indexes is not guaranteed to be stable.
This is why I choose to trigger these elements by their name when they have one.
When they haven’t - radio buttons - I use the item description to be sure that I trigger the correct one.
Just matter of safety.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) jeudi 2 janvier 2020 11:18:18

You don’t understand. Some UI Elements doesn’t have name at all. And they have not properties too, so you can’t use item description. So, like you or not you should use indexes for them. And, using the names instead of the indexes doesn’t increase the safety. For example, when the hierarchy of UI elements changes from system to system.

Instead, it is best to implement the maximum number of functions (that can be implemented) without GUI scripting.

You can set without GUI scripting:

  1. calculates folder sizes
  2. icon size
  3. show icon preview
  4. sort column
  5. text size
  6. uses relative dates

I will get you once again the starting point, without third-party software:


property pathList : {}

tell application "Finder" to set aFolders to (selection) as alias list
repeat with aFolder in aFolders
	my get_All_Folders_of_Folder(aFolder)
end repeat

tell application "Finder"
	activate
	repeat with aFolder in the pathList
		open aFolder
		tell container window of folder aFolder
			set current view to list view
			set statusbar visible to true
			tell its list view options
				set s to its properties
				set its calculates folder sizes to true
				set its icon size to large icon
				set its shows icon preview to true
				set its sort column to column id name column
				set sort direction of sort column to normal
				set width of sort column to 600
				set its text size to 12
				set its uses relative dates to true
			end tell
		end tell
		delay 5 -- only to see what we doing
		close window 1
	end repeat
end tell


on get_All_Folders_of_Folder(aFolder)
	tell application "System Events"
		--Check each of the files in this disk/folder
		set foldersList to every folder of aFolder
		set the end of pathList to (path of aFolder)
		if foldersList is not {} then
			repeat with aFolder in foldersList
				my get_All_Folders_of_Folder(aFolder)
			end repeat
		end if
	end tell
end get_All_Folders_of_Folder

Really simple.

In High Sierra, Arrange By: is defined in two resources:
Organiser par N148 Arrange By SSD 1000:System:Library:CoreServices:Finder.app:Contents:Resources:French.lproj:Localizable.strings
Organiser par : 974.title ENGLISH KEY UNAVAILABLE SSD 1000:System:Library:CoreServices:Finder.app:Contents:Resources:French.lproj:ViewOptionsWindow.strings

I used the key 974.title which appears to be unavailable in Catalina.
Happily, the key N148 is available but not in the en.lproj

You may check that with this script:

set theBundle to path to application "Finder" --> an alias

set aKey to "N148"
set arrangeBy_loc to localized string aKey in bundle theBundle
--> "Gruppieren nach"
--> "N148"
if arrangeBy_loc = aKey then set arrangeBy_loc to "Arrange By:"
log arrangeBy_loc
--> "Gruppieren nach"
--> "Arrange By"

set aKey to "974.title"
set arrangeBy_loc to localized string aKey from table "ViewOptionsWindow" in bundle theBundle
--> "974.title"
--> "974.title"
-- In English, the resource isn't available -> "974.title". Define it here.
if arrangeBy_loc = aKey then set arrangeBy_loc to "Arrange By:"
log arrangeBy_loc
--> "Arrange By:"
--> "Arrange By:"

The Key “N148” is usable in both systems.

Message #16 is modified accordingly.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) jeudi 2 janvier 2020 12:58:36

Thanks to both of you!

Yvan can you tell me where and how to you find the localized strings?

I ran the script under HighSierra (Eng&Ger) and under Catalina (Eng & Ger).
In both systems I got the same error like in post #33

May I should activate Arrange by:kind manually with the keystrokes…
I can’t understand why it doesn’t work when none (german: ohne) is set.
It would be so great if the script does what we (in that case I) want.

But it is interesting to see how things work (or not) and to learn a lot in this forum.
Thanks for that! :slight_smile: