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
Ich habe dazu eine Funktion Namens "Multi Inputbox" von lokster (autoitscript.com Forum) verwendet. Link zum Thread
UDF:
Spoiler anzeigen
;===============================================================================
;
; 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
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:
- 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
#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)
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
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)
; 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
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
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)
FileOpen(@ScriptDir &"\numbers.dat",1)
FileWrite("numbers.dat",$phoneaddinput[0] & "|" & $phoneaddinput[1])
EndSwitch
WEnd
EndFunc
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
[Blockierte Grafik: http://img-up.net/img/screenAtnQV.JPG]