holatuwol
Developer
Or alternatively, have ASH create a window listener, attach the listener to whatever window is holding the CLI (and have the listener automatically detach itself as soon as it's run), and ASH will block while polling the listener until something's been entered and return a value once it sees something.First off, the event is fired when the main KoLmafia window gains focus.
That might work.
That leaves us with the second, less obvious problem. Every dialog box has a cancel option. It's pretty obvious how it should be handled in a user_confirm, but how should this be handled in a user_input? Return something like $item[none]?
Once I'm done butchering chat (yeah, I'm still working on it sporadically), I'll try reworking KoLmafia to use this strategy internally for all dialog boxes. If everything checks out, I'll consider adding user_input if you guys come up with your preference on the second issue.
Last edited: