Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a sokoban solver in Perl and would like to move the storekeeper around in the GUI. I have the KDE-Version of Sokoban that came with RH7.1. So how do I get a function that will signal to the server or something that the mouse has moved or something. I want to call this fn like mmove(21,21,rclick) or something like that and the storekeeper should move. It would be great without the mouse moving all over the screen. But it's ok if it does. Don't flame me too hard.My first q.

Replies are listed 'Best First'.
Re: mouse trouble
by patgas (Friar) on Oct 09, 2001 at 22:42 UTC

    I'm not familiar with hacking KDE, so I can't offer you any specific advice, but I'd suggest that it would be easier to use Perl to open up the files that store the puzzles and read them to get your data, rather than try to control the GUI itself. Once you have the data, it's just a matter of manipulating it and figuring out a way to print directions on how to solve the puzzle. Hope that helps.

    "We're experiencing some Godzilla-related turbulence..."

      Er yeeessss... but this seems to be a GUI problem. There is no way to signal to an app that the mouse ran over it from a script without actually moving the mouse. So how do u move the mouse pointer from software i.e a script rather than thru hardware i.e actually moving it. I want to do this as a small example style solving and don't have the energy to hack the sokoban source which is in major C++. So is there a way this bang can be done. I mean press M-23-45 and say have the mouse pointer move there. Windows has the mousekeys as an aceesibility feature and mebe that can be hacked but what about KDE or Gnome. Could u tell me a newsgroup or something to ask this q on? Thanks