I’m building an app that part of its function requires the moving of files. I want to show the user a progress bar while the file transfer is taking place. I can get it to do the barber pole thing but I want it to be a percentage representation of # of files moved of total files. One line of code doesn’t compile and I can’t figure out why. Any help would be appreciated.
Here’s the line:
set content of progress indicator “progressBar” to progressChange
and the error that gets generated:
/Users/steve/Desktop/photoMonkey/addRow.applescript:53: A identifier can’t go after this identifier. (-2740)
Here’s the relevant snippet of code:
--show status and progress bar
set contents of text field "status" of window "addWin" to "Transferring files from " & thisFolder & " to application's temp folder."
set visible of progress indicator "progressBar" of window "addWin" to true
set uses threaded animation of progress indicator "progressBar" of window "addWin" to true
set indeterminate of progress indicator "progressBar" of window "addWin" to false
start progress indicator "progressBar" of window "addWin"
--move image files to temp folder
repeat with thisFile in thisFolderList
if thisFile does not start with "." then
--set the path to the file
set thisFilePath to (thisFolder as string) & thisFile as alias
tell application "Finder"
--make sure it's the right type of file
set thisFileInfo to info for thisFilePath
--get the file's kind
set thisFileKind to kind of thisFileInfo
--move only the image files
if fileTypeList contains thisFileKind then
set progressChange to progressChange + (100 / fileCount)
(*THIS LINE WON'T COMPILE*)
set content of progress indicator "progressBar" to progressChange
copy file thisFilePath to folder tempFolder
end if
end tell
end if
end repeat