It was there after some copy and paste. I already deleted it, and got in return a completely new compile error. "isn't that nice"
Than it returned:
Code: Select all
Scripting runtime error: System.Reflection.TargetParameterCountException: Het aantal parameters komt niet overeen. bij System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) bij System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) bij System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) bij Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)
8-7-2012 23:00:28 BT Debug
??
So after some more googling, I re-included "parm as object" in the sub main (). And lucky me now it is working as intended
So for others looking for a SMS Script with voipbuster this is how it is:
Code: Select all
Sub Main(parm as object)
Dim strUserName As String = "voipuserid"
Dim strPassword As String = "password"
Dim strPhoneNumber As String = "+31652343898"
Dim strFrom As String = "homeseer melding"
Dim strMessage As String = "ALARM"
Dim Response As String = hs.urlaction("https://www.voipbuster.com/myaccount/sendsms.php?username=" & strUserName & "&password=" & strPassword & "&from=" & strFrom & "&to=" & strPhoneNumber & "&text=" & strMessage, "GET", "", "")
End Sub
Thanks for the support.