... or is documentation wrong? Doco says
Boolean AddButton(Integer id, String title)
Adds a button to the screen identified by the title and ID provided. The buttons are at the bottom of the dialog and appear in the order added. When the button is pressed, the script will receive an event from the application indicating the ID of the button pressed.
...
Boolean SetFocusedMenuItem(Integer item)
Set a button id to highlight. Default is the first button. Return true if successful.
It reads clear - you add buttons by ID, you change focus by ID. But the SimpleInfo example contradicts:
infomenu.addbutton(1,"button 1")
infomenu.addbutton(2,"button 2")
infomenu.addbutton(4,"exit")
infomenu.setfocusedmenuitem(2) ' 3rd button
By documentation (and seems logical) when you say focus=2, the focus should go to the 2nd button with ID=2 but instead it goes to the 3rd button with ID=4?