nice trick !
somehow a meta function - a script that allows a standard interaction with the GUI.
so, one could link Shift-F2 to an analogous jsl code which triggers a keystroke sequence via the right-click context menu *) to open the script editor ;- )
to close the circle: F2 works as well for table scripts: to rename the selected Table Script.
So, more than enough ways to change the name of the table script.
*) something like the below code, but with control for the right click popup menu ...
VK_APPS = Hex To Number("5D"); // Windows Application / Context Menu key
VK_DOWN = Hex To Number("28"); // Arrow Down — navigate menu items
VK_RETURN = Hex To Number("0D"); // Enter
KEYUP = Hex To Number("02");
dll << keybd_event(VK_APPS, 0, 0, 0);
dll << keybd_event(VK_APPS, 0, KEYUP, 0);
Wait(0.3); // wait for context menu to appear
// Navigate to 2nd menu item (2x arrow down - unfortuntely: no effect, keybd_event is too old)
dll << keybd_event(VK_DOWN, 0, 0, 0);
dll << keybd_event(VK_DOWN, 0, KEYUP, 0);
Wait(0.05);
dll << keybd_event(VK_DOWN, 0, 0, 0);
dll << keybd_event(VK_DOWN, 0, KEYUP, 0);
Wait(0.05);
dll << keybd_event(VK_RETURN, 0, 0, 0);
dll << keybd_event(VK_RETURN, 0, KEYUP, 0);