Cannot convert m4a files to m4b with AppleScript I use Make Bookmarkable to convert some audio files to the m4b bookmarkable format. However, since macOS High Sierra, there is a problem when running the script with a batch of files.

tell (add loc) raises --&gt; error number -1700 that number -1700 can't be converted to item

The conversion does happen but then stops executing, meaning files have to be converted one by one. I'm not not familiar with AppleScript but suspect that the problem maybe because of changes in iTunes.
mp4, m4a, and m4b are alternative filename extensions for the MPEG-4 Part 14 container format. To "convert" an m4a file to m4b, just rename the file. That's what the script you linked to also does.

The option to remember the previous playback position in iTunes is enabled by default for files with an m4b extension but not for files with an m4a extension, but it can just as well be enabled for files with an m4a extension, so they are not any less "bookmarkable". Just check the "Remember playback position" checkbox from the "Options" tab in the information window. (I think old versions of iTunes didn't have that checkbox, which is probably why the script you linked to was originally created.)

iTunes also displays m4b files under audiobooks by default, but an m4a file can be listed as an audiobook by setting "media kind" to "Audiobook" in the "Options" tab of an information window.

Edit: the script below renames the files of the tracks selected in iTunes and changes the bookmarkable and media kind properties.

tell application "iTunes"
    repeat with t in (get selection)
        set bookmarkable of t to true
        set media kind of t to audiobook
        set l to location of t
        tell application "Finder"
            set f to file l
            set name of f to (text 1 thru -2 of (get name of f)) &amp; "b"
        end tell
    end repeat
end tell