Only thing I can think of is trial and error test the script:
leave out all but the 1st line of the script part below and then run the script, see what it does.
Then add the second one and so on. I added some descriptions, so you know what to expect
Test this with these lines:
sk "^s"
Opens the SAVE dialog
sk "{TAB 3}"
Presses TAB 3 times to get to where you input the modelname
sk "{BS 3}"
Deletes the last 3 charactes (PRT)
sk "drw"
Writes DRW at the end of the modelname
sk "+^{left}"
Sends CTRL + SHIFT + LEFT to select the entire name, By now I think qou'll most likely have already stumbled upon the problem...
sk "^c"
Opens CTRL + C to copy the name
sk "^a"
Aborts saving a file
sk "^o"
Opens the OPEN dialog
sk "^v"
Pastes the copied modelname
sk "~"
Confirms opening the model
Let me know where the error occurs ....
Good luck!