×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Question Promlem with sms_send

    I'm having proplems with sms_send.
    Code:
    		if appuifw.query(u"Send message?","query") == True:
    				appuifw.note(u"send message", 'info')
    				messaging.sms_send(nbr1, txt)
    				appuifw.note(u"message sent", 'info')
    				appuifw.app.set_exit()
    
    		else:
    			appuifw.note(u"Send cancelled!", 'info')
    But when i excecute it, it always sends message and doesn't continue executing script. Any ideas why? I have E90 (s60 3rd) and latest python and console installed.

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Promlem with sms_send

    Code:
    		if appuifw.query(u"Send message?","query") == True:
    				appuifw.note(u"send message", 'info')
    				messaging.sms_send(nbr1, txt)
    				appuifw.note(u"message sent", 'info')
    				appuifw.app.set_exit()
    
    		else:
    			appuifw.note(u"Send cancelled!", 'info')
    The bold line means that you are asking to exit the script. Could it be that?

    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Re: Promlem with sms_send

    Nope... program never gets that far... it seems that python can't get information about successfully sent sms and just waits for it... And waits and waits...

  4. #4
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: Promlem with sms_send

    Hello snoukka
    Your code seems to be perfect...I mean no bugs..
    Buyt to get the desired visual output you should modify the code as follows:

    Code:
    		if appuifw.query(u"Send message?","query") == True:
    				appuifw.note(u"send message", 'info')
    				messaging.sms_send(nbr1, txt)
    				appuifw.note(u"message sent", 'info')
    				e32.ao_sleep(3)
                                    appuifw.app.set_exit()
    
    		else:
    			appuifw.note(u"Send cancelled!", 'info')
    Introducing a delay between the note and exit might make you able to see the note..

    Regards
    Pankaj Nathani
    www.croozeus.com

  5. #5
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Re: Promlem with sms_send

    Thanx for good idea, but the problem seems to be that script doenst continue at all after calling sms_send.

    I also tried to compile script to standalone and it behaves simalarly. I have to kill application in order to exit.

    This might be some kind of bug?

  6. #6
    Registered User
    Join Date
    Mar 2005
    Posts
    1

    Re: Promlem with sms_send

    Try
    Code:
    if appuifw.query(u"Send message?","query") == True:
        messaging.sms_send(nbr1, txt)
        appuifw.note(u"message sent", 'info')
    else:
        appuifw.note(u"Send cancelled!", 'info')

  7. #7
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Re: Promlem with sms_send

    No help... program still doesn't continue after sms_send command

  8. #8
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Promlem with sms_send

    It looks like there is an error during sms_send. Are you sending unicode text?

    Code:
    if appuifw.query(u"Send message?","query") == True:
        messaging.sms_send('0000000000', unicode(txt) )
        appuifw.note(u"message sent", 'info')
    else:
        appuifw.note(u"Send cancelled!", 'info')
    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  9. #9
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Re: Promlem with sms_send

    yes, text is defined as unicode earlier:

    txt = u"message text"

    Text message itself send successfully, but script itself stops there and waits something that never happens...

  10. #10
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Re: Promlem with sms_send

    i got n information that script works fine on N95... could someone try with E90? This might be bug in E90.

  11. #11
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: Promlem with sms_send

    @snoukka

    Do you use different versions of Python on both?
    I mean on N95 and on E90? If yes Which?
    Pankaj Nathani
    www.croozeus.com

  12. #12
    Registered User
    Join Date
    Jul 2007
    Posts
    7

    Re: Promlem with sms_send

    both have same latest version 1.4.0.

Posting Permissions

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