views:

25

answers:

1

I'm running PyS60 on a Nokia N95 phone, and I want to find a way of having my script interact with an application running in the background.

I found this http://wiki.forum.nokia.com/index.php/How_to_simulate_a_keypress_in_PyS60 .. but it doesn't mention anything about sending the keypresses to a specific target.

The reason I want to do this is because I need to use the functionality of another piece of software, and I want to avoid having to go through the menus and setting it up each time I start it, so I want to have it started by my python script and have it automatically set up the program.

I wanted to do something similar to what scanscrobbler does but avoid having to set it to 1D barcode scanning mode each time.

If I can't open the application in the background and automate the setup while it's hidden, would it be possible to send the keypresses to it when it is the active program? If so, is there some event I can listen for to know when the application has fully loaded?

Is this possible? Is there another way I could approach this?

+1  A: 

You could use apptools to switch to a specific applications and then use the keypress module to emulate key presses.

zoli2k
Would switching to the application always involve the application becoming visible? Or does it allow you to send keypresses to the application without the user seeing it? (Thanks for the link by the way, looks really useful!)
Acorn