DisabledMonkey Posted September 15, 2010 Share Posted September 15, 2010 (edited) Description:Have you ever wanted your AutoIT program to be able to send alerts or other messages to your phone? Well here is a possible solution. All you need is an email account that allows you to use SMTP and the Number and Service Provider of the phone you wish to message. Constants for the different service providers can be found in the UDF.Example Usage:#include "SMS.au3" $server = "smtp.gmail.com" $email = "xxx@xxx.xxx" $username = "xxx@xxx.xxx" $password = "xxxxxxxx" $port = 465 $ssl = 1 $number = xxxxxxxxxx $service = $T_MOBILE $message = "Hello, This is an AutoIT SMS" $message2 = "Yep..." $sms = _SMS_Start($server,$email,$username,$password,$port,$ssl) _SMS_Send($sms,$number,$service,$message)The UDF:Old Versions:SMS.au3Most Recent Version:SMS.au3Thanks:This UDF's SMTP capabilities are taken from Jos' SMTP UDF... Thank you Jos.If you have any suggestions, questions, or anything else, just let me know.Thanks for your time,Disabled Monkey Edited September 21, 2010 by DisabledMonkey rstolfa 1 Link to comment Share on other sites More sharing options...
jazzyjeff Posted September 15, 2010 Share Posted September 15, 2010 Cool UDF. I am getting these errors: C:\Program Files\AutoIt3\Include\SMS.au3(172,26) : WARNING: $oMyRet: possibly used before declaration. Return $oMyRet[1] ~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\SMS.au3(181,38) : WARNING: $oMyError: possibly used before declaration. $HexNumber = Hex($oMyError.number, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\SMS.au3(124,58) : WARNING: $oMyError: declared global in function only. Prefer top of file. Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\carrollje\Desktop\AutoIT Script\sms\smsTEST.au3 - 0 error(s), 3 warning(s) ->15:17:39 AU3Check ended.rc:1 >Running:(3.3.6.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Users\carrollje\Desktop\AutoIT Script\sms\smsTEST.au3" C:\Program Files\AutoIt3\Include\SMS.au3 (182) : ==> Subscript used with non-Array variable.: $oMyRet[0] = $HexNumber $oMyRet^ ERROR ->15:17:42 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 4.207 Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 15, 2010 Author Share Posted September 15, 2010 (edited) Cool UDF.I am getting these errors:Hey, Thanks for the interest,Like I said, I used Jos' SMTP UDF and I missed copying over the error checking correctly. I modified the UDF in the first post. You shouldn't get those errors now, but it probably won't work because your SMTP isn't working properly.Let me know if you have more questions,DisabledMonkey Edited September 15, 2010 by DisabledMonkey Link to comment Share on other sites More sharing options...
pierrotm777 Posted September 16, 2010 Share Posted September 16, 2010 (edited) Wonderfull , genial, Can you add the French providers please ? SFR, ORANGE and BOUYGUES. For SFR, Global Const $SFR_FRANCE = "@sfr.fr" Thanks for this share I have also an error ! ~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3(180,38) : WARNING: $oMyError: possibly used before declaration. $HexNumber = Hex($oMyError.number, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SendSMS.au3(6,13) : ERROR: syntax error (illegal character) $password = " ~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3(125,58) : WARNING: $oMyError: declared global in function only. Prefer top of file. Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SendSMS.au3 - 1 error(s), 3 warning(s) !>13:01:43 AU3Check ended.rc:2 >Exit code: 0 Time: 81.106 Edited September 16, 2010 by pierrotm777 Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 16, 2010 Author Share Posted September 16, 2010 @pierrotm777 - Your error is in what you have for the example script. It's having trouble parsing your password. Make sure you have it in there correctly.Updated UDF in first post:Added SFR and BOUYGUES. Couldn't find ORANGE for france. You might be able to use one of the other orange servers, not really sure.Made it so you no longer get the two WARNING messages about the variables.A few notes about using this UDF:If it doesn't seem to be working. Chances are your SMTP settings are wrong.Check with your email service provider to find out what its settings for SMTP are, they vary (especially the port).If it still doesn't seem to be working. Check my udf's constants to make sure it is correct for the phone service provider for the number you are trying to text. I grabbed this list online and therefore cannot guarantee that it is fully up-to-date and correct.Once again, if you have any questions, comments, etc, just let me know.Thanks,DisabledMonkey Link to comment Share on other sites More sharing options...
pierrotm777 Posted September 16, 2010 Share Posted September 16, 2010 (edited) Yes , i have already found this error , but i have always the 3 warning ! >"D:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SendSMS.au3" /autoit3dir "D:\Program Files\AutoIt3" /UserParams +>13:33:41 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:040C Keyboard:0000040C OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86) >Running AU3Check (1.54.19.0) from:D:\Program Files\AutoIt3 D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3(174,26) : WARNING: $oMyRet: possibly used before declaration. Return $oMyRet[1] ~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3(182,38) : WARNING: $oMyError: possibly used before declaration. $HexNumber = Hex($oMyError.number, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3(127,58) : WARNING: $oMyError: declared global in function only. Prefer top of file. Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SendSMS.au3 - 0 error(s), 3 warning(s) ->13:33:41 AU3Check ended.rc:1 >Running:(3.3.6.1):\Program Files\AutoIt3\autoit3.exe "D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SendSMS.au3" +>13:33:45 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 5.574 Edited September 16, 2010 by pierrotm777 Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 16, 2010 Author Share Posted September 16, 2010 Yes , i have already found this error , but i have always the 3 warning !Like I said in the last post, I updated the UDF in the first post, re-download it and the warnings will magically disappear Link to comment Share on other sites More sharing options...
ludocus Posted September 16, 2010 Share Posted September 16, 2010 (edited) So I have a gmail account. Now can I do: $server = "smtp.gmail.com" $email = "ludoischill@gmail.com" $username = "ludoischill" $password = "xxxxxxx" Cause when I do this I get an error that it can't be send to the smpt server bla bla /edit: Ok nvm, apparently that account was removed so I made it again. Now I get an error that the server has rejected one or more adresses?.. I use the number: 06xxxxxxxx and the service: $T_MOBILE_NETHERLANDS Whats wrong? Edited September 16, 2010 by ludocus Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 16, 2010 Author Share Posted September 16, 2010 @ludocus Sorry, I probably should have tested this more extensively. Updated UDF again, find it in the first post. Found what was causing your issue, hopefully this fixes it for you. Anyone that is trying to use a Service provider with prefix (a const with a number before the @ symbol) should update to the newest UDF ex. Global Const $T_MOBILE_NETHERLANDS = "31@gin.nl" Thank you guys for helping point out these issues. DisabledMonkey Link to comment Share on other sites More sharing options...
electrico Posted September 16, 2010 Share Posted September 16, 2010 Hi! This is great, but could you be so kind please to add Latvia Tele2? http://utils.trigger.ee/smssend.phtml?countlang=LV-LV&popup=1 (link for sms-es) Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 16, 2010 Author Share Posted September 16, 2010 Hi! This is great, but could you be so kind please to add Latvia Tele2?http://utils.trigger.ee/smssend.phtml?countlang=LV-LV&popup=1 (link for sms-es)@electrico - I added it, see first post.@Everyone Else.If you would like me to add a service provider to this UDF from now on, please make the Const for me and I will add it.Global Const $COMPANY_COUNTRY = "@smsgateway.xxx"If the gateway needs a prefix to the address just put that before the @ symbol.Most sms gateways are simple to find, just do a google search like...tmobile sms gatewayOr at least something similar to that.Also does anyone on this forum know of a way to replace an attachment without resetting the download count?Thanks,DisabledMonkey Link to comment Share on other sites More sharing options...
pierrotm777 Posted September 16, 2010 Share Posted September 16, 2010 Thanks for this update: I have now this ! D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3 (184) : ==> Variable must be of type "Object".: $HexNumber = Hex($oMyError.number, 8) $HexNumber = Hex($oMyError^ ERROR Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 16, 2010 Author Share Posted September 16, 2010 Thanks for this update:I have now this !D:\Program Files\Ride Runner\Skins\Carwings_Dynamic_pm_new\Scripts\GmailNotifier\SMS avec Gmail\SMS.au3 (184) : ==> Variable must be of type "Object".:$HexNumber = Hex($oMyError.number, 8)$HexNumber = Hex($oMyError^ ERRORHonestly I don't know what is causing this exactly, it seems the error checking object.... $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")Is not being initialized correctly for you for some reason or another. I have been unable to reproduce this and don't know enough about it to point you in the right direction, sorry. Link to comment Share on other sites More sharing options...
JohnOne Posted September 17, 2010 Share Posted September 17, 2010 Tried this and the script completed without error, but alas no SMS I cannot even send them from gmail though, says the number cannot be verified There is no international prefix for UK, but entered manually unsuccessfully. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 17, 2010 Author Share Posted September 17, 2010 Tried this and the script completed without error, but alas no SMSI cannot even send them from gmail though, says the number cannot be verified There is no international prefix for UK, but entered manually unsuccessfully.To me it sounds like you just have a wrong SMS gateway for your Service provider.Look up your SMS gateway online to make sure it matches the one I have in my UDF. Note that I don't have every single Service provider in my UDF and I can't guarantee they are all correct since I just found the list of them from a resource online. Good Luck.DisabledMonkey Link to comment Share on other sites More sharing options...
JohnOne Posted September 17, 2010 Share Posted September 17, 2010 No joy in your udf $T_MOBILE_UK = "0@t-mobile.uk.net" looked on web it said "0n@t-mobile.uk.net", tried both again. #include "SMS.au3" $server = "smtp.gmail.com" $email = "johnone@googlemail.com" $username = "johnone@googlemail.com" $password = "12345678" $port = 465 $ssl = 1 $number = 7930123456 ; also tried 07930123456 $service = $T_MOBILE_UK $message = "Hello, This is an AutoIT SMS" $message2 = "Yep..." $sms = _StartSMS($server,$email,$username,$password,$port,$ssl) _SendSMS($sms,$number,$service,$message) ;_SendSMS($sms,$number,$service,$message2) Anyone had success from/to UK ? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 17, 2010 Author Share Posted September 17, 2010 No joyin your udf $T_MOBILE_UK = "0@t-mobile.uk.net" looked on web it said "0n@t-mobile.uk.net", tried both again.Anyone had success from/to UK ?Just something I found online quickYou need to first enable the Mobile Email service. You can login to T-Mobile and enable it yourself under "Plan". T-Mobile told me there's no setup fee, no monthly fee, and no *inbound* (email-2-sms) fee. There is a fee for *outbound* (sms-2-email), but I can't see anyone here caring about that.The n in what you found online just stands for your number which i put in automatically, so the service provider I used in my UDF appears to be correct. Just try to enable Mobile Email service on your t-mobile plan and try the UDF again, should work thenDisabled Monkey Link to comment Share on other sites More sharing options...
iamtheky Posted September 17, 2010 Share Posted September 17, 2010 (edited) nice script monkey. I first made a form for just sending verizon sms action from my desktop, then went playing a bit further to save and read standard data from an ini (i left password commented out) as well be able to select provider from a list. Is there a way to display variables in a list view? Such that when the item is selected the 'assigned value' is pulled rather than the literal string. All apologies for jumping your thread with customizing questions. expandcollapse popup#include <SMS.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ListviewConstants.au3> #include <Array.AU3> Global $array[9] $array[0] = 'ALIANT_CANADA' $array[1] = 'ALLTEL' $array[2] = 'AMERITECH' $array[3] = 'ATT_WIRELESS' $array[4] = 'BELLSOUTH' $array[5] = 'BOOST' $array[6] = 'CELLULARONE' $array[7] = 'CINGULAR' $array[8] = 'VERIZON' #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("SMS", 336, 232, 189, 120) GUISetBkColor (0x00AAAA) $InputSvr = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "SERVER" , "SERVER"), 16, 16, 145, 21) $Inputemail = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "EMAIL" , "EMAIL"), 16, 48, 145, 21) $Inputuser = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "USER" , "USER"), 16, 80, 145, 21) $Inputpass = GUICtrlCreateInput("PASSWORD", 16, 112, 145, 21) ;~ $Inputpass = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "password" , "password"), 16, 112, 145, 21) $Inputnum = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "NUMBER" , "NUMBER"), 16, 144, 145, 21) $Inputmsg = GUICtrlCreateInput("MESSAGE", 184, 16, 137, 75) $Listview = GUICtrlCreateListView("Provider ", 184, 96, 137, 75) $ListAliant = GUICtrlCreateListViewItem ($array[0] , $Listview) $ListAlltel = GUICtrlCreateListViewItem ($array[1] , $Listview) $ListAmeritech = GUICtrlCreateListViewItem ($array[2] , $Listview) $ListATT = GUICtrlCreateListViewItem ($array[3] , $Listview) $ListBellSouth = GUICtrlCreateListViewItem ($array[4] , $Listview) $ListBoost = GUICtrlCreateListViewItem ($array[5] , $Listview) $ListCELLULARONE = GUICtrlCreateListViewItem ($array[6] , $Listview) $ListCINGULAR = GUICtrlCreateListViewItem ($array[7] , $Listview) $ListVerizon = GUICtrlCreateListViewItem ($array[8] , $Listview) $Button1 = GUICtrlCreateButton("OK", 128, 184, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nmsg = $listview AND $Button1 MsgBox(0, "listview", "clicked=" & GUICtrlGetState($listview), 2) Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Button1 IniWrite ("C:\SMS.ini" , "INFO" , "server" , GUIctrlread($inputsvr)) IniWrite ("C:\SMS.ini" , "INFO" , "email" , GUIctrlread($inputemail)) IniWrite ("C:\SMS.ini" , "INFO" , "user" , GUIctrlread($inputuser)) ;~ IniWrite ("C:\SMS.ini" , "INFO" , "password" , GUIctrlread($inputpass)) IniWrite ("C:\SMS.ini" , "INFO" , "number" , GUIctrlread($inputnum)) $server = GuiCtrlRead ($inputsvr) $email = GuiCtrlRead ($inputemail) $username = GuiCtrlRead ($inputuser) $password = GuiCtrlRead ($inputpass) $port = 465 $ssl = 1 $number = GuiCtrlRead ($inputnum) $message = GuiCtrlRead ($inputmsg) $service = GUICtrlRead($ListView) If $service = 10 Then $service = $ALIANT_CANADA Elseif $service = 11 Then $service = $ALLTEL Elseif $service = 12 Then $service = $Ameritech Elseif $service = 13 Then $service = $ATT_WIRELESS Elseif $service = 14 Then $service = $BELLSOUTH Elseif $service = 15 Then $service = $BOOST Elseif $service = 16 Then $service = $CELLULARONE Elseif $service = 17 Then $service = $CINGULAR Elseif $service = 18 Then $service = $VERIZON EndIf $sms = _StartSMS($server,$email,$username,$password,$port,$ssl) _SendSMS($sms,$number,$service,$message) exit EndSelect WEnd Edited September 17, 2010 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
DisabledMonkey Posted September 17, 2010 Author Share Posted September 17, 2010 nice script monkey. I first made a form for just sending verizon sms action from my desktop, then went playing a bit further to save and read standard data from an ini (i left password commented out) as well be able to select provider from a list. Is there a way to display variables in a list view? Such that when the item is selected the 'assigned value' is pulled rather than the literal string. All apologies for jumping your thread with customizing questions. Glad to see someone is getting use out of this. I think this might be what you were going for with the assigned value thing. expandcollapse popup#include <SMS.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ListviewConstants.au3> #include <Array.AU3> Global $array[9][2] Global $cName = 0 Global $cService = 1 $array[0][$cName] = 'ALIANT CANADA' $array[0][$cService] = $ALIANT_CANADA $array[1][$cName] = 'ALLTEL' $array[1][$cService] = $ALLTEL $array[2][$cName] = 'AMERITECH' $array[2][$cService] = $AMERITECH $array[3][$cName] = 'AT&T WIRELESS' $array[3][$cService] = $ATT_WIRELESS $array[4][$cName] = 'BELLSOUTH' $array[4][$cService] = $BELLSOUTH $array[5][$cName] = 'BOOST' $array[5][$cService] = $BOOST $array[6][$cName] = 'CELLULAR ONE' $array[6][$cService] = $CELLULARONE $array[7][$cName] = 'CINGULAR' $array[7][$cService] = $CINGULAR $array[8][$cName] = 'VERIZON' $array[8][$cService] = $VERIZON #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("SMS", 336, 232, 189, 120) GUISetBkColor (0x00AAAA) $InputSvr = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "SERVER" , "SERVER"), 16, 16, 145, 21) $Inputemail = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "EMAIL" , "EMAIL"), 16, 48, 145, 21) $Inputuser = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "USER" , "USER"), 16, 80, 145, 21) $Inputpass = GUICtrlCreateInput("PASSWORD", 16, 112, 145, 21) ;~ $Inputpass = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "password" , "password"), 16, 112, 145, 21) $Inputnum = GUICtrlCreateInput(iniread ("C:\SMS.ini", "INFO" , "NUMBER" , "NUMBER"), 16, 144, 145, 21) $Inputmsg = GUICtrlCreateInput("MESSAGE", 184, 16, 137, 75) $Combo = GUICtrlCreateCombo($array[0][$cName], 184, 96) GUICtrlSetData($Combo, $array[1][$cName] & "|" & $array[2][$cName] & "|" & $array[3][$cName] & "|" & $array[4][$cName] & "|" & $array[5][$cName] & "|" & $array[6][$cName] & "|" & $array[7][$cName] & "|" & $array[8][$cName], $array[0][$cName]) ; add other item snd set a new default $Button1 = GUICtrlCreateButton("OK", 128, 184, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE Exit Case $nMsg = $Button1 IniWrite ("C:\SMS.ini" , "INFO" , "server" , GUIctrlread($inputsvr)) IniWrite ("C:\SMS.ini" , "INFO" , "email" , GUIctrlread($inputemail)) IniWrite ("C:\SMS.ini" , "INFO" , "user" , GUIctrlread($inputuser)) ;~ IniWrite ("C:\SMS.ini" , "INFO" , "password" , GUIctrlread($inputpass)) IniWrite ("C:\SMS.ini" , "INFO" , "number" , GUIctrlread($inputnum)) $server = GuiCtrlRead ($inputsvr) $email = GuiCtrlRead ($inputemail) $username = GuiCtrlRead ($inputuser) $password = GuiCtrlRead ($inputpass) $port = 465 $ssl = 1 $number = GuiCtrlRead ($inputnum) $message = GuiCtrlRead ($inputmsg) $service = GUICtrlRead($Combo) For $n = 0 to Ubound($array)-1 If $array[$n][$cName] = $service Then $service = $array[$n][$cService] EndIf Next $sms = _StartSMS($server,$email,$username,$password,$port,$ssl) _SendSMS($sms,$number,$service,$message) exit EndSelect WEnd I used a Combo instead of a Listview just because i felt it's more fitting for this type of project and easier to get the selected index by what it's actual name is. If you have any questions about what I did, let me know. Hopefully it helps, DisabledMonkey Link to comment Share on other sites More sharing options...
iamtheky Posted September 17, 2010 Share Posted September 17, 2010 (edited) Cleaner, though I was more thinking about trying to use the Constants as the items. Making a listview that is all those Constants, that when selected return the value set in the SMS.AU3. (leaving no need to redefine everybody in SMSsend script). In all my efforts I had to redefine the variable in SMSsend at some point. **The assigned value effort was makeshift being unable to accomplish this*** Edited September 17, 2010 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) 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