SMS Sender - 100%ig kosteloses SMS Senden!

  • Soooo, ich hab mich mal dran gesetzt und hab dein Programm mal etwas erweitert. Man sieht nun, wieviele Zeichen man bereits geschrieben hat. (An dieser Stelle nochmal einen Dank an mega, der mich darauf gebracht hat, die richtige Schleife zu nutzen)

    Und ich hab ein "Phonebook" geaddet. Man kann bereits Nummern + Name adden (werden in die numbers.dat im @ScriptDir geschrieben), aber sie können noch nicht ausgelesen und in die Nummern-Leiste eingefügt werden. Da kann sich einer von euch ja dransetzen :D

    Ich habe dazu eine Funktion Namens "Multi Inputbox" von lokster (autoitscript.com Forum) verwendet. Link zum Thread

    UDF:

    Spoiler anzeigen
    [autoit]

    ;===============================================================================
    ;
    ; Description: Multiple InputBox
    ; Syntax: _InputBoxM($title, $message, $label0, $input0,..., $label10='',$input10='')
    ; Parameter(s): $title: the title of the window
    ; $message: the message shown inside the window
    ; $label0: the text to be shown for the first label
    ; $edit0: the default text to be shown in the firs input box
    ; ...
    ; $label10: the text to be shown for the eleventh label
    ; $edit10: the default text to be shown in the eleventh input box
    ; Requirement(s): None
    ; Return Value(s): Returns array of strings entered in the GuiInputs
    ; Returns -1 on Cancel
    ; Returns -2 on error
    ; Author(s): lokster
    ; Note(s): based on _RadioOptionBox() by Piano_Man
    ;
    ;===============================================================================
    Func _InputBoxM($title, $message, _
    $label_0, $input_0, _
    $label_1= '', $input_1= '', _
    $label_2= '', $input_2 = '', _
    $label_3= '', $input_3 = '', _
    $label_4= '', $input_4 = '', _
    $label_5= '', $input_5 = '', _
    $label_6= '', $input_6 = '', _
    $label_7= '', $input_7 = '', _
    $label_8= '', $input_8 = '', _
    $label_9= '', $input_9 = '', _
    $label_10= '', $input_10 = '' _
    )


    If Mod(@NumParams - 2,2)<>0 Then
    MsgBox(0x10,"Error","Incorrect number of parameters!")
    Return -2
    EndIf

    Local $width = 300
    Local $i_UBound = (@NumParams - 2)/2
    Local $input[$i_UBound]
    Local $label[$i_UBound]
    Local $result[$i_UBound]
    If $title = '' then Return -2
    If $message = '' then Return -2
    If $label_0 = '' then Return -2

    $guiOnEvent = Opt('GUIOnEventMode', 0)

    $optionGui = GuiCreate($title, $width, 100 + ((@NumParams - 2)/2) * 45, -1, -1, $DS_SETFOREGROUND)

    GuiCtrlCreateLabel($message, 5, 5, $width - 10, 30, $SS_CENTER)

    For $i_Index = 0 To $i_UBound - 1

    $label[$i_Index] = GUICtrlCreateLabel(Eval("label_" & String($i_Index)), 5, 40+ $i_Index * 45, 285)
    $input[$i_Index] = GUICtrlCreateInput(Eval("input_" & String($i_Index)), 5, 40+ $i_Index * 45+20, 285)
    Next

    $ok = GuiCtrlCreateButton('OK', $width / 2 - 90, ($i_UBound) * 45 + 45, 80, 25)
    $cancel = GuiCtrlCreateButton('Cancel', $width / 2 + 10, ($i_UBound) * 45 + 45, 80, 25)

    GuiSetState()

    While 1
    Switch GuiGetMsg()
    Case $GUI_EVENT_CLOSE
    $result = -1
    ExitLoop
    Case $cancel
    $result = -1
    ExitLoop
    Case $ok
    For $a = 0 to $i_UBound - 1
    $result[$a]=GUICtrlRead($input[$a])
    Next
    ExitLoop
    EndSwitch
    WEnd

    GuiDelete()
    Opt('GUIOnEventMode', $guiOnEvent)
    Return $result
    EndFunc

    [/autoit]

    ich hab sie für das Script als multiinputbox.au3 abgespeichert. Kann logischerweise geändert werden. So und hier nun das geänderte Script.

    Neue Elemente:

    Code
    - Zeile 7 	  ==> Include der multiinputbox.au3
    - Zeile 11 	  ==> Global Definition
    - Zeile 24 	  ==> Kommentar berichtigt. Es heißt Standard :P
    - Zeile 213 - 220 ==> Labels
    - Zeile 234 - 255 ==> GUI-Funktion für das Phonebook
    - Zeile 265 - 266 ==> Updatefunktion für geschriebene Zeichen


    Code:

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=D:\bilder\ico\7000_Icons.All.Icon.Experience.Packs.1-6_Over.1500.Macinstosh.Icons.for.Windows\MAC STYLE - Multimedia\mobilephone1.ico
    #AutoIt3Wrapper_Compression=4
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ie.au3>
    #include <GUIConstants.au3>
    #include <multiinputbox.au3>

    Opt("TrayIconDebug", 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $Zeichen = 0
    Global $IDList[12]
    $IDList[0] = '2'
    $IDList[1] = '31'
    $IDList[2] = '32'
    $IDList[3] = '33'
    $IDList[4] = '34'
    $IDList[5] = '54'
    $IDList[6] = '70'
    $IDList[7] = '78'
    $IDList[8] = '85'
    $IDList[9] = '141'
    $IDList[10] = '144'
    $IDList[11] = '201';standard server

    #region OnlineGUI
    $onlinegui = GUICreate("Server's", 243, 145, 193, 115)
    $ID = $IDList[0]
    $Radio1 = GUICtrlCreateRadio("Server ID " & $ID, 8, 8, 89, 15)
    $Graphic1 = GUICtrlCreateGraphic(100, 8, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[1]
    $Radio2 = GUICtrlCreateRadio("Server ID " & $ID, 8, 24, 89, 15)
    $Graphic2 = GUICtrlCreateGraphic(100, 24, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[2]
    $Radio3 = GUICtrlCreateRadio("Server ID " & $ID, 8, 40, 89, 15)
    $Graphic3 = GUICtrlCreateGraphic(100, 40, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[3]
    $Radio4 = GUICtrlCreateRadio("Server ID " & $ID, 8, 56, 89, 15)
    $Graphic4 = GUICtrlCreateGraphic(100, 56, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[4]
    $Radio5 = GUICtrlCreateRadio("Server ID " & $ID, 8, 72, 89, 15)
    $Graphic5 = GUICtrlCreateGraphic(100, 72, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[5]
    $Radio6 = GUICtrlCreateRadio("Server ID " & $ID, 8, 88, 89, 15)
    $Graphic6 = GUICtrlCreateGraphic(100, 88, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[6]
    $Radio7 = GUICtrlCreateRadio("Server ID " & $ID, 120, 8, 89, 15)
    $Graphic7 = GUICtrlCreateGraphic(212, 8, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[7]
    $Radio8 = GUICtrlCreateRadio("Server ID " & $ID, 120, 24, 89, 15)
    $Graphic8 = GUICtrlCreateGraphic(212, 24, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[8]
    $Radio9 = GUICtrlCreateRadio("Server ID " & $ID, 120, 40, 89, 15)
    $Graphic9 = GUICtrlCreateGraphic(212, 40, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[9]
    $Radio10 = GUICtrlCreateRadio("Server ID " & $ID, 120, 56, 89, 15)
    $Graphic10 = GUICtrlCreateGraphic(212, 56, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[10]
    $Radio11 = GUICtrlCreateRadio("Server ID " & $ID, 120, 72, 89, 15)
    $Graphic11 = GUICtrlCreateGraphic(212, 72, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[11]
    $Radio12 = GUICtrlCreateRadio("Server ID " & $ID, 120, 88, 89, 15)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Graphic12 = GUICtrlCreateGraphic(212, 88, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)

    $nextbut = GUICtrlCreateButton("> > N e x t > >", 8, 112, 227, 25, 0)
    GUISetState()



    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $nextbut
    For $i = 1 To 12
    If GUICtrlRead(Eval("Radio" & $i)) = 1 Then ExitLoop
    Next
    GUIDelete()
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Global $CellularNumber = '+49'
    Global $Message = ""
    Global $ID = $IDList[$i - 1]
    Global $ExitLoop = 0
    Global $oIE = _IECreateEmbedded()

    #region - Cmdline
    If $CMDLINE[0] > 2 Then
    Global $CellularNumber = $CMDLINE[1]
    Global $Message = $CMDLINE[2]
    Global $ID = $IDList[$CMDLINE[3]]
    EndIf
    #endregion

    #region captchagui
    $captchagui = GUICreate("", 160, 47, -1, -1)
    GUISetBkColor(0)
    GUICtrlCreateLabel("Please enter the code:", 2, 2, 156, 15)
    GUICtrlSetColor(-1, 0xffffff)
    $inpCode = GUICtrlCreateInput("", 105, 17, 52, 25, $ES_UPPERCASE)
    GUICtrlSetLimit(-1, 4)
    $childgui = GUICreate("", 96, 21, 2, 17, $WS_CHILD, -1, $captchagui)
    GUISetBkColor(0)
    GUICtrlCreateObj($oIE, -188, -36, 100 + 188, 25 + 36)
    #endregion captchagui

    #region maingui
    $maingui = GUICreate("SMS sending - By GtaSpider - ID " & $ID, 186, 215, 193, 115)
    GUISetBkColor(0x000000)
    $inpcell = GUICtrlCreateInput($CellularNumber, 8, 24, 150, 21)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $pbbutton = GUICtrlCreateButton("PB", 160, 21)
    GUICtrlCreateLabel("Cellular Number:", 8, 8, 60, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    $edit = GUICtrlCreateEdit($Message, 8, 80, 169, 105, $ES_WANTRETURN)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetLimit(-1, 160)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    GUICtrlCreateLabel("Message:", 8, 64, 50, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)

    [/autoit] [autoit][/autoit] [autoit]

    ; Begin Counter
    $Label_Zeichen = GUICtrlCreateLabel($Zeichen, 130, 64, 50, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    GUICtrlCreateLabel("/ 160", 150, 64, 50, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    ; End Counter

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateLabel("e.g.: +491711231231 ", 8, 48, 109, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    $prog = GUICtrlCreateProgress(8, 216, 169, 10)
    GUICtrlSetResizing(-1, 802)
    $conbut = GUICtrlCreateButton("Send at Server " & $ID, 8, 192, 169, 20, 0)
    GUICtrlSetResizing(-1, 802)
    GUISetState(@SW_SHOW, $maingui)
    #endregion maingui

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func openphonebook()
    $phonebookgui = GUICreate("Numbers", 255, 170, -1, -1)
    GUISetBkColor(0)
    $phonelistview = GUICtrlCreateListView("Number | Name ", 0, 0, 255, 140)
    $phonebuttonadd = GUICtrlCreateButton("Add",2,143, 80)
    GUISetState(@SW_SHOW, $phonebookgui)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    GUIDelete($phonebookgui)
    ExitLoop
    Case $phonebuttonadd
    $phoneaddinput = _InputBoxM("Add new","Input number and name please","Number","","Name","")
    GUICtrlCreateListViewItem($phoneaddinput[0] & "|" & $phoneaddinput[1],$phonelistview)
    FileOpen(@ScriptDir &"\numbers.dat",1)
    FileWrite("numbers.dat",$phoneaddinput[0] & "|" & $phoneaddinput[1])
    EndSwitch
    WEnd
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    GUICtrlSetData($conbut, 'Send at Server ' & $ID)
    GUICtrlSetState($inpcell, $GUI_ENABLE)
    GUICtrlSetState($edit, $GUI_ENABLE)
    GUICtrlSetState($conbut, $GUI_ENABLE)

    While 1
    GUICtrlSetData($Label_Zeichen,StringLen(GUICtrlRead($edit)))
    Sleep(90)

    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $conbut
    For $i = 240 To 262 Step 2
    WinMove($maingui, "", Default, Default, 192, $i)
    Sleep(10)
    Next
    $CellularNumber = GUICtrlRead($inpcell)
    $Message = GUICtrlRead($edit)
    GUICtrlSetData($conbut, 'By GtaSpider')
    GUICtrlSetState($inpcell, $GUI_DISABLE)
    GUICtrlSetState($edit, $GUI_DISABLE)
    GUICtrlSetState($conbut, $GUI_DISABLE)
    _SendSMS($CellularNumber, $Message)
    ExitLoop
    Case $pbbutton
    openphonebook()
    EndSwitch
    WEnd
    GUISetState(@SW_SHOW, $captchagui)
    GUISetState(@SW_SHOW, $childgui)
    HotKeySet("{ENTER}", "_EnterCode")
    While GUIGetMsg() <> $GUI_EVENT_CLOSE
    If $ExitLoop Then ExitLoop
    WEnd
    WEnd
    Exit
    ;~ Hallo Frank!Mit meinem SMSSender kann man in der ganzen WELT smse versenden,an JEDEN anbieter und das VOLLKOMMEN KOSTELOS!!!!

    Func _SendSMS($iCelNumb, $sMessage)
    GUICtrlSetData($prog, 5)
    Local $oSmsbox, $oMess, $oNumb, $oContBut, $sReadHtml
    If StringLen($sMessage) > 140 Then Return SetError(1, 0, -1)
    $iCelNumb = StringReplace($iCelNumb, "+", "00")
    If StringLen($iCelNumb) > 15 Then Return SetError(2, 0, -1)
    _IENavigate($oIE, 'http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    GUICtrlSetData($prog, 25)
    $oSmsbox = _IEFormGetObjByName($oIE, "smsbox")
    $oMess = _IEFormElementGetObjByName($oSmsbox, 'nachricht')
    $oNumb = _IEFormElementGetObjByName($oSmsbox, 'empfaenger')
    GUICtrlSetData($prog, 30)
    _IEFormElementSetValue($oMess, $sMessage)
    _IEFormElementSetValue($oNumb, $iCelNumb)
    GUICtrlSetData($prog, 35)
    For $i = 40 To 60 Step 5
    Sleep(100)
    GUICtrlSetData($prog, $i)
    Next
    _IEFormSubmit($oSmsbox)
    GUICtrlSetData($prog, 65)
    _IENavigate($oIE, 'http://www.smsgott.de/index.php?id=' & $ID & '&do=verify');http://www.smsgott.de/index.php?id=2&do=verify
    GUICtrlSetData($prog, 75)
    $oIE.document.body.scroll = "no"
    EndFunc ;==>_SendSMS

    Func _EnterCode()
    If Not WinActive($captchagui) Or WinActive($childgui) Then
    HotKeySet("{ENTER}")
    Send("{ENTER}")
    HotKeySet("{ENTER}", "_EnterCode")
    Return
    EndIf
    $ExitLoop = 1
    HotKeySet("{ENTER}")
    Local $oSmsform, $oCaptcha, $sDocRead
    GUISetState(@SW_HIDE, $childgui)
    GUISetState(@SW_HIDE, $captchagui)
    GUICtrlSetData($prog, 85)
    $oSmsform = _IEFormGetObjByName($oIE, "smsform")
    $oCaptcha = _IEFormElementGetObjByName($oSmsform, 'captcha')
    _IEFormElementSetValue($oCaptcha, GUICtrlRead($inpCode))
    GUICtrlSetData($prog, 95)
    SplashTextOn('', 'Please wait while connect to SMS Gateway...', 320, 20, -1, -1, 1)
    _IENavigate($oIE, 'javascript:verifySMS()')
    SplashOff()
    $sDocRead = _IEBodyReadText($oIE)
    GUICtrlSetData($prog, 100)
    If StringInStr($sDocRead, 'Es ist ein Fehler beim Versenden der SMS aufgetreten!') Then
    MsgBox(16, "Error!", "We intercepted an Error by sending SMS!" & @CRLF & "Please retry it in a few minutes again.")
    ElseIf StringInStr($sDocRead, 'Bitte Sicherheitscode eingeben') Then
    If MsgBox(52, "Wrong Captcha", "Wrong Captcha (Code) entered! Retry?") = 6 Then ShellExecute(@ScriptFullPath, $CellularNumber & ' "' & $Message & '" ' & Random(0, 10))
    Exit
    Else
    MsgBox(64, "All Done", "Successfully! SMS sended @" & @HOUR & ":" & @MIN & @CRLF & "Perhaps it takes up to 1 minute to receiving the SMS...")
    EndIf
    GUICtrlSetData($inpCode, '')
    EndFunc ;==>_EnterCode

    [/autoit]


    [Blockierte Grafik: http://img-up.net/img/screenAtnQV.JPG]

    3 Mal editiert, zuletzt von Sn0opy (27. Juni 2007 um 12:16)

    • Offizieller Beitrag

    Hallo,

    ich weiss nicht ob es schon jemand gemerkt hat aber die max. SMS-Länge bei smsgott.de ist auf 147 Zeichen beschränkt!

  • Ich habs bei meiner Version mal gefixt

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=D:\bilder\ico\7000_Icons.All.Icon.Experience.Packs.1-6_Over.1500.Macinstosh.Icons.for.Windows\MAC STYLE - Multimedia\mobilephone1.ico
    #AutoIt3Wrapper_Compression=4
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ie.au3>
    #include <GUIConstants.au3>
    #include <multiinputbox.au3>

    Opt("TrayIconDebug", 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $Zeichen = 0
    Global $IDList[12]
    $IDList[0] = '2'
    $IDList[1] = '31'
    $IDList[2] = '32'
    $IDList[3] = '33'
    $IDList[4] = '34'
    $IDList[5] = '54'
    $IDList[6] = '70'
    $IDList[7] = '78'
    $IDList[8] = '85'
    $IDList[9] = '141'
    $IDList[10] = '144'
    $IDList[11] = '201';standard server

    #region OnlineGUI
    $onlinegui = GUICreate("Server's", 243, 145, 193, 115)
    $ID = $IDList[0]
    $Radio1 = GUICtrlCreateRadio("Server ID " & $ID, 8, 8, 89, 15)
    $Graphic1 = GUICtrlCreateGraphic(100, 8, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[1]
    $Radio2 = GUICtrlCreateRadio("Server ID " & $ID, 8, 24, 89, 15)
    $Graphic2 = GUICtrlCreateGraphic(100, 24, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[2]
    $Radio3 = GUICtrlCreateRadio("Server ID " & $ID, 8, 40, 89, 15)
    $Graphic3 = GUICtrlCreateGraphic(100, 40, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[3]
    $Radio4 = GUICtrlCreateRadio("Server ID " & $ID, 8, 56, 89, 15)
    $Graphic4 = GUICtrlCreateGraphic(100, 56, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[4]
    $Radio5 = GUICtrlCreateRadio("Server ID " & $ID, 8, 72, 89, 15)
    $Graphic5 = GUICtrlCreateGraphic(100, 72, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[5]
    $Radio6 = GUICtrlCreateRadio("Server ID " & $ID, 8, 88, 89, 15)
    $Graphic6 = GUICtrlCreateGraphic(100, 88, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[6]
    $Radio7 = GUICtrlCreateRadio("Server ID " & $ID, 120, 8, 89, 15)
    $Graphic7 = GUICtrlCreateGraphic(212, 8, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[7]
    $Radio8 = GUICtrlCreateRadio("Server ID " & $ID, 120, 24, 89, 15)
    $Graphic8 = GUICtrlCreateGraphic(212, 24, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[8]
    $Radio9 = GUICtrlCreateRadio("Server ID " & $ID, 120, 40, 89, 15)
    $Graphic9 = GUICtrlCreateGraphic(212, 40, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[9]
    $Radio10 = GUICtrlCreateRadio("Server ID " & $ID, 120, 56, 89, 15)
    $Graphic10 = GUICtrlCreateGraphic(212, 56, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[10]
    $Radio11 = GUICtrlCreateRadio("Server ID " & $ID, 120, 72, 89, 15)
    $Graphic11 = GUICtrlCreateGraphic(212, 72, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)
    $ID = $IDList[11]
    $Radio12 = GUICtrlCreateRadio("Server ID " & $ID, 120, 88, 89, 15)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Graphic12 = GUICtrlCreateGraphic(212, 88, 15, 15)
    Ping('http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    If @error > 3 Or @error < 1 Then
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0x00ff00)
    Else
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xff0000)
    EndIf
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 15, 15)

    $nextbut = GUICtrlCreateButton("> > N e x t > >", 8, 112, 227, 25, 0)
    GUISetState()



    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $nextbut
    For $i = 1 To 12
    If GUICtrlRead(Eval("Radio" & $i)) = 1 Then ExitLoop
    Next
    GUIDelete()
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Global $CellularNumber = '+49'
    Global $Message = ""
    Global $ID = $IDList[$i - 1]
    Global $ExitLoop = 0
    Global $oIE = _IECreateEmbedded()

    #region - Cmdline
    If $CMDLINE[0] > 2 Then
    Global $CellularNumber = $CMDLINE[1]
    Global $Message = $CMDLINE[2]
    Global $ID = $IDList[$CMDLINE[3]]
    EndIf
    #endregion

    #region captchagui
    $captchagui = GUICreate("", 160, 47, -1, -1)
    GUISetBkColor(0)
    GUICtrlCreateLabel("Please enter the code:", 2, 2, 156, 15)
    GUICtrlSetColor(-1, 0xffffff)
    $inpCode = GUICtrlCreateInput("", 105, 17, 52, 25, $ES_UPPERCASE)
    GUICtrlSetLimit(-1, 4)
    $childgui = GUICreate("", 96, 21, 2, 17, $WS_CHILD, -1, $captchagui)
    GUISetBkColor(0)
    GUICtrlCreateObj($oIE, -188, -36, 100 + 188, 25 + 36)
    #endregion captchagui

    #region maingui
    $maingui = GUICreate("SMS sending - By GtaSpider - ID " & $ID, 186, 215, 193, 115)
    GUISetBkColor(0x000000)
    $inpcell = GUICtrlCreateInput($CellularNumber, 8, 24, 150, 21)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    $pbbutton = GUICtrlCreateButton("PB", 160, 21)
    GUICtrlCreateLabel("Cellular Number:", 8, 8, 60, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    $edit = GUICtrlCreateEdit($Message, 8, 80, 169, 105, $ES_WANTRETURN)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetLimit(-1, 147)
    GUICtrlSetBkColor(-1, 0xC0C0C0)
    GUICtrlCreateLabel("Message:", 8, 64, 50, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)

    [/autoit] [autoit][/autoit] [autoit]

    ; Begin Counter
    $Label_Zeichen = GUICtrlCreateLabel($Zeichen, 130, 64, 50, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    GUICtrlCreateLabel("/ 147", 150, 64, 50, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    ; End Counter

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateLabel("e.g.: +491711231231 ", 8, 48, 109, 15)
    GUICtrlSetResizing(-1, 802)
    GUICtrlSetColor(-1, 0xC0C0C0)
    $prog = GUICtrlCreateProgress(8, 216, 169, 10)
    GUICtrlSetResizing(-1, 802)
    $conbut = GUICtrlCreateButton("Send at Server " & $ID, 8, 192, 169, 20, 0)
    GUICtrlSetResizing(-1, 802)
    GUISetState(@SW_SHOW, $maingui)
    #endregion maingui

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func openphonebook()
    $phonebookgui = GUICreate("Numbers", 255, 170, -1, -1)
    GUISetBkColor(0)
    $phonelistview = GUICtrlCreateListView("Number | Name ", 0, 0, 255, 140)
    $phonebuttonadd = GUICtrlCreateButton("Add",2,143, 80)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $phonebookgui)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    GUIDelete($phonebookgui)
    ExitLoop
    Case $phonebuttonadd
    $phoneaddinput = _InputBoxM("Add new","Input number and name please","Number","","Name","")
    GUICtrlCreateListViewItem($phoneaddinput[0] & "|" & $phoneaddinput[1],$phonelistview)
    GUICtrlSetBkColor(-1,0x0000000)
    FileOpen(@ScriptDir &"\numbers.dat",1)
    FileWrite("numbers.dat",$phoneaddinput[0] & "|" & $phoneaddinput[1])
    EndSwitch
    WEnd
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    GUICtrlSetData($conbut, 'Send at Server ' & $ID)
    GUICtrlSetState($inpcell, $GUI_ENABLE)
    GUICtrlSetState($edit, $GUI_ENABLE)
    GUICtrlSetState($conbut, $GUI_ENABLE)

    While 1
    GUICtrlSetData($Label_Zeichen,StringLen(GUICtrlRead($edit)))
    Sleep(90)

    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $conbut
    For $i = 240 To 262 Step 2
    WinMove($maingui, "", Default, Default, 192, $i)
    Sleep(10)
    Next
    $CellularNumber = GUICtrlRead($inpcell)
    $Message = GUICtrlRead($edit)
    GUICtrlSetData($conbut, 'By GtaSpider')
    GUICtrlSetState($inpcell, $GUI_DISABLE)
    GUICtrlSetState($edit, $GUI_DISABLE)
    GUICtrlSetState($conbut, $GUI_DISABLE)
    _SendSMS($CellularNumber, $Message)
    ExitLoop
    Case $pbbutton
    openphonebook()
    EndSwitch
    WEnd
    GUISetState(@SW_SHOW, $captchagui)
    GUISetState(@SW_SHOW, $childgui)
    HotKeySet("{ENTER}", "_EnterCode")
    While GUIGetMsg() <> $GUI_EVENT_CLOSE
    If $ExitLoop Then ExitLoop
    WEnd
    WEnd
    Exit
    ;~ Hallo Frank!Mit meinem SMSSender kann man in der ganzen WELT smse versenden,an JEDEN anbieter und das VOLLKOMMEN KOSTELOS!!!!

    Func _SendSMS($iCelNumb, $sMessage)
    GUICtrlSetData($prog, 5)
    Local $oSmsbox, $oMess, $oNumb, $oContBut, $sReadHtml
    If StringLen($sMessage) > 140 Then Return SetError(1, 0, -1)
    $iCelNumb = StringReplace($iCelNumb, "+", "00")
    If StringLen($iCelNumb) > 15 Then Return SetError(2, 0, -1)
    _IENavigate($oIE, 'http://www.smsgott.de/?id=' & $ID & '&a=p_f&track=false')
    GUICtrlSetData($prog, 25)
    $oSmsbox = _IEFormGetObjByName($oIE, "smsbox")
    $oMess = _IEFormElementGetObjByName($oSmsbox, 'nachricht')
    $oNumb = _IEFormElementGetObjByName($oSmsbox, 'empfaenger')
    GUICtrlSetData($prog, 30)
    _IEFormElementSetValue($oMess, $sMessage)
    _IEFormElementSetValue($oNumb, $iCelNumb)
    GUICtrlSetData($prog, 35)
    For $i = 40 To 60 Step 5
    Sleep(100)
    GUICtrlSetData($prog, $i)
    Next
    _IEFormSubmit($oSmsbox)
    GUICtrlSetData($prog, 65)
    _IENavigate($oIE, 'http://www.smsgott.de/index.php?id=' & $ID & '&do=verify');http://www.smsgott.de/index.php?id=2&do=verify
    GUICtrlSetData($prog, 75)
    $oIE.document.body.scroll = "no"
    EndFunc ;==>_SendSMS

    Func _EnterCode()
    If Not WinActive($captchagui) Or WinActive($childgui) Then
    HotKeySet("{ENTER}")
    Send("{ENTER}")
    HotKeySet("{ENTER}", "_EnterCode")
    Return
    EndIf
    $ExitLoop = 1
    HotKeySet("{ENTER}")
    Local $oSmsform, $oCaptcha, $sDocRead
    GUISetState(@SW_HIDE, $childgui)
    GUISetState(@SW_HIDE, $captchagui)
    GUICtrlSetData($prog, 85)
    $oSmsform = _IEFormGetObjByName($oIE, "smsform")
    $oCaptcha = _IEFormElementGetObjByName($oSmsform, 'captcha')
    _IEFormElementSetValue($oCaptcha, GUICtrlRead($inpCode))
    GUICtrlSetData($prog, 95)
    SplashTextOn('', 'Please wait while connect to SMS Gateway...', 320, 20, -1, -1, 1)
    _IENavigate($oIE, 'javascript:verifySMS()')
    SplashOff()
    $sDocRead = _IEBodyReadText($oIE)
    GUICtrlSetData($prog, 100)
    If StringInStr($sDocRead, 'Es ist ein Fehler beim Versenden der SMS aufgetreten!') Then
    MsgBox(16, "Error!", "We intercepted an Error by sending SMS!" & @CRLF & "Please retry it in a few minutes again.")
    ElseIf StringInStr($sDocRead, 'Bitte Sicherheitscode eingeben') Then
    If MsgBox(52, "Wrong Captcha", "Wrong Captcha (Code) entered! Retry?") = 6 Then ShellExecute(@ScriptFullPath, $CellularNumber & ' "' & $Message & '" ' & Random(0, 10))
    Exit
    Else
    MsgBox(64, "All Done", "Successfully! SMS sended @" & @HOUR & ":" & @MIN & @CRLF & "Perhaps it takes up to 1 minute to receiving the SMS...")
    EndIf
    GUICtrlSetData($inpCode, '')
    EndFunc ;==>_EnterCode

    [/autoit]

    2 Mal editiert, zuletzt von Sn0opy (27. Juni 2007 um 13:12)

  • Du hast in die .zip nicht die aktuellsten von meiner Version reingetan. Direkt über deinem letzten Post ist noma was von mir, da ist dann auch das Zeichenlimit gefixt.

    So, ich setz mich nun daran diesen dämlichen Listview-Bug zu beheben.

  • also scheint ja ganz toll zu sein aber bei mir wird das captcha feld nich angezeigt und kann somit auch nix eingeben ;)

    vielleicht hat sich die ID oder sonstwas verändert...

    greetz

  • Ich denke eher, dass es an der Seite liegt, dass die ggf. ein weiteres Limit reingesetzt haben, weil bei mir wird manchma statt dem Capcha ne HTML Seite angezeigt.

  • servus :)
    ist es beabsichtigt dass wenn man das phonebook öffnet keine nummer sieht obwohl vorher wecleh eingetragen wurden(numbers.dat existiert)???
    wenn man beim phonebook auf abbrechen klickt bekommt man ne schicke fehlermeldung(zumindest bei mir^^)...
    da ich noch keine nummer in meinem telebuch hab..ist es eigentlich dann möglich auf die entsprechende nummer zu klicken und dass man die dann direkt in dem anderen feld hat?(also möglich ist es^^ aber ob es atm auch so gebastelt wurde interessiert mich mehr)

    so ansonsten würd ich mal vorschlagen bei beiden guis wo man die server auswählt einfach den gui title in SMS - Serverstatus o.ä. umzubennen damit man mehr damit anfangen kann(kann aber auch so bleiben)....


    ansonsten an snoopy noch:schicke funktion mit dem zählen der buchstaben aber warum kann ich dann "nur" 147/160 zeichen verwenden..ich weiß zurzeit nicht wieviel man per smsgott verschicken kann aber es wäre dann schöner 147/147 Zeichen zu sehen...ansonsten funktioniert das einwandfrei und ist ne super idee :)

    mal wieder viel zu viel kritik :S
    deswegen:
    HAMMER GEILE SCRIPTE!!!!!;)

    snoozy

  • Wenn du ma weiter oben schaust, sollte das Problem mit den Zeichen eigentlich gefixt sein. Es dürfen nur maximal 147 Zeichen sein. 8 Posts über dir ist nen Post von mir, wo die gefixte Version zu finden ist. Da stimmen die Zeichen.

    Dass keine Nummern angezeigt werden ist normal, da es diese Funktion noch nicht gibt. Du bist bereits der 2. der nicht richtig gelesen hat und somit auch übersehen hat, dass diese Funktion von irgendwem hier im Forum gemacht werden kann, sofern ich ihm da nich zuvor komme (denke, dass ich das heute Abend machen werde)

    Die Fehlermeldung könntest du hier mal bitte posten. Ich wüsste grad net, wieso da ein drin sein sollte :P


    Wie gesagt, ich setz mich da heute Abend nochmal dran und versuche die Probleme zu beheben und das Phonebook fertig zu machen.

  • ahhso dazu war das.....das muss man dem snoozer doch sagen^^
    joa okay der fehler ist behoben...dann ist im zip-archiv aber noch nicht die aktuellste version...zumindest wärs das nach spider:P
    trotzdem bekomm ich weiterhin ne fehermeldung(siehe spoiler) beim phonebook(gleiche wie davor...)

    fehlermeldung:

    Spoiler anzeigen

    snoozer

    • Offizieller Beitrag

    Hallo!

    Bei mir wird er angezeigt, der capatcha code! Danke erstmal an alle für das lob :) wenn ich mal wider etwas mehr zeit hab (sommerferien in 2 wochen =)) werde ich mich nochmal um die GUI kümmern...

    In der ZIP ist die aktuellste Version! (Zeile 211: GUICtrlSetLimit(-1, 147))

    Ich versuch das mit dem capatcha code auch noch mal zu automatiesieren (ich weiß ich weiß, is nur halblegal, aber es würde wahrscheinlich weitaus weniger probleme geben..)

    Mfg Spider

  • Zitat

    Original von snoozer
    fehlermeldung:

    Spoiler anzeigen

    snoozer

    Hast du die Datei includet, die ich auf ner anderen Seiten, bzw. oben dazu geschrieben habe? Normal sollten die Daten der Multiinputbox als Array gespeichert werden. So wie die Fehlermeldung aussieht heißt das, dass da aber kein Array ist^^

  • @Snoopy

    Das mit dem Fehler bekomme ich auch. Da es passiert wenn man im Phonebook zuerst auf "ADD" und dann auf "Abbrechen" klickt ist doch eigentlich (denke ich zumindest ^^) klar was passiert. Er hat Probleme damit das keine Daten eingetragen werden - folglich existiert kein Array. Wieso hab ich keine Ahnung durch deinen Code steig ich irgendwie nicht so ganz durch. Ich hätte es wohl etwas simpler gestaltet ^^

    Das Programm ansich finde ich S U P E R funktioniert einwandfrei. Meine Freundin hat die SMS zwar 2 mal bekommen aber da es kostenlos ist... wayne?

    MfG

    akira2012

    MfG

    akira2012

    ***---____---Wer RechtSCHRAIBfehler findet der darf Sie behalLTEN!---___---***

  • Ok, der eigentliche Code ist das hier:

    [autoit]

    func openphonebook()
    $phonebookgui = GUICreate("Numbers", 255, 170, -1, -1)
    GUISetBkColor(0)
    $phonelistview = GUICtrlCreateListView("Number | Name ", 0, 0, 255, 140)
    $phonebuttonadd = GUICtrlCreateButton("Add",2,143, 80)

    GUISetState(@SW_SHOW, $phonebookgui)

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    GUIDelete($phonebookgui)
    ExitLoop
    Case $phonebuttonadd
    $phoneaddinput = _InputBoxM("Add new","Input number and name please","Number","","Name","")
    GUICtrlCreateListViewItem($phoneaddinput[0] & "|" & $phoneaddinput[1],$phonelistview)
    GUICtrlSetBkColor(-1,0x0000000)
    FileOpen(@ScriptDir &"\numbers.dat",1)
    FileWrite("numbers.dat",$phoneaddinput[0] & "|" & $phoneaddinput[1])
    EndSwitch
    WEnd
    EndFunc

    [/autoit]

    Dass er Probleme bekommt, wenn man auf Abrechen klickt, muss ich irgendwie noch fixen. Ist nicht meine Funktion, werd ich also etwas umschreiben müssen.


    Edit

    Ok, war net viel, was ich abändern musste. Ich hab es ganz einfach so geregelt, dass er beim Abrechen einfach gar keinen Wert zurück gibt, sondern die Schleife einfach schließt

    Spoiler anzeigen
    [autoit]

    ;===============================================================================
    ;
    ; Description: Multiple InputBox
    ; Syntax: _InputBoxM($title, $message, $label0, $input0,..., $label10='',$input10='')
    ; Parameter(s): $title: the title of the window
    ; $message: the message shown inside the window
    ; $label0: the text to be shown for the first label
    ; $edit0: the default text to be shown in the firs input box
    ; ...
    ; $label10: the text to be shown for the eleventh label
    ; $edit10: the default text to be shown in the eleventh input box
    ; Requirement(s): None
    ; Return Value(s): Returns array of strings entered in the GuiInputs
    ; Returns -1 on Cancel
    ; Returns -2 on error
    ; Author(s): lokster
    ; Note(s): based on _RadioOptionBox() by Piano_Man
    ;
    ;===============================================================================
    Func _InputBoxM($title, $message, _
    $label_0, $input_0, _
    $label_1= '', $input_1= '', _
    $label_2= '', $input_2 = '', _
    $label_3= '', $input_3 = '', _
    $label_4= '', $input_4 = '', _
    $label_5= '', $input_5 = '', _
    $label_6= '', $input_6 = '', _
    $label_7= '', $input_7 = '', _
    $label_8= '', $input_8 = '', _
    $label_9= '', $input_9 = '', _
    $label_10= '', $input_10 = '' _
    )


    If Mod(@NumParams - 2,2)<>0 Then
    MsgBox(0x10,"Error","Incorrect number of parameters!")
    Return -2
    EndIf

    Local $width = 300
    Local $i_UBound = (@NumParams - 2)/2
    Local $input[$i_UBound]
    Local $label[$i_UBound]
    Local $result[$i_UBound]
    If $title = '' then Return -2
    If $message = '' then Return -2
    If $label_0 = '' then Return -2

    $guiOnEvent = Opt('GUIOnEventMode', 0)

    $optionGui = GuiCreate($title, $width, 100 + ((@NumParams - 2)/2) * 45, -1, -1, $DS_SETFOREGROUND)

    GuiCtrlCreateLabel($message, 5, 5, $width - 10, 30, $SS_CENTER)

    For $i_Index = 0 To $i_UBound - 1

    $label[$i_Index] = GUICtrlCreateLabel(Eval("label_" & String($i_Index)), 5, 40+ $i_Index * 45, 285)
    $input[$i_Index] = GUICtrlCreateInput(Eval("input_" & String($i_Index)), 5, 40+ $i_Index * 45+20, 285)
    Next

    $ok = GuiCtrlCreateButton('OK', $width / 2 - 90, ($i_UBound) * 45 + 45, 80, 25)
    $cancel = GuiCtrlCreateButton('Cancel', $width / 2 + 10, ($i_UBound) * 45 + 45, 80, 25)

    GuiSetState()

    While 1
    Switch GuiGetMsg()
    Case $GUI_EVENT_CLOSE
    $result = -1
    ExitLoop
    Case $cancel
    ExitLoop
    Case $ok
    For $a = 0 to $i_UBound - 1
    $result[$a]=GUICtrlRead($input[$a])
    Next
    ExitLoop
    EndSwitch
    WEnd

    GuiDelete()
    Opt('GUIOnEventMode', $guiOnEvent)
    Return $result
    EndFunc

    [/autoit]

    Einmal editiert, zuletzt von Sn0opy (28. Juni 2007 um 20:58)

  • Hi,

    ich wollte auch mal danke zu dem tollen Tool sagen und auch eine Fehlermeldung zeigen mit der ich nicht anfangen kann. Auch kann ich danach nichts mehr machen.

    Thomas

    MFG ThomasB

    *
    Ich lese viel und gerne (und wenn ich alle Mahnungen durch habe, schmeiße ich sie weg)
    *