AL3X Posted September 17, 2008 Share Posted September 17, 2008 (edited) -- Edited July 2, 2015 by AL3X Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 17, 2008 Moderators Share Posted September 17, 2008 I'm getting more confused :SLets see.If I find the SMTP of my operator, and I send a "sms" from my pc to my phone, will I be charged?*My operator doesn't charge me when I receive sms from "somebody".If you get free messages on your plan, then when you receive messages this way it will still be free. However, some plans charge people per message sent and per message received. So if you or whomever you're sending to has a plan like that ... you or they will be charged. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AL3X Posted September 17, 2008 Share Posted September 17, 2008 (edited) -- Edited July 2, 2015 by AL3X Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 17, 2008 Moderators Share Posted September 17, 2008 (edited) Thanks for the answers >_<Just one more question ¿If I send a sms from my pc, how could my operator charge me? :SIf you send it using your phone credentials.Keep in mind... This still goes through their server. Edited September 17, 2008 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AL3X Posted September 17, 2008 Share Posted September 17, 2008 (edited) -- Edited July 2, 2015 by AL3X Link to comment Share on other sites More sharing options...
LimeSeed Posted September 18, 2008 Author Share Posted September 18, 2008 Ok >_< I'll keep that in mind.Now... let's see if I can find the smtp of my operator MUHAHAHAHA !sorry, i only added support in the script for Verizon, Sprint, Tmobile, and AT&T, for others, you would have to edit the script global $warming = true Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted September 18, 2008 Share Posted September 18, 2008 Easy fix for the text flickering expandcollapse popup#NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=SMS.ico #AutoIt3Wrapper_outfile=SMS.exe #AutoIt3Wrapper_Res_Comment=By: Isaac Flaum #AutoIt3Wrapper_Res_Description=Allows computer to send SMS messages to phones #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=Isaac Flaum 2008 #AutoIt3Wrapper_Res_Language=1033 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiScrollBars.au3> #include<file.au3> #include<misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ScrollBarConstants.au3> #include <EditConstants.au3> $s_SmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED $s_FromName = "" ; name from who the email was sent $s_FromAddress = "" ; address from where the mail should come $s_ToAddress = "" ; destination address of the email - REQUIRED $s_Subject = "" ; subject from the email - can be anything you want it to be $as_Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail $s_AttachFiles = "" ; the file you want to attach- leave blank if not needed $s_CcAddress = "" ; address for cc - leave blank if not needed $s_BccAddress = "" ; address for bcc - leave blank if not needed $s_Username = "" ; username for the account used from where the mail gets sent - Optional (Needed for eg GMail) $s_Password = "" ; password for the account used from where the mail gets sent - Optional (Needed for eg GMail) $IPPort = 465 ; port used for sending the mail $ssl = 1 ; enables/disables secure socket layer sending - put to 1 if using httpS $readtxt = "" Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") GUICreate("SMS", 160, 180) $send = GUICtrlCreateButton("Send", 5, 150, 150, 25) $phonenum = GUICtrlCreateLabel("Phone Number:", 5, 5, 80, 20) $phonesubject = Guictrlcreatelabel("Subject:", 5, 30, 80, 20) $subject = guictrlcreateinput("", 50, 30, 105, 20) guictrlsetstate(-1, $GUI_DISABLE) $to = GUICtrlCreateInput("", 85, 5, 70, 20) $attatchment = GUICtrlCreateButton("Attatchment", 5, 55, 80, 20) $carrier = GUICtrlCreateCombo("Carrier", 90, 55, 65, 20) GUICtrlSetData(-1, "Verizon|AT&T|Sprint|T-Mobile", "Carrier") $numchar = GUICtrlCreateLabel("Characters Left: 160", 5, 130, 100, 20) $txt = GUICtrlCreateEdit("", 5, 85, 150, 40, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) guisetbkcolor(0x99cc66) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = $attatchment) $s_AttachFiles = FileOpenDialog("Attatchment", @DesktopDir, "Files (*.mid;*.gif;*.jpg;*.mp3)") guictrlsetstate($subject, $GUI_ENABLE) Case ($msg = -3) Exit Case GUICtrlRead($txt) <> $readtxt $readtxt = GUICtrlRead($txt) $length = StringLen($readtxt) $actualchar = Execute(160 - $length) GUICtrlSetData($numchar, "Characters Left: " & $actualchar) Case ($msg = $send) $s_Subject = guictrlread($subject) $as_Body = GUICtrlRead($txt) $s_ToAddress = GUICtrlRead($to) $wacarrier = GUICtrlRead($carrier) Select Case ($wacarrier = "Verizon") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@vtext.com" Else $s_ToAddress = $s_ToAddress & "@vzwpix.com" EndIf Case ($wacarrier = "AT&T") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@txt.att.net" Else $s_ToAddress = $s_ToAddress & "@mobile.att.net" EndIf Case ($wacarrier = "Sprint") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@messaging.sprintpcs.com" Else $s_ToAddress = $s_ToAddress & "@messaging.sprintpcs.com" EndIf Case ($wacarrier = "T-Mobile") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@tmomail.net" Else $s_ToAddress = $s_ToAddress & "@tmomail.net" EndIf EndSelect $sendprog = ProgressOn("Sending", "Sending Message...") $rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Rc:" & $rc) EndIf EndSelect WEnd Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) ProgressSet(10) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' ProgressSet(20) $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" ProgressSet(30) If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment($S_Files2Attach[$x]) Else $i_Error_desciption = $i_Error_desciption & @LF & 'File not found to attach: ' & $S_Files2Attach[$x] SetError(1) Return 0 EndIf Next EndIf ProgressSet(40) $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ProgressSet(60) ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ProgressSet(80) ;Update settings $objEmail.Configuration.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf ProgressSet(100) ProgressOff() EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
theguy0000 Posted September 18, 2008 Share Posted September 18, 2008 I use verizon and have unlimited text and data usage but get charged $0.25 for texts sent to and from email The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
lordicast Posted September 18, 2008 Share Posted September 18, 2008 Updated it with more providers because i was bored so bout the code size i dont got that down yet expandcollapse popup#NoTrayIcon #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=SMS.ico #AutoIt3Wrapper_outfile=SMS.exe #AutoIt3Wrapper_Res_Comment=By: Isaac Flaum #AutoIt3Wrapper_Res_Description=Allows computer to send SMS messages to phones #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=Isaac Flaum 2008 #AutoIt3Wrapper_Res_Language=1033 #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiScrollBars.au3> #include<file.au3> #include<misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ScrollBarConstants.au3> #include <EditConstants.au3> $s_SmtpServer = "smtp.gmail.com"; address for the smtp-server to use - REQUIRED $s_FromName = ""; name from who the email was sent $s_FromAddress = ""; address from where the mail should come $s_ToAddress = ""; destination address of the email - REQUIRED $s_Subject = ""; subject from the email - can be anything you want it to be $as_Body = ""; the messagebody from the mail - can be left blank but then you get a blank mail $s_AttachFiles = ""; the file you want to attach- leave blank if not needed $s_CcAddress = ""; address for cc - leave blank if not needed $s_BccAddress = ""; address for bcc - leave blank if not needed $s_Username = ""; username for the account used from where the mail gets sent - Optional (Needed for eg GMail) $s_Password = ""; password for the account used from where the mail gets sent - Optional (Needed for eg GMail) $IPPort = 465; port used for sending the mail $ssl = 1; enables/disables secure socket layer sending - put to 1 if using httpS $readtxt = "" Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") GUICreate("SMS", 220, 180) $send = GUICtrlCreateButton("Send", 5, 150, 150, 25) $phonenum = GUICtrlCreateLabel("Phone Number:", 5, 5, 80, 20) $phonesubject = Guictrlcreatelabel("Subject:", 5, 30, 80, 20) $subject = guictrlcreateinput("", 50, 30, 105, 20) guictrlsetstate(-1, $GUI_DISABLE) $to = GUICtrlCreateInput("", 85, 5, 70, 20) $attatchment = GUICtrlCreateButton("Attatchment", 5, 55, 80, 20) $carrier = GUICtrlCreateCombo("Carrier", 90, 55, 115, 20) GUICtrlSetData(-1, "Verizon|AT&T|Sprint|T-Mobile|Rogers Wireless|Cingular|Bell Atlantic|Bell Mobility Canada|Cingular One|Comcast|Fido|Telus|My Cricket", "Carrier") $numchar = GUICtrlCreateLabel("Characters Left: 160", 5, 130, 100, 20) $txt = GUICtrlCreateEdit("", 5, 85, 150, 40, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) guisetbkcolor(0x99cc66) GUISetState(@SW_SHOW) ; While 1 $msg = GUIGetMsg() Select Case ($msg = $attatchment) $s_AttachFiles = FileOpenDialog("Attatchment", @DesktopDir, "Files (*.mid;*.gif;*.jpg;*.mp3)") guictrlsetstate($subject, $GUI_ENABLE) Case ($msg = -3) Exit Case GUICtrlRead($txt) <> $readtxt $readtxt = GUICtrlRead($txt) $length = StringLen($readtxt) $actualchar = Execute(160 - $length) GUICtrlSetData($numchar, "Characters Left: " & $actualchar) Case ($msg = $send) $s_Subject = guictrlread($subject) $as_Body = GUICtrlRead($txt) $s_ToAddress = GUICtrlRead($to) $wacarrier = GUICtrlRead($carrier) Select Case ($wacarrier = "Verizon") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@vtext.com" Else $s_ToAddress = $s_ToAddress & "@vzwpix.com" EndIf Case ($wacarrier = "Rogers Wireless") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@pcs.rogers.com" Else $s_ToAddress = $s_ToAddress & "@pcs.rogers.com" EndIf Case ($wacarrier = "Cingular") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@cingularme.com" Else $s_ToAddress = $s_ToAddress & "@cingularme.com" EndIf Case ($wacarrier = "Bell Atlantic") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@message.bam.com" Else $s_ToAddress = $s_ToAddress & "@message.bam.com" EndIf Case ($wacarrier = "Bell Mobility Canada") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@txt.bell.ca" Else $s_ToAddress = $s_ToAddress & "@txt.bell.ca" EndIf Case ($wacarrier = "Cingular One") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@mobile.celloneusa.com" Else $s_ToAddress = $s_ToAddress & "@mobile.celloneusa.com" EndIf Case ($wacarrier = "Comcast") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@comcastpcs.textmsg.com" Else $s_ToAddress = $s_ToAddress & "@comcastpcs.textmsg.com" EndIf Case ($wacarrier = "Fido") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@fido.ca" Else $s_ToAddress = $s_ToAddress & "@fido.ca" EndIf Case ($wacarrier = "Telus") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "msg.telus.com" Else $s_ToAddress = $s_ToAddress & "msg.telus.com" EndIf Case ($wacarrier = "My Cricket") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@mms.mycricket.com" Else $s_ToAddress = $s_ToAddress & "@sms.mycricket.com" EndIf Case ($wacarrier = "AT&T") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@txt.att.net" Else $s_ToAddress = $s_ToAddress & "@mobile.att.net" EndIf Case ($wacarrier = "Sprint") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@messaging.sprintpcs.com" Else $s_ToAddress = $s_ToAddress & "@messaging.sprintpcs.com" EndIf Case ($wacarrier = "T-Mobile") If $s_AttachFiles = "" Then $s_ToAddress = $s_ToAddress & "@tmomail.net" Else $s_ToAddress = $s_ToAddress & "@tmomail.net" EndIf EndSelect $sendprog = ProgressOn("Sending", "Sending Message...") $rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Rc:" & $rc) EndIf EndSelect WEnd Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) ProgressSet(10) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' ProgressSet(20) $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" ProgressSet(30) If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment($S_Files2Attach[$x]) Else $i_Error_desciption = $i_Error_desciption & @LF & 'File not found to attach: ' & $S_Files2Attach[$x] SetError(1) Return 0 EndIf Next EndIf ProgressSet(40) $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ProgressSet(60) ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ProgressSet(80) ;Update settings $objEmail.Configuration.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf ProgressSet(100) ProgressOff() EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Sicapo Posted September 18, 2008 Share Posted September 18, 2008 ...Too bad Virgin Mobiles not in the list by default ...For Virgin Mobile in Canada it's:@vmobile.ca Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted September 18, 2008 Share Posted September 18, 2008 (edited) Updated it with more providers because i was bored >_< so bout the code size i dont got that down yet Included above suggestions, with a smaller size expandcollapse popup#NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=SMS.ico #AutoIt3Wrapper_outfile=SMS.exe #AutoIt3Wrapper_Res_Comment=By: Isaac Flaum #AutoIt3Wrapper_Res_Description=Allows computer to send SMS messages to phones #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=Isaac Flaum 2008 #AutoIt3Wrapper_Res_Language=1033 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiScrollBars.au3> #include<file.au3> #include<misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ScrollBarConstants.au3> #include <EditConstants.au3> #include <GuiComboBox.au3> $s_SmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED $s_FromName = "" ; name from who the email was sent $s_FromAddress = "" ; address from where the mail should come $s_ToAddress = "" ; destination address of the email - REQUIRED $s_Subject = "" ; subject from the email - can be anything you want it to be $as_Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail $s_AttachFiles = "" ; the file you want to attach- leave blank if not needed $s_CcAddress = "" ; address for cc - leave blank if not needed $s_BccAddress = "" ; address for bcc - leave blank if not needed $s_Username = "" ; username for the account used from where the mail gets sent - Optional (Needed for eg GMail) $s_Password = "" ; password for the account used from where the mail gets sent - Optional (Needed for eg GMail) $IPPort = 465 ; port used for sending the mail $ssl = 1 ; enables/disables secure socket layer sending - put to 1 if using httpS ; [0]= Company, ; [1]= Web Address ; [2]= Alternate Web Address ; [3]= Number format Global $avCarriers[14][4] = [ _ ['AT&T PCS', 'txt.att.net', 'mobile.att.net', '%d'], _ ['Bell Atlantic', 'message.bam.com', '', '%d'], _ ['Bell Mobility (Canada)', 'txt.bell.ca', '', '%d'], _ ['Cingular Wireless', 'cingularme.com', '', '1%d'], _ ['Cellular One', 'mobile.celloneusa.com','', '%d'], _ ['Comcast', 'comcastpcs.textmsg.com', '','%d'], _ ['Cricket', 'sms.mycricket.com', '','%d'], _ ['Fido', 'fido.ca', '','%d'], _ ['Rogers Wireless', 'pcs.rogers.com', '', '%d'], _ ['Sprint PCS', 'messaging.sprintpcs.com', '', '%d'], _ ['T-Mobile', 'tmomail.net', '', '%d'], _ ['Telus', 'msg.telus.com', '','%d'], _ ['Verizon Wireless', 'vtext.com', 'vzwpix.com', '%d'], _ ['Virgin Mobile Canada', '@vmobile.ca', '','%d'] _ ] Global $readtxt = "" Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") GUICreate("SMS", 200, 180) $send = GUICtrlCreateButton("Send", 5, 150, 150, 25) $phonenum = GUICtrlCreateLabel("Phone Number:", 5, 5, 100, 20) $phonesubject = Guictrlcreatelabel("Subject:", 5, 30, 120, 20) $subject = guictrlcreateinput("", 50, 30, 140, 20) guictrlsetstate(-1, $GUI_DISABLE) $to = GUICtrlCreateInput("", 85, 5, 100, 20) GUICtrlSetLimit(-1, 20, 7) $attatchment = GUICtrlCreateButton("Attatchment", 5, 55, 80, 20) $carrier = GUICtrlCreateCombo("Carrier", 90, 55, 100, 20, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) For $i = 0 To UBound($avCarriers)-1 _GUICtrlComboBox_AddString($carrier, $avCarriers[$i][0]) Next $numchar = GUICtrlCreateLabel("Characters Left: 160", 5, 130, 100, 20) $txt = GUICtrlCreateEdit("", 5, 85, 180, 40, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetLimit(-1, 160) guisetbkcolor(0x99cc66) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case ($msg = $attatchment) $s_AttachFiles = FileOpenDialog("Attatchment", @DesktopDir, "Files (*.mid;*.gif;*.jpg;*.mp3)") guictrlsetstate($subject, $GUI_ENABLE) Case ($msg = -3) Exit Case GUICtrlRead($txt) <> $readtxt $readtxt = GUICtrlRead($txt) $length = StringLen($readtxt) $actualchar = Execute(160 - $length) GUICtrlSetData($numchar, "Characters Left: " & $actualchar) Case ($msg = $send) $s_Subject = guictrlread($subject) $as_Body = GUICtrlRead($txt) $s_ToAddress = GUICtrlRead($to) $iSelect = _GUICtrlComboBox_GetCurSel($carrier) -1 If $iSelect >= 0 Or $iSelect <= UBound($avCarriers)-1 And StringLen($s_ToAddress) Then $wacarrier = $avCarriers[$iSelect][0] If $s_AttachFiles <> "" Then If $avCarriers[$iSelect][2] <> "" Then $avCarriers[$iSelect][1] = $avCarriers[$iSelect][2] EndIf EndIf $s_ToAddress = StringFormat($avCarriers[$iSelect][3], $s_ToAddress) &'@'& $avCarriers[$iSelect][1] ConsoleWrite($s_ToAddress &@lf) $sendprog = ProgressOn("Sending", "Sending Message...") $rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Rc:" & $rc) EndIf EndIf EndSelect WEnd Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) ProgressSet(10) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' ProgressSet(20) $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" ProgressSet(30) If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment($S_Files2Attach[$x]) Else $i_Error_desciption = $i_Error_desciption & @LF & 'File not found to attach: ' & $S_Files2Attach[$x] SetError(1) Return 0 EndIf Next EndIf ProgressSet(40) $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ProgressSet(60) ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ProgressSet(80) ;Update settings $objEmail.Configuration.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf ProgressSet(100) ProgressOff() EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler Edited September 18, 2008 by mrRevoked Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
LimeSeed Posted September 21, 2008 Author Share Posted September 21, 2008 Thanks for the post, though I don't know if one could call that the best SMS text messaging tool out there. Aside from AutoIt's GUI interface options, this could be written in VBScript, VB, or .NET w/ C#/VB. The options with this tool are limited as it doesn't cover worldwide SMS and if you want to support SMS providers not listed, you will have to add more code to the tool, which is ok though if you are a developer/scripter. Too bad Virgin Mobiles not in the list by default >_<Also wanted to mention some things:This is a bit inappropriate but you could get the same thing by hacking Google's Send To Phone feature. Just look into the Send To Phone Page's HTML and you can build a form submission script that posts to the Google service. It need not be written in AutoIt only. You can do this with XMLHttpRequest COM object within VBScript or AutoIt script. With this approach you need not know the SMS email format and you can send to whatever service provider Google supports.For an SMS tool that doesn't require supplying SMTP account credentials, check out mxmail.exe that I developed, available at: http://www.codeproject.com/KB/tips/easysmtpandsms.aspxIt's a command line executable. I had been wanting to build a COM version (which you could use with AutoIt), but don't have the expertise to do that right now. If there are COM component developers here, maybe you can give me some pointers on how to build it.arn't you special? global $warming = true Link to comment Share on other sites More sharing options...
M a k a v e l ! Posted February 1, 2009 Share Posted February 1, 2009 (edited) I get this error when running...The requested action with this object has failed.:$objEmail.Send$objEmail.Send^ ERRORSame. Do you have more info on that object --> $objEmail = ObjCreate("CDO.Message") Something to install, cdosys.dll ? Edited February 1, 2009 by M a k a v e l ! [font="Lucida Sans Unicode"]M a k. a v e L ![/font] Link to comment Share on other sites More sharing options...
Inverted Posted February 1, 2009 Share Posted February 1, 2009 So, if I ask someone how atomic bomb works and that someone says:where it says press, you need to presswhere it says press again, you press againok?and I say ok.and he says: don't ask me that stupid question again.and I say ok, sorry... and thanks, now I know how atomic bomb works.Ahaha, that made me laugh ! Link to comment Share on other sites More sharing options...
FireFox Posted February 1, 2009 Share Posted February 1, 2009 It could be usefull...but how does it work for france ? I always get '.send' error Cheers, FireFox. Link to comment Share on other sites More sharing options...
Krol Posted February 2, 2009 Share Posted February 2, 2009 More Email_To_SMS Gateways here: http://www.mutube.com/projects/open-email-...s/gateway-list/ Link to comment Share on other sites More sharing options...
yehia Posted February 2, 2009 Share Posted February 2, 2009 yeah im getting the ".send" error My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
GHOSTSKIKDA Posted February 24, 2009 Share Posted February 24, 2009 nice !!!!!!!! [center]I LOVE ALGERIA .... ;-)[/center] Link to comment Share on other sites More sharing options...
element72 Posted March 3, 2014 Share Posted March 3, 2014 (edited) Is this still the best SMS messenger for autoit? Edited March 3, 2014 by element72 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