I hope that I forgot nothing.
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use script "FileManagerLib" version "2.3.3"
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
property forYK : false
-- set false for Flavour
-- set true for Yvan Koenig
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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 :"
property none_loc : "" --> "Aucun"
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
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
if (system attribute "sys2") < 15 then
-- Here under Mojave or older system
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:"
log o's arrangeBy_loc --> "Arrange By:"
else
-- Here under Catalina or higher
set aKey to "VO26" -- it's the letter O, not the digit 0
set o's arrangeBy_loc to localized string aKey in bundle theBundle --> "Grouper par :" (Catalina)
log o's arrangeBy_loc --> "Group By:"
end if
-- CAUTION, now, some strings whose English spelling isn't reachable in resources
-- the log instruction allow us to check that the special case is correctly treated
-- below we display what we get whe the system speak English
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"
-- log o's useAsDefaults_loc --> "Use as Defaults"
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"
-- log o's largeSizeIcons_loc --> "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:" -- OK
-- log o's textSize_loc --> "text size:"
(*
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:" -- OK
-- log o's textSize_loc --> "text size:"
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:" -- OK
-- log o's textSize_loc --> "text size:"
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:" -- OK
-- log o's textSize_loc --> "text size:"
*)
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"
-- log o's useRelativeDates_loc --> "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"
-- log o's calculateAllSizes_loc --> "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" -- OK
-- log o's showIconPreview_loc --> "Show icon preview"
(*
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" -- OK
-- log o's showIconPreview_loc --> "Show icon preview"
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" -- OK
-- log o's showIconPreview_loc --> "Show icon preview"
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" -- OK
log o's showIconPreview_loc --> "Show icon preview"
*)
set aKey to "14.title"
set o's none_loc to localized string aKey from table "ArrangeByMenu" in bundle theBundle
-- In English, the resource isn't available -> "14.title". Define it here.
if o's showIconPreview_loc = aKey then set o's showIconPreview_loc to "none" -- OK
log o's none_loc --> "none"
-- 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"
(* 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 -- to treat also the choosed folder
set nbFolders to count theFolders
-- 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
tell window 1
if its current view is not list view then set its current view to list view
set its bounds to {50, 50, 1100, 600}
end tell
-- 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)
-- Now the folder window is available in List view
-- so we may define the columns widths, and the sidebar one
-- I apologize I don't know how to rule the columns ordering
tell window 1 -- we are back to the folder window
set width of column id name column of its list view options to 200
set width of column id modification date column of its list view options to 150
set width of column id kind column of its list view options to 100
if forYK then
set width of column id size column of its list view options to 100
else
set width of column id size column of its list view options to 150
end if
set its sidebar width to 150 -- We know that it's visible
end tell
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
-- work with the menu items
tell menu bar 1 -- its the folder window
-- name of menu bar items --> {"Apple", "Finder", "Fichier", "Édition", "Présentation", "Aller", "Fenêtre", "Aide"}
set viewMenu to 5
-- name of menu bar item viewMenu --> "Présentation"
tell menu bar item viewMenu to tell menu 1
set menuItems to name of menu items --> {"Par icônes", "Par liste", "Par colonnes", "Sous forme de Cover Flow", missing value, "Aligner", "Aligner la sélection", "Aligner par", "Organiser par", "Trier par", missing value, "Masquer la barre d’onglets", "Masquer la barre du chemin d’accès", "Masquer la barre d’état", "Afficher la barre latérale", "Masquer l’aperçu", missing value, "Masquer la barre d’outils", "Personnaliser la barre d’outils…", missing value, "Afficher les options de présentation", missing value, "Activer le mode plein écran"}
if menuItems contains o's showSidebar_loc then
log "side bar is hidden, must clik menu item : " & (o's showSidebar_loc)
click menu item (o's showSidebar_loc)
end if
-- log "now, side bar is visible"
if menuItems contains o's showStatusBar_loc then
log "status bar is hidden, must click menu item : " & (o's showStatusBar_loc)
click menu item (o's showStatusBar_loc)
end if
--log "now, status bar is visible"
-- Ready to rule other features
(*
if menuItems contains o's showToolbar_loc then
log "tool bar is hidden, must clik menu item : " & (o's o's showToolbar_loc)
click menu item (o's o's showToolbar_loc)
end if
-- log "now, tool bar is visible"
*)
(*
if menuItems contains o's showPathBar_loc then
log "path bar is hidden, must clik menu item : " & (o's showPathBar_loc)
click menu item (o's showPathBar_loc)
end if
-- log "now, path bar is visible"
*)
(*
if menuItems contains o's showTabBar_loc then
log "tab bar is hidden, must clik menu item : " & (o's showTabBar_loc)
click menu item (o's showTabBar_loc)
end if
-- log "now, tab bar is visible"
*)
(*
if menuItems contains o's showPreview_loc then
log "preview is hidden, must clik menu item : " & (o's showPreview_loc)
click menu item (o's showPreview_loc)
end if
-- log "now, preview is visible"
*)
end tell -- menu bar…
end tell
-- 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"}
*)
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)
(*-- Re-introduce the setting of "Arrange By:" thru the pop up menu
repeat 20 times -- loop for safe but here the pop up is always available at first pass
if exists pop up button (o's arrangeBy_loc) then exit repeat
delay 0.2
end repeat
*)
set popupNames to name of pop up buttons
set arrangeBy to ""
repeat with i from 1 to count popupNames
if item i of popupNames starts with (o's arrangeBy_loc) then
set arrangeBy to item i of popupNames
exit repeat
end if
end repeat
if forYK then
set myArrange to (o's none_loc)
else
set myArrange to (o's kind_loc)
end if
tell pop up button arrangeBy
click it
name of menu items of menu 1
--> --> {"Nom", "Type", "Application", "Date de dernière ouverture", "Date de l’ajout", "Date de modification", "Date de création", "Taille", "Tags", missing value, "Aucun"}
--> {"Name", "Kind", "Application", "Date Last Opened", "Date Added", "Date Modified", "Date Created", "Size", "Tags", missing value, "None"}
click menu item myArrange of menu 1 # "Organiser par : Type" (High Sierra),"Grouper par : Type" (Catalina) or "Arrange By: Kind"
end tell # pop up button arrangeBy
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
-- 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"}
-- 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
if forYK then
set mySize to (o's smallSizeIcons_loc)
else
set mySize to (o's largeSizeIcons_loc)
end if
repeat with i from 1 to count radioDescriptions
if item i of radioDescriptions is mySize then
if value of radio button i is 0 then
click radio button i -- active the wanted size
exit repeat
end if
end if
end repeat
end tell -- radio group 1
else
-- 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"}
-- 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
if forYK then
set mySize to (o's smallSizeIcons_loc)
else
set mySize to (o's largeSizeIcons_loc)
end if
repeat with i from 1 to count radioDescriptions
if item i of radioDescriptions is mySize then
if value of radio button i is 0 then
click radio button i -- activate the wanted size
exit repeat
end if
end if
end repeat
end if
tell pop up button 1 (*
its name --> "Taille du texte :"
title of menu items of menu 1 --> {"10", "11", "12", "13", "14", "15", "16"}
*)
if forYK then
set mySize to "10"
else
set mySize to "14"
end if
if its value is not mySize then
click it -- reveal the menu items
click menu item mySize of menu 1
end if
end tell -- pop up button 1
-- Here the iCloudStatus checkbox is greyed so its value is NEVER 1
if forYK then
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 0 then click checkbox (o's dateCreated_loc) -- check 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 0 then click checkbox (o's dateAdded_loc) -- check 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 0 then click checkbox (o's tags_loc) -- check it
if value of checkbox (o's useRelativeDates_loc) is 1 then click checkbox (o's useRelativeDates_loc) -- uncheck it
if value of checkbox (o's calculateAllSizes_loc) is 1 then click checkbox (o's calculateAllSizes_loc) -- uncheck it
if value of checkbox (o's showIconPreview_loc) is 0 then click checkbox (o's showIconPreview_loc) -- check it
else
-- pour Flavour
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 if
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
Please, let me know how it behaves for you.
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) dimanche 29 décembre 2019 20:06:18
Of course, I prove to be unable to leave a script untouched for more than one hour.
I removed most of the direct use of indexes of UI elements to take care of possible changes in the GUI.
It’s quite easy now than I am able to grab easily the localized name or description of these objects.
Added a new if - then - else block to take care of changes in the radio buttons locations.
Edited the English strings {“small icon size”, “large icon size”}
The keys “49.ibExternalAccessibilityDescription” and “48.ibExternalAccessibilityDescription” used for localization are not available under Catalina.
We must use “491.ibExternalAccessibilityDescription” and “493.ibExternalAccessibilityDescription”
Added several new features :rolleyes:
As I can’t test under Catalina, I dropped the use of the shortcut cmd + ctrl + 2 and re-inserted the code triggering the pop up “Arrange By:”
We must test the operating system for “Arrange by:”
Under Mojave or higher,
localized string “974.title” from table “ViewOptionsWindow”
return the correct value “Organiser par :” in French but return “974.title” when the system run in English
Under Catalina the key “974.title” doesn’t exist. We must use
localized string “V026”
which return a new string “Group By:” (“Grouper par :” in French)
Corrected a typo. “VO26” with the letter “O” was spelled “V026” with the digit “0”