You Are Here:

Community: Developer Discussion Boards

#1 Old Control SIS application from python - 2008-09-25, 14:09

Join Date: Sep 2008
Posts: 3
jdvm
Offline
Registered User
Hi there,

I wonder if python is able to control an application running on the device.
Maybe someone could script this for me: every 10 seconds the D-pad center button is 'pressed' by python in irRemote, so that every 10 seconds it sends an infrared signal.
Is this possible? Maybe by emulating a keypress?
Thanks,
Jurrian
Reply With Quote

#2 Old Re: Control SIS application from python - 2008-09-25, 14:15

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
Hi,

Yes, that should be possible using the keypress module to simulate keypresses. That thread contains the download links and a simple example.
Reply With Quote

#3 Old Re: Control SIS application from python - 2008-09-25, 14:28

Join Date: Sep 2008
Posts: 3
jdvm
Offline
Registered User
Sorry for being n00b, but I can't write python.
Could you write it for me? Just every 20 seconds a keypress for the center button in irRemote.
Thanks in advance,
Jurrian
Reply With Quote

#4 Old Re: Control SIS application from python - 2008-09-25, 14:40

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by jdvm View Post
Sorry for being n00b, but I can't write python.
Could you write it for me? Just every 20 seconds a keypress for the center button in irRemote.
Thanks in advance,
Jurrian
hi jdvm
if you cant write it is not at all difficult for you to write a one. Have a look at the following sites i am giving you and i believe that you can write a application in python after following those sites.

Mobapps
Forum Nokia python Wiki

Enjoy Pythoning
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Last edited by gaba88 : 2008-09-25 at 14:49.
Reply With Quote

#5 Old Re: Control SIS application from python - 2008-09-25, 14:45

Join Date: May 2007
Posts: 2,737
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by gaba88 View Post


The link doesn't seem to work ! May be there is an extra 'p'
Reply With Quote

#6 Old Re: Control SIS application from python - 2008-09-25, 14:48

Join Date: Jul 2008
Posts: 103
ck.umraliya's Avatar
ck.umraliya
Offline
Forum Nokia Champion
Quote:
The link doesn't seem to work
hi
you can follow the signature link of Gaba88
Last edited by ck.umraliya : 2008-09-25 at 14:49. Reason: missing
Reply With Quote

#7 Old Re: Control SIS application from python - 2008-09-25, 14:52

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by croozeus View Post


The link doesn't seem to work ! May be there is an extra 'p'
hi pankaj and chintan
thanks for letting me know that. There was a typo from myside
i have edited the post.Now its working fine

@jdvm Ya chintan is correct you can follow my signature also

Enjoy Pythoning
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#8 Old Re: Control SIS application from python - 2008-09-25, 14:53

Join Date: Sep 2008
Posts: 3
jdvm
Offline
Registered User
Even after visiting the links you provided, I really do not thing I'm going to be able to write this. Maybe one of the python-pro's is able to write this for me? I would be very grateful.
Thanks,
Jurrian
Reply With Quote

#9 Old Re: Control SIS application from python - 2008-09-25, 14:59

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by jdvm View Post
Even after visiting the links you provided, I really do not thing I'm going to be able to write this. Maybe one of the python-pro's is able to write this for me? I would be very grateful.
Thanks,
Jurrian
hi
sorry that the links were not helpful. But if you are really not interested you can contact some developers personally.

Hope this helps
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#10 Old Re: Control SIS application from python - 2008-09-25, 15:03

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
Well, here it is:
Code:
import keypress, appuifw, e32, appswitch
from key_codes import *


#Define the exit function
app_lock=e32.Ao_lock()
def quit():
	global running
	running=0
	app_lock.signal()
	appuifw.app.set_exit()
appuifw.app.exit_key_handler=quit

#Simulate pressing the "select" key every 10 seconds
running=1
while running:
	e32.ao_sleep(10)
	if(appswitch.fg_appname()==u"irRemote"):
		keypress.simulate_key(EKeySelect, EScancodeSelect)

app_lock.wait()
Some important notes:

*Your script shell has to be signed with the SwEvent capability to simulate keypresses. So download PythonScriptShell_1_4_2_3rdEd_unsigned_freedevcert.SIS from here and open sign it at www.symbiansigned.com with all capabilities.

*You will also need appswitch for checking the name of the app that is currently in the foreground. Remember you have to sign appswitch and keypress at symbiansigned.com as they are unsigned.

*You can also tweak this code to suit your needs. Like the interval between key presses. Make sure the name of the app is actually irRemote, otherwise it might not work.

Oh, and here's another link that might help you learn Python if you're interested: www.croozeus.com
Reply With Quote

#11 Old Smile Re: Control SIS application from python - 2008-09-25, 15:04

Join Date: May 2007
Posts: 2,737
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by jdvm View Post
Maybe one of the python-pro's is able to write this for me? I would be very grateful.
Hi Jurrian,

Its very simple,

Code:
while True:
    e32.ao_sleep(20) #wait for 20 seconds
    keypress.simulate_key(EKeySelect, EKeySelect)#simulate select key
Note this will go into an infinite loop, Replace loop conditions according to your preference and time limit.

Best Regards,
Croozeus
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Announcing a Python application for speed camera alerting mposborne Python 6 2008-05-15 20:23
BIO Message Parser Starting Application + Security Hole ? Cr7pt0r General Symbian C++ 1 2008-05-08 13:32
SIS file - Python 1.4.1 - Symbian S60 3rd Ed Chiara81000 Python 3 2008-03-14 18:57
Application Manager : SIS application not displayed wap2tero General Symbian C++ 3 2005-09-16 04:37
Application icon in Multiple sis file umesh.roy Symbian Tools & SDKs 0 2005-03-16 10:39

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ