Handynummer mit Python

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
roth86
User
Beiträge: 10
Registriert: Dienstag 12. Dezember 2006, 11:19

Handynummer mit Python

Beitragvon roth86 » Dienstag 19. Dezember 2006, 14:30

Hallo zusammen ich habe hier ein Python Script das MMS sendet an eine Nummer die im System definiert ist. Kann ich irgendwie auch anders die Nummer auswählen?

Code: Alles auswählen

from scrlib import *

def TestFunction( api ):

    # ----------------------------------------------------------------
    # Parameters that should be modified as per test environment.
    # ----------------------------------------------------------------

    mig25obj = api.ImportRiteScript( 'CNF-MM1-CommonFunctions' )

    # ----------------------------------------------------------------
    # Generic Test
    # ----------------------------------------------------------------

    api.SetReturnMode( RETURN_EXCEPTION )

    # Exactly two devices are needed, one in MO mode; the other in MT mode.
    sendDevice1 = api.RetNxtDeviceMM1( )
    recvDevice1 = api.RetNxtDeviceMM1( )

    # Get corresponding MSISDN numbers for the devices
    msisdnS1 = api.GetMSISDN( sendDevice1 )
    msisdnR1 = api.GetMSISDN( recvDevice1 )

    #------------------------------------------------------------------
    #   1. Submit MM from S1 to recipient R1
    #      Containing:
    #      - TO field set to R1
    #      - Do not give Subject field.
    #------------------------------------------------------------------

    msgToSend = mig25obj.CreateMsgMM1SendReq ( api, msisdnS1,\
                         ToAddressList = [msisdnR1], includeHeaders = \
                         ['Subject: ' + mig25obj.normalTextSubject] )

    # Add text content to the message:
    sentTextContent = mig25obj.AddTextContent( msgToSend )

    # Send the message through sendDevice1
    mig25obj.LogSend( api, 'MM1 Send Request', 'Device S1 ('\
                      + str( msisdnS1 ) + ') to Device R1 ('\
                      + str( msisdnR1 ) + ')' )
    api.SndMsgMM1( sendDevice1, msgToSend )

    #------------------------------------------------------------------
    #   2. S1 waits for Send Confirmation
    #      If there is no Send Confirmation, test fails
    #------------------------------------------------------------------
    mig25obj.LogWait( api, 'MM1 Send Confirm',\
                      mig25obj.wait4SendCnfTime,\
                      'Device S1 ('  + str( msisdnS1 ) + ')' )
    retCode, sendConfMsg = api.WaitForMsgMM1( sendDevice1, MM1_SEND_CNF,\
                                      mig25obj.wait4SendCnfTime )
................
..............
...........
..........

    # -----------------------------------------------------------
    # End of Test
    # -----------------------------------------------------------

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder