How do you make Ruby API press "enter"?



In the middle of my Ruby script, one of the commands will make a prompt come on to the screen were you have to click “ok” to continue. I don’t want the user to have to do this, so is there a way to make the API send the “enter” key?


In a word, no. You could probably fake it with an external utility that simulates keypress input to an app, but the Ruby API provides no such. However, this begs the question: what is your script doing that raises a window that requires user input? Couldn’t you choose a different mechanism? Perhaps you could upload a code snippet that illustrates where the issue happens…


Cross-platform solution is to make a little UI::WebDialog that gets closed with a UI.start_timer if it is still visible when the time runs out.


comment it out and see if the script breaks…

as it seems you haven’t written it, what was the authors original purpose?

it may be needed to ‘break’ asynchronous loading of the next ruby method…