gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

OffTopic > Designing tools for scriptability

#119798 - tepples - Mon Feb 26, 2007 1:09 pm

Regarding command line vs. GUI apps, here's one thing that not enough developers have tried:

If your program has both a GUI mode and a command line mode, then when the program is opened in GUI mode, keep a list of the equivalent command-line functions that the player can open and copy into a batch file.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.


Last edited by tepples on Mon Feb 26, 2007 7:52 pm; edited 1 time in total

#119824 - sgeos - Mon Feb 26, 2007 6:43 pm

A text field that lists history as the equivalent command line operations? Ingenious. I never would have thought of that.

-Brendan

#119830 - tepples - Mon Feb 26, 2007 7:45 pm

Mac OS classic versions 7 through 9 supported something very similar. A developer would refactor an application into a front-end and a back-end, connected by high-level events routed through the system's event manager, and the back-end would expose an event object model to script interpreters. An app could call an event manager function to record high-level events, and the event manager would output a script in the AppleScript language that would generate the same high-level events. Running this script in the AppleScript interpreter would replay what the user did.

Mac OS X's Cocoa toolkit has even deeper support for back-end object models and AppleScript programming.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.


Last edited by tepples on Mon Feb 26, 2007 7:48 pm; edited 1 time in total

#119831 - keldon - Mon Feb 26, 2007 7:48 pm

I thought that was how the old windows recorder worked.

#119832 - tepples - Mon Feb 26, 2007 7:52 pm

It depends on the object models that the apps support.

At one level, there is "Click at (x, y), click at (x, y)".
At the next level, there is "From the first menu, choose the fourth item".
At the next level, there is "Save the document". The existence of a "document" that can be "saved" is part of an object model.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#119851 - sgeos - Mon Feb 26, 2007 9:57 pm

The command line doesn't care about menus. The GUI menus and the command line facilities need to be tied to the same service API.

EDIT: As do shortcut keys.

-Brendan