In thread
I wanted to use the user domain object folders in a list.
tell application “System Events”
set user_art_folder to {documents folder, pictures folder, public folder, sites folder, music folder}
repeat with i from 1 to number of items in user_art_folder
set this_folder to path of (item i of user_art_folder) .
So far so good
But for some reason when calling each item of the list in to a repeat loop, the script could not deal with getting the music folder
unless I added of user domain after it in the list??
tell application “System Events”
set user_art_folder to {documents folder, pictures folder, public folder, sites folder, music folder of user domain}
repeat with i from 1 to number of items in user_art_folder
set this_folder to path of (item i of user_art_folder) .
Is this a bug or am I tired and just missing something
it’s the same here, I regard it as a bug, but you can work around the problem with
set user_art_folder to {path to documents folder, path to pictures folder, path to public folder, path to sites folder, path to music folder}
tell application "System Events"
repeat with i from 1 to number of items in user_art_folder
set this_folder to path of (item i of user_art_folder)
.
or do it this way
tell application "System Events"
tell user domain
set user_art_folder to {documents folder, pictures folder, public folder, sites folder, music folder}
repeat with i from 1 to number of items in user_art_folder
set this_folder to path of (item i of user_art_folder
.