×

Discussion Board

Page 2 of 5 FirstFirst 12345 LastLast
Results 16 to 30 of 75
  1. #16
    Registered User
    Join Date
    Jun 2005
    Posts
    386

    Re: [Announce] keypress module 1.0.5

    Sorry, I made a mistake. You have to use scancodes in send_raw_event(). So, use EStdKeyNo instead of EKeyNo.

    Let me know how it goes.

  2. #17
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    Yepp! That works

    Many thanks.
    Regards

  3. #18
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    Hmmm. One thing remains: The script works fine in signed scriptshell (all caps, opensigned). But if I create a SIS using ensymble, opensign it with the same full caps and install it (installs OK), _every_ incoming call is terminated, not only the anonymous calls. Furthermore: The app doesn't react on EXIT, only the red button terminates.

    Code:
    import telephone
    import e32
    import keypress 
    
    from appuifw import *
    from key_codes import * 
    
    
    def cb(callstate):
    	print "Callstate", callstate
    	if callstate[0] == telephone.EStatusRinging and callstate[1] == u'':
    		e32.reset_inactivity() 
    		keypress.send_raw_event(keypress.EKeyDown, EStdKeyNo)
    		keypress.send_raw_event(keypress.EKeyUp, EStdKeyNo)
    		print "Hung up"
    
    print "DD starting"
    lock = e32.Ao_lock()
    app.exit_key_handler = lock.signal
    
    telephone.call_state(cb)
    telephone.incoming_call()
    
    lock.wait()
    print "DD terminating"
    As I said: The same works fine in ScriptShell. Does anybody have a clue?

    Regards

  4. #19
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: [Announce] keypress module 1.0.5

    hi neil.young
    i feel i can handle that, just use
    Code:
    app.set_exit
    for the graceful exit of your application.
    The Lock.signal function just freezes your application to exit your application in the standalone form you have to use the above mentioned line.

    Enjoy Pythoning
    Gaba88

  5. #20
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    Yes, I see. Currently I'm searching, why the hell _every_ call is rejected...

  6. #21
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    yak, do you know an event in order to send an application to background? Some sort of "Hide"

  7. #22
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: [Announce] keypress module 1.0.5

    Quote Originally Posted by neil.young View Post
    yak, do you know an event in order to send an application to background? Some sort of "Hide"
    Neil

    Use appswitch module and switch_to_bg function !

    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  8. #23
    Registered User
    Join Date
    Jun 2005
    Posts
    386

    Re: [Announce] keypress module 1.0.5

    No, don't know of any such event (which doesn't mean there is none). As cyke64 said, appswitch provides a direct way to acomplish this.

  9. #24
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    No, appswitch doesn't seem to work. I signed it with full caps with my old N95 dev cert, it installs fine, but the attempt to use excepts in the pyShell:

    File "C:\resource\appswitch.py", line 5, in ?
    _appswitch=imp.load_dynamic('_appswitch', c:\\sys\\bin\\_appswitch.pyd')
    SystemError: _pyImport_ FixupExtension: module _appswitch not loaded.

    Although I see c:\sys\bin I'm unable to verify, whether appswitch is there...

  10. #25
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: [Announce] keypress module 1.0.5

    Quote Originally Posted by neil.young View Post
    No, appswitch doesn't seem to work. I signed it with full caps with my old N95 dev cert, it installs fine, but the attempt to use excepts in the pyShell:

    File "C:\resource\appswitch.py", line 5, in ?
    _appswitch=imp.load_dynamic('_appswitch', c:\\sys\\bin\\_appswitch.pyd')
    SystemError: _pyImport_ FixupExtension: module _appswitch not loaded.

    Although I see c:\sys\bin I'm unable to verify, whether appswitch is there...
    Works fine for me

    What code do you use ?

    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  11. #26
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    Scriptshell, interactive console, import appswitch, bang

  12. #27
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: [Announce] keypress module 1.0.5

    Hi Neil.Young

    this doesnt happen with me also the appswitch working in my N95 like a charm hope you have installed in properly.
    What steps you took for installation??

    Enjoy Pythoning
    Gaba88

  13. #28
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    Hi gaba88,

    I downloaded the package from the location provided here, opensigned it with full caps (I also tried my valid developer certificate to no avail), installed it (installation works fine) and started my script using it. After the error I tried scriptshell with interactive console and a simple "import appswitch", which showed the same results...

    Would you mind to provide me the version, which is running on your machine?

    Regards

  14. #29
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: [Announce] keypress module 1.0.5

    I am wondering, have you installed ALL your PyS60 related stuff into phone's memory (C-drive) or have mixed some parts to the memory card (E-drive)?

    In latter case you really should uninstall everything PyS60 related and re-install them into phone's memory.

  15. #30
    Registered User
    Join Date
    Nov 2006
    Posts
    568

    Re: [Announce] keypress module 1.0.5

    Oh, this lesson I have learned already Of course, all PyS60 including the libs have been installed to C:

Similar Threads

  1. Replies: 8
    Last Post: 2009-07-28, 03:38
  2. Replies: 2
    Last Post: 2008-07-10, 08:02
  3. Replies: 2
    Last Post: 2007-10-18, 00:02
  4. Carbide.j 1.5 and Netbeans 5.5 beta 2
    By ovjo12 in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-06-11, 05:43
  5. [announce] Enhanced Graphics module
    By GameDude in forum Symbian
    Replies: 10
    Last Post: 2007-03-18, 18:44

Posting Permissions

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