Writing a script to modify a date in a title block

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
AutoCAD Mechanical, 2018.
I'm going through it all on the command line before putting it into a script. Obviously trying to do it all via keyboard as mouse-clicks don't work in a script.
-ATTEDIT [ENTER]
Edit attributes one at a time?: Y [ENTER]
Enter block name specification: ASI MECH TB [ENTER]
Enter attribute tag specification: DATE [ENTER]
Enter attribute value specification: * [ENTER]
Select attributes
I can't type anything at this point. It will allow me to mouse-click on the date attribute in the title block, but not on anything else. It clearly knows that I'm after the DATE, since it's the only thing it will allow me to click on, but it still requires me to click on it. After I click it, I can use the keyboard for the rest, to choose replace, and modify the value.
I found this script on the forums in response to an almost identical question, but it doesn't work.
; This script will change to the WD_TB attribute ; of a Title Block. Follow the instructions in ; comments below. I suggest you turn off Word ; Wrap (Format > Word wrap). -attedit n n ; Change this line to the name of the Title Block TITLE_BLOCK WD_TB ; Change this line to match the value stored in the WD_TB attribute. AAA ; This is the new value you want. BBB QSAVE
Bonus question: I'd like to modify the first four characters of the drawing # attribute. One of them, for example, is 1683ME-TT117. I want to change the first four numbers to 1713, but keep everything else the same. There are about fifty drawings, with different drawing numbers. For instance there's also 1683ME-TT146. Is there any way to modify only those first 4 digits? Maybe set the cursor at the start of the line, activate delete 4 times, and add 1713?
Thanks a ton for any help!