I would do something like the following (may need to tweak a bit):
repeat CurrentDoc in OpenDocList
tell application "Adobe Illustrator"
active -- the current doc
save current document in file finalPath as Illustrator -- make sure to have full file path including file extension.
close -- if wanted
end tell
end repeat
Was a quick glance and don't see the extension in final path variable. Also Kind of weird to see activate after the save.
Update 4/23
Here is your loop, didn't have time to debug
tell application "Adobe Illustrator"
activate
set WindowList to name of documents --List of every open documents name
repeat with CurrentWindow in WindowList
open aFile
set theName to name of current document
set theNamecount to count of theName
set theOutdatedPathObj to the file path of current document
set thePath to (POSIX path of theOutdatedPathObj) as string
set pathCount to count of thePath
set pathCount to (pathCount - theNamecount)
set newPath to (text 1 thru pathCount of thePath)
tell document 1
set docColorSpace to color space
if (docColorSpace is CMYK) then
set SpotColor1 to {cyan:21.0, magenta:0, yellow:100.0, black:0.0}
set SpotColor2 to {cyan:11.0, magenta:100, yellow:30.0, black:0.0}
set SpotColor3 to {cyan:0.0, magenta:0, yellow:0.0, black:100.0}
else
set SpotColor1 to {red:206.0, green:219.0, blue:41.0}
set SpotColor2 to {red:215.0, green:23.0, blue:111.0}
set SpotColor3 to {red:35.0, green:34.0, blue:33.0}
end if
make new spot with properties {name:"Highlight White", color type:spot color, color:SpotColor1}
make new spot with properties {name:"Under Base", color type:spot color, color:SpotColor2}
make new spot with properties {name:"Spot Black", color type:spot color, color:SpotColor3}
end tell
try
if theName contains "back" then
set newName to JobName & "_FB"
else
if theName contains "front" then
set newName to JobName & "_FF"
set finalPath to newPath & newName
(save current document in file finalPath as Illustrator) -- make sure finalPath looks like this (... folder:folder:Filename.ai) Name extension is important
end if
end if
end try
end repeat
end tell