I'm stuck. I need a script that will read my text document and insert custom text on the 34 character. This needs to happen for every line in my text document.
Example:
INPUT TEXT
`12345678912345678912345678912345 ABCD`
`12345678912345678912345678912345 EFGH`
`12345678912345678912345678912345 IJKL`
`12345678912345678912345678912345 MNOP`
OUTPUT TEXT
`12345678912345678912345678912345 custom text hereABCD`
`12345678912345678912345678912345 custom text hereEFGH`
`12345678912345678912345678912345 custom text hereIJKL`
`12345678912345678912345678912345 custom text hereMNOP`
I've provided below the script I can get working within Terminal. However, if there is a way to get it to work in Applescript so when I drop my file on the application it will prompt and ask what text I would like to insert (this would be "custom text here") and then upon hitting OK it would run.
If it isn't possible to do in Applescript, Automator would work too however, I cannot seem to get Automator to work with the script. Process for Automator is:
1. Get Specified Finder Items
2. Run Shell Script
This runs fine, but it does not change the document. Help?