Today, I encountered a bug in AppleScript. Below is a script I use to choose a wallpaper from my Wallpaper folder and set it as my wallpaper. I have another script like this for uninstalling apps, which sets the 'choose file' in my Applications folder. When I run that script and then this one, the location is not in my Wallpaper folder like it should.
Long story short, when I use 'choose file' in the Script Editor, the Finder dialog does not go to the folder I specified, but to the last folder I visited there. is there any way I might fix this?
try
tell application "Finder"
set myWallpaper to choose file of folder "Macintosh HD:Users:Squiddy22
ictures:Wallpaper:"
set desktop picture to myWallpaper
end tell
end try
Long story short, when I use 'choose file' in the Script Editor, the Finder dialog does not go to the folder I specified, but to the last folder I visited there. is there any way I might fix this?
try
tell application "Finder"
set myWallpaper to choose file of folder "Macintosh HD:Users:Squiddy22
set desktop picture to myWallpaper
end tell
end try