Jimmy Posted September 11, 2012 Report Posted September 11, 2012 (edited) De plictiseala am facut un script in autoit care iti trimite sms pe telefon cand EUR/USD/GBP a ajuns la o anumita valoare setata de tine.1. Trebuie sa va face-ti cont pe smsglobal.2. In acel input baga-ti de exemplu pt euro ”4.5” , cand ajunge euro la 4.5*** primi-ti sms.3. Cine vrea poate sa adauge un timer, de exemplu sa verifice din 5 in 5 ore.4. Pute-ti modifica sursa de exemplu cand primi-ti un anumit email primi-ti sms, cand ave-ti un mesaj nou pe facebook , primi-ti sms...etc5. Am gresit categoria , trebuia la programare .#include <ButtonConstants.au3>#include <EditConstants.au3>#include <GUIConstantsEx.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>#include <IE.au3>#include <Inet.au3>#include <String.au3>$Valuta = GUICreate("Curs Valutar", 214, 210, 192, 124)GUISetBkColor(0x008000)$User = GUICtrlCreateInput("SMS_Global_User", 8, 15, 193, 21)$Pass = GUICtrlCreateInput("SMS_Global_Pass", 8, 55, 193, 21)$Phone = GUICtrlCreateInput("00407", 8, 95, 193, 21)$EUR = GUICtrlCreateRadio("EUR", 16, 130, 41, 25)$USD = GUICtrlCreateRadio("USD", 80, 130, 41, 25)$GBP = GUICtrlCreateRadio("GBP", 152, 130, 49, 25)$Value = GUICtrlCreateInput("0.0", 8, 172, 89, 20)$Alert_me = GUICtrlCreateButton("Alert_me", 112, 170, 89, 25)GUISetState(@SW_SHOW)While 1 $Msg = GUIGetMsg() Select Case $Msg = $Alert_me If GUICtrlRead($EUR) = 1 Then GUISetState(@SW_HIDE) TrayTip("", "Stau la panda", 5) Sleep(5000) _Eur() EndIf If GUICtrlRead($USD) = 1 Then GUISetState(@SW_HIDE) TrayTip("", "Stau la panda", 5) Sleep(5000) _Usd() EndIf If GUICtrlRead($GBP) = 1 Then GUISetState(@SW_HIDE) TrayTip("", "Stau la panda", 5) Sleep(5000) _Gbp() EndIf Case $Msg = $GUI_EVENT_CLOSE Exit EndSelectWEndFunc _Eur() While True $oIE = _IECreate("http://www.cursvalutar.ro/", 0, 0, 1) _IELoadWait($oIE) $HTML = _IEBodyReadHTML($oIE) $Money = _StringBetween($HTML, '<td>', '</td>') $Money2 = $Money[1] Local $Result = StringLeft($Money2, 3) Local $String = StringCompare(GUICtrlRead($Value), $Result) If $String = 0 Then _IENavigate($oIE, "https://www.smsglobal.com/mobileworks/signin.php") _IELoadWait($oIE) $Username = _IEGetObjByName($oIE, "username") $Password = _IEGetObjByName($oIE, "password") $Login = _IEGetObjByName($oIE, "SI") _IEFormElementSetValue($Username, GUICtrlRead($User)) _IEFormElementSetValue($Password, GUICtrlRead($Pass)) _IEAction($Login, "click") _IELoadWait($oIE) _IENavigate($oIE, "https://www.smsglobal.com/mobileworks/sendtono.php") _IELoadWait($oIE) $Nr = _IEGetObjByName($oIE, "p_cellphone") $From = _IEGetObjByName($oIE, "sms_from") $Sms = _IEGetObjByName($oIE, "message") $Send = _IEGetObjByName($oIE, "SI") _IEFormElementSetValue($Nr, GUICtrlRead($Phone)) _IEFormElementSetValue($From, "Valuta") _IEFormElementSetValue($Sms, "EUR a ajuns la " & $Money2) Sleep(10000) _IEAction($Send, "click") _IELoadWait($oIE) _IEQuit($oIE) Exit Else _IEQuit($oIE) EndIf WEndEndFunc ;==>_EurFunc _Usd() While True $oIE = _IECreate("http://www.cursvalutar.ro/", 1, 1, 0) _IELoadWait($oIE) $HTML = _IEBodyReadHTML($oIE) $Money = _StringBetween($HTML, '<td>', '</td>') $Money2 = $Money[6] Local $Result = StringLeft($Money2, 3) Local $String = StringCompare(GUICtrlRead($Value), $Result) If $String = 0 Then _IENavigate($oIE, "https://www.smsglobal.com/mobileworks/signin.php") _IELoadWait($oIE) $Username = _IEGetObjByName($oIE, "username") $Password = _IEGetObjByName($oIE, "password") $Login = _IEGetObjByName($oIE, "SI") _IEFormElementSetValue($Username, GUICtrlRead($User)) _IEFormElementSetValue($Password, GUICtrlRead($Pass)) _IEAction($Login, "click") _IELoadWait($oIE) _IENavigate($oIE, "https://www.smsglobal.com/mobileworks/sendtono.php") _IELoadWait($oIE) $Nr = _IEGetObjByName($oIE, "p_cellphone") $From = _IEGetObjByName($oIE, "sms_from") $Sms = _IEGetObjByName($oIE, "message") $Send = _IEGetObjByName($oIE, "SI") _IEFormElementSetValue($Nr, GUICtrlRead($Phone)) _IEFormElementSetValue($From, "Valuta") _IEFormElementSetValue($Sms, "USD a ajuns la " & $Money2) _IEAction($Send, "click") _IELoadWait($oIE) _IEQuit($oIE) Exit Else _IEQuit($oIE) EndIf WEndEndFunc ;==>_UsdFunc _Gbp() While True $oIE = _IECreate("http://www.cursvalutar.ro/", 0, 0, 1) _IELoadWait($oIE) $HTML = _IEBodyReadHTML($oIE) $Money = _StringBetween($HTML, '<td>', '</td>') $Money2 = $Money[66] Local $Result = StringLeft($Money2, 3) Local $String = StringCompare(GUICtrlRead($Value), $Result) If $String = 0 Then _IENavigate($oIE, "https://www.smsglobal.com/mobileworks/signin.php") _IELoadWait($oIE) $Username = _IEGetObjByName($oIE, "username") $Password = _IEGetObjByName($oIE, "password") $Login = _IEGetObjByName($oIE, "SI") _IEFormElementSetValue($Username, GUICtrlRead($User)) _IEFormElementSetValue($Password, GUICtrlRead($Pass)) _IEAction($Login, "click") _IELoadWait($oIE) _IENavigate($oIE, "https://www.smsglobal.com/mobileworks/sendtono.php") _IELoadWait($oIE) $Nr = _IEGetObjByName($oIE, "p_cellphone") $From = _IEGetObjByName($oIE, "sms_from") $Sms = _IEGetObjByName($oIE, "message") $Send = _IEGetObjByName($oIE, "SI") _IEFormElementSetValue($Nr, GUICtrlRead($Phone)) _IEFormElementSetValue($From, "Valuta") _IEFormElementSetValue($Sms, "GBP a ajuns la " & $Money2) _IEAction($Send, "click") _IELoadWait($oIE) _IEQuit($oIE) Exit Else _IEQuit($oIE) EndIf WEndEndFunc ;==>_Gbp Edited September 11, 2012 by Jimmy 1 Quote