toxicvn Posted December 19, 2008 Share Posted December 19, 2008 code:#Region ;**** Directives created by AutoIt3Wrapper_GUI ****#AutoIt3Wrapper_icon=cell.ico#AutoIt3Wrapper_outfile=SMSSender.exe#AutoIt3Wrapper_Compression=4#AutoIt3Wrapper_Res_Comment=-#AutoIt3Wrapper_Res_Description=Sending a SMS to a Mobilephone#AutoIt3Wrapper_Res_Fileversion=2.0.0.0#AutoIt3Wrapper_Res_LegalCopyright=GtaSpider#AutoIt3Wrapper_Res_Language=1031#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****;==============================================================;========================Script by GtaSpider========================;==========================Standart Editon=========================;==============================================================;Very much thanks to lod3n for examples & PaulIA for the A3LGDIPlus.au3#region Initalizing#include <A3LGDIPlus.au3> ; Wird für das PNG bild gebraucht!#include <GuiCombo.au3>#Include <File.au3>#include <Array.au3>#include <ie.au3>#include <GUIConstants.au3>#include <inet.au3>Opt("TrayIconDebug", 1)HotKeySet("{ESC}", "ProbExit")HotKeySet("{TAB}", "ProbContrSwitch")_GDIP_Startup ()$pngSrcNok = @ScriptDir & "\pics\nok.png"$hImageNok = _GDIP_ImageLoadFromFile ($pngSrcNok)$hWidthNok = _GDIP_ImageGetWidth ($hImageNok)$hHeightNok = _GDIP_ImageGetHeight ($hImageNok)$pngSrcAero = @ScriptDir & "\pics\aero2.png"$hImageAero = _GDIP_ImageLoadFromFile ($pngSrcAero)$hWidthAero = _GDIP_ImageGetWidth ($hImageAero)$hHeightAero = _GDIP_ImageGetHeight ($hImageAero)Global Const $AC_SRC_ALPHA = 1Global Const $ULW_ALPHA = 2Global $IDList[12], $controlGui, $maingui, $hImageNok$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] = '201'$IDList[11] = '144';standart server#endregion Initalizing#region OnlineGUI$onlinegui = GUICreate("Server list", $hWidthAero, $hHeightAero, -1, -1, $WS_POPUP + $WS_TABSTOP, $WS_EX_LAYERED)$controlonGui = GUICreate("ctrl", $hWidthAero, $hHeightAero, 0, -20, $WS_POPUP + $WS_TABSTOP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $onlinegui)GUICtrlCreatePic(@ScriptDir & "\pics\grey.gif", 0, 0, $hWidthNok, $hHeightNok)GUICtrlSetState(-1, $GUI_DISABLE)$OnlCombo = GUICtrlCreateCombo("Server " & $IDList[11] & " (Default)", 8, 8, 200, 20)For $i = 0 To UBound($IDList) - 2 GUICtrlSetData(-1, "Server " & $IDList[$i])Next$RadioTop = 8$RadioLeft = 8SetBitmap($onlinegui, $hImageAero, 0)GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")GUISetState(@SW_SHOW, $onlinegui)GUISetState(@SW_SHOW, $controlonGui)For $i = 0 To 255 Step 10 SetBitmap($onlinegui, $hImageAero, $i)NextSetBitmap($onlinegui, $hImageAero, 255)$nextbut = GUICtrlCreateButton("> > N e x t > >", 8, 35, 200, 25, $BS_DEFPUSHBUTTON)GUISetState()While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $nextbut $tmp = GUICtrlRead($OnlCombo) $tmp = StringRegExpReplace($tmp, '\D', '') If (Not StringLen($tmp)) Or _INetGetSource('http://www.smsgott.de/?id=' & $tmp & '&a=p_f&track=false') = 'Free SMS temporär wegen Wartungsarbeiten nicht verfügbar.' Then MsgBox(48,"Error","Wrong Server ID!") ContinueLoop EndIf GUIDelete($onlinegui) GUIDelete($controlonGui) ExitLoop EndSwitchWEnd#endregion OnlineGUI#region GlobalsGlobal $CellularNumber = '+49'Global $Message = ""Global $ID = $tmpGlobal $ExitLoop = 0Global $oIE = _IECreateEmbedded()#endregion#region - CmdlineIf $CMDLINE[0] > 2 Then Global $CellularNumber = $CMDLINE[1] Global $Message = $CMDLINE[2] Global $ID = $IDList[$CMDLINE[3]]EndIf#endregion#region WaitGUI$waitgui = GUICreate("", $hWidthAero, $hHeightAero, -1, -1, $WS_POPUP + $WS_TABSTOP, $WS_EX_LAYERED+$WS_EX_TOOLWINDOW)$controlwaGui = GUICreate("ctrl", $hWidthAero, $hHeightAero, 0, -20, $WS_POPUP + $WS_TABSTOP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $waitgui)GUICtrlCreatePic(@ScriptDir & "\pics\grey.gif", 0, 0, $hWidthNok, $hHeightNok)GUICtrlSetState(-1, $GUI_DISABLE)GUICtrlCreateLabel("Please wait while connect to SMS Gateway...", 4, 12, 210, 66, $SS_CENTER)GUICtrlSetBkColor(-1, -2)GUICtrlSetFont(-1, 14)GUICtrlSetColor(-1, 0xffffff)SetBitmap($waitgui, $hImageAero, 255)GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")#endregion WaitGUI#region captchagui$wgpProg = WinGetPos('Program Manager')$ScreenyWindow = GUICreate("", $wgpProg[2], $wgpProg[3], $wgpProg[0], $wgpProg[1], $WS_POPUP, $WS_EX_TOPMOST)GUISetBkColor(0)WinSetTrans($ScreenyWindow, "", 155)$captchagui = GUICreate("", 160, 47, -1, -1, -1, -1, $ScreenyWindow)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 Sender", $hWidthNok, $hHeightNok, -1, -1, $WS_POPUP + $WS_TABSTOP, $WS_EX_LAYERED)$controlGui = GUICreate("ctrl", $hWidthNok, $hHeightNok, 0, 0, $WS_POPUP + $WS_TABSTOP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $maingui)GUICtrlCreatePic(@ScriptDir & "\pics\grey.gif", 0, 0, $hWidthNok, $hHeightNok)GUICtrlSetState(-1, $GUI_DISABLE)$inpcell = GUICtrlCreateInput($CellularNumber, 100, 218, 245, 40, $WS_TABSTOP, 0)GUICtrlSetResizing(-1, 802)GUICtrlSetBkColor(-1, 0xE8E8E8)GUICtrlSetFont(-1, 14)$edit = GUICtrlCreateEdit($Message, 100, 288, 245, 145, $ES_AUTOVSCROLL, 0)GUICtrlSetResizing(-1, 802)GUICtrlSetLimit(-1, 147)GUICtrlSetBkColor(-1, 0xE8E8E8)GUICtrlSetFont(-1, 14)$prog = GUICtrlCreateProgress(90, 165, 260, 20, 0)GUICtrlSetResizing(-1, 802)GUICtrlSetState(-1, $GUI_HIDE)$conbut = GUICtrlCreateButton("Send at Server " & $ID, 90, 165, 260, 20, 0)GUICtrlSetResizing(-1, 802)SetBitmap($maingui, $hImageNok, 0)GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")GUISetState(@SW_SHOW, $maingui)GUISetState(@SW_SHOW, $controlGui)For $i = 0 To 255 Step 10 SetBitmap($maingui, $hImageNok, $i)NextSetBitmap($maingui, $hImageNok, 255)#endregion maingui#region MainWhileWhile 1 GUICtrlSetData($conbut, 'Send at Server ' & $ID) GUICtrlSetState($inpcell, $GUI_ENABLE) GUICtrlSetState($edit, $GUI_ENABLE) GUICtrlSetState($prog, $GUI_HIDE) GUICtrlSetState($conbut, $GUI_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $conbut $CellularNumber = GUICtrlRead($inpcell) $Message = GUICtrlRead($edit) GUICtrlSetState($prog, $GUI_SHOW) GUICtrlSetState($conbut, $GUI_HIDE) GUICtrlSetState($inpcell, $GUI_DISABLE) GUICtrlSetState($edit, $GUI_DISABLE) _SendSMS($CellularNumber, $Message) $error = @error ExitLoop EndSwitch WEnd If $error Then MsgBox(48, "SMS Sender - By GtaSpider", "Wrong Mobile Phone Number! Error Code: " & @error) ContinueLoop EndIf GUISetState(@SW_SHOW, $ScreenyWindow) GUISetState(@SW_SHOW, $captchagui) GUISetState(@SW_SHOW, $childgui) WinSetOnTop($captchagui, "", 1) GUICtrlSetState($inpCode, $GUI_FOCUS) HotKeySet("{ENTER}", "_EnterCode") While GUIGetMsg() <> $GUI_EVENT_CLOSE If $ExitLoop Then ExitLoop WEnd ExitWEndExit#endregion MainWhile#region FunctionsFunc ProbExit() If WinActive($controlGui) Or WinActive($maingui) Then Exit Else HotKeySet("{ESC}") Send("{ESC}") HotKeySet("{ESC}", "ProbExit") EndIf EndFunc ;==>ProbExitFunc ProbContrSwitch() If WinActive($controlGui) Or WinActive($maingui) Then If ControlGetHandle($controlGui, '', ControlGetFocus($controlGui)) = ControlGetHandle($controlGui, "", $edit) Then GUICtrlSetState($conbut, $GUI_FOCUS) ElseIf ControlGetHandle($controlGui, '', ControlGetFocus($controlGui)) = ControlGetHandle($controlGui, "", $inpcell) Then GUICtrlSetState($edit, $GUI_FOCUS) ElseIf ControlGetHandle($controlGui, '', ControlGetFocus($controlGui)) = ControlGetHandle($controlGui, "", $conbut) Then GUICtrlSetState($inpcell, $GUI_FOCUS) EndIf Else HotKeySet("{TAB}") Send("{TAB}") HotKeySet("{TAB}", "ProbContrSwitch") Return EndIfEndFunc ;==>ProbContrSwitchFunc _SendSMS($iCelNumb, $sMessage) GUICtrlSetData($prog, 5) Local $oSmsbox, $oMess, $oNumb, $oContBut, $sReadHtml If StringLen($sMessage) > 147 Then Return SetError(1, 0, -1) $iCelNumb = StringReplace($iCelNumb, "+", "00") If StringLen($iCelNumb) > 15 Then Return SetError(2, 0, -1) If Not StringIsDigit($iCelNumb) Then Return SetError(3, 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 ;==>_SendSMSFunc _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) GUISetState(@SW_HIDE, $ScreenyWindow) GUICtrlSetData($prog, 85) $oSmsform = _IEFormGetObjByName($oIE, "smsform") $oCaptcha = _IEFormElementGetObjByName($oSmsform, 'captcha') _IEFormElementSetValue($oCaptcha, GUICtrlRead($inpCode)) GUICtrlSetData($prog, 95) GUISetState(@SW_SHOW, $waitgui) GUISetState(@SW_SHOW, $controlwaGui) _IENavigate($oIE, 'java script:verifySMS()') GUISetState(@SW_HIDE, $waitgui) GUISetState(@SW_HIDE, $controlwaGui) $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 ;==>_EnterCodeFunc OnAutoItExit() GUIDelete($controlGui) ;fade out png background For $i = 255 To 0 Step - 10 SetBitmap($maingui, $hImageNok, $i) Next _API_DeleteObject ($hImageNok) ExitEndFunc ;==>OnAutoItExitFunc WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) If ($hWnd = $maingui) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION If ($hWnd = $onlinegui) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTIONEndFunc ;==>WM_NCHITTESTFunc SetBitmap($hGUI, $hImageNok, $iOpacity, $hWidth = '', $hHeight = '') Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend If $hWidth = '' Then $hWidth = _GDIP_ImageGetWidth ($hImageNok) If $hHeight = '' Then $hHeight = _GDIP_ImageGetHeight ($hImageNok) $hScrDC = _API_GetDC (0) $hMemDC = _API_CreateCompatibleDC ($hScrDC) $hBitmap = _GDIP_BitmapCreateHBITMAPFromBitmap ($hImageNok) $hOld = _API_SelectObject ($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $hWidth) DllStructSetData($tSize, "Y", $hHeight) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _API_UpdateLayeredWindow ($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _API_ReleaseDC (0, $hScrDC) _API_SelectObject ($hMemDC, $hOld) _API_DeleteObject ($hBitmap) _API_DeleteDC ($hMemDC)EndFunc ;==>SetBitmap#endregion Funcitonsdown:http://www.autoit.de/index.php?page=Attach...97c69e950ff3937http://www.autoit.de/index.php?page=Thread...d=3033&sid= Link to comment Share on other sites More sharing options...
Aladdin Posted December 19, 2008 Share Posted December 19, 2008 Please use AutoIt/Code Tags for posting scripts and also tell us about it's use and information. _______________________________ Link to comment Share on other sites More sharing options...
oMBRa Posted December 19, 2008 Share Posted December 19, 2008 (edited) looks like it sends a sms to a mobile phone Edited December 19, 2008 by oMBra Link to comment Share on other sites More sharing options...
ProgAndy Posted December 19, 2008 Share Posted December 19, 2008 (edited) You shouldn't use this tool. In the german forum, there was a script for SMSGott, too, but SMSGott forced us top stop developing it, since he doesn't get any money for the SMS sent with the tool.-> http://www.autoit.de/index.php?page=Thread...26378#post26378-> http://www.autoit.de/index.php?page=Thread...26402#post26402//Edit: Actually, this is the SAME tool as the one posted here. If toxicvn didn't modify it, it won#t work anymore... Edited December 19, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
youknowwho4eva Posted December 19, 2008 Share Posted December 19, 2008 Or you could just email them.http://www.makeuseof.com/tag/email-to-sms/ as long as you know the carrier. Giggity Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now