-Музыка

 -Подписка по e-mail

 

 -Поиск по дневнику

Поиск сообщений в fixin

 -Сообщества

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 12.12.2002
Записей: 4343
Комментариев: 24598
Написано: 35607


SMS - удобно

+ в цитатник

Cообщение скрыто для удобства комментирования.
Прочитать сообщение


Сашка_какашко   обратиться по имени Re: SMS - удобно Суббота, 12 Мая 2007 г. 13:30 (ссылка)
оутглюк а не оутлук

LI 5.09.15
Ответить С цитатой В цитатник
Аноним   обратиться по имени Суббота, 12 Мая 2007 г. 17:37 (ссылка)
открывается веб-форма для отправки SMS


Через какой сервис SMS отправляешь?
Ответить С цитатой В цитатник
fixin   обратиться по имени Re: Ответ в fixin; SMS - удобно Суббота, 12 Мая 2007 г. 20:31 (ссылка)
Исходное сообщение snakeye:
открывается веб-форма для отправки SMS

Через какой сервис SMS отправляешь?



через веб-форму опсосов.

LI 5.09.15
Ответить С цитатой В цитатник
Аноним   обратиться по имени Суббота, 12 Мая 2007 г. 20:41 (ссылка)
через веб-форму опсосов.


То есть просто открываешь что-нибудь вроде http://sms.mts.ru/ и всё?
Ответить С цитатой В цитатник
fixin   обратиться по имени Re: Ответ в fixin; SMS - удобно Суббота, 12 Мая 2007 г. 20:49 (ссылка)
Исходное сообщение snakeye:
через веб-форму опсосов.

То есть просто открываешь что-нибудь вроде http://sms.mts.ru/ и всё?


Не все.
Открывается эта пага и скриптиком заполняются все реквизиты.
Остается только набрать текст и ввести код тюринга, нажать отправить.

Вот скрыпт:

Function GetBackPhone()
GetBackPhone = "+7(XXX)XXX-XX-XX Серж"
End Function




Function MobileNumberProperties(N)
Dim R
Set R = CreateObject("Scripting.Dictionary")
Prefix = ""
Number = ""
country = ""
CountryFlag = False
For i = 1 To Len(N)
ch = Mid(N, i, 1)
If ch = "+" Then
CountryFlag = True
End If
If ch = "(" Then
CountryFlag = False
End If
If ch >= "0" And ch <= "9" Then
If CountryFlag Then
country = country & ch
ElseIf Len(Prefix) < 3 Then
Prefix = Prefix & ch
Else
Number = Number & ch
End If
End If
Next
If country = "8" Then
country = "7"
End If
If Len(country) = 0 and Len(prefix)=3 and Len(Number) = 8 Then
country = "7"

Prefix = Right(prefix, 2) & Left(Number,1)
Number = Mid(Number, 2)
End If


R.Add "Prefix", Prefix
R.Add "Number", Number
R.Add "Country", country
Set MobileNumberProperties = R

End Function


Function GetMobileOperator(MobileCol)
Set R = CreateObject("Scripting.Dictionary")
Prefix = MobileCol.Item("Prefix")
If Prefix = "916" Or Prefix = "915" Or Prefix = "910" Or Prefix = "917" Then
R.Add "Operator", "MTS_MSK"
R.Add "Link", "http://sms.mts.ru/cgi-bin/cgi.exe?function=sms_send&isFree=1"
ElseIf Prefix = "902" OR Prefix = "903" Or Prefix = "905" Or Prefix = "909" Or Prefix = "906" Or Prefix = "961" or Prefix = "962" Then
R.Add "Operator", "BEE_MSK"
R.Add "Link", "http://www.beonline.ru/portal/comm/send_sms/simple_send_sms.sms"
ElseIf Prefix = "926" Then
R.Add "Operator", "MEG_MSK"
R.Add "Link", "http://sms.megafonmoscow.ru/"
ElseIf Prefix = "911" Then
R.Add "Operator", "MTS_SPB"
R.Add "Link", "http://www.spb.mts.ru/sendform_sms.htm"
End If

Set GetMobileOperator = R
End Function

Function SendSMS_MTS_MSK(MobileOperatorCol, MobileCol)
Set objExplorer = MobileOperatorCol.Item("Explorer")
Set elPrefix = objExplorer.document.getElementbyID("ctl00$ctl08$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$qmSmsSend1$ddPrefix")
elPrefix.Value = "7" & MobileCol.Item("Prefix")

Set elNumber = objExplorer.document.getElementbyID("ctl00_ctl08_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_qmSmsSend1_txtMsisdn")
elNumber.Value = MobileCol.Item("Number")

Set elMgs = objExplorer.document.getElementbyID("ctl00_ctl08_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_qmSmsSend1_tbMessage")
elMgs.Value = GetBackPhone
End Function

Function SendSMS_MTS_SPB(MobileOperatorCol, MobileCol)
Set objExplorer = MobileOperatorCol.Item("Explorer")
'Set elPrefix = objExplorer.document.getElementbyID("ctl00$ctl08$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$qmSmsSend1$ddPrefix")
'elPrefix.Value = "7" & MobileCol.Item("Prefix")

Set elNumber = objExplorer.document.getElementbyID("to")
elNumber.Value = "7" & MobileCol.Item("Prefix") & MobileCol.Item("Number")

Set elMgs = objExplorer.document.getElementbyID("msg")
elMgs.Value = GetBackPhone

End Function


Function SendSMS_BEE_MSK(MobileOperatorCol, MobileCol)
Set objExplorer = MobileOperatorCol.Item("Explorer")

Set elNumber = objExplorer.document.getElementbyID("phone")
elNumber.Value = MobileCol.Item("Prefix") & MobileCol.Item("Number")

Set elMgs = objExplorer.document.getElementbyID("message")
elMgs.Value = GetBackPhone
End Function

Function SendSMS_MEG_MSK(MobileOperatorCol, MobileCol)
Set objExplorer = MobileOperatorCol.Item("Explorer")

on error resume next
while err.number<>0
err.clear
'msgbox "yo" & MobileCol.Item("Prefix")
Set elPrefix = objExplorer.document.getElementbyID("prefix")
elPrefix.Value = "7" & MobileCol.Item("Prefix")
wend
on error goto 0

Set elNumber = objExplorer.document.getElementbyID("addr")
elNumber.Value = MobileCol.Item("Number")

Set elMgs = objExplorer.document.getElementbyID("message")
elMgs.Value = GetBackPhone

End Function



Sub sendsms()
Set ol = CreateObject("Outlook.Application")
Set objExplorer = CreateObject("InternetExplorer.Application")
On Error Resume Next
Set CurrentContact = ol.ActiveInspector.CurrentItem
MobileNumber = CurrentContact.MobileTelephoneNumber
On Error GoTo 0
If IsEmpty(MobileNumber) Then
MsgBox "Select a contact item, then run scipt, cannot locate contact"
Exit Sub
End If
Set MobileCol = MobileNumberProperties(MobileNumber)
Set MobileOperatorCol = GetMobileOperator(MobileCol)


Link = Trim(MobileOperatorCol.Item("Link"))
If Link = "" Then
MsgBox "Unknown operator in mobile number:" & MobileNumber
Exit Sub
End If
objExplorer.Navigate Link
objExplorer.Visible = 1
While objExplorer.ReadyState<>4
'DoEvents
Wend
On Error Resume Next
While objExplorer.document.Body.innerHtml <> objExplorer.document.Body.innerHtml
'DoEvents
Wend
On Error GoTo 0

MobileOperatorCol.Add "Explorer", objExplorer

objExplorer.document.Title = CurrentContact.FileAs

Err.Clear
On Error Resume Next
Operator = MobileOperatorCol.Item("Operator")
If Operator = "MTS_MSK" Then
SendSMS_MTS_MSK MobileOperatorCol, MobileCol
ElseIf Operator = "MTS_SPB" Then
SendSMS_MTS_SPB MobileOperatorCol, MobileCol
ElseIf Operator = "BEE_MSK" Then
SendSMS_BEE_MSK MobileOperatorCol, MobileCol
ElseIf Operator = "MEG_MSK" Then
SendSMS_MEG_MSK MobileOperatorCol, MobileCol
End If
On Error GoTo 0
If Err.Number <> 0 Then
MsgBox "Error:" & Err.Description
End If



End Sub



sendsms

LI 5.09.15
Ответить С цитатой В цитатник
Аноним   обратиться по имени Воскресенье, 13 Мая 2007 г. 10:02 (ссылка)
Ага, понятно. Спасибо.
Ответить С цитатой В цитатник
Комментировать К дневнику Страницы: [1] [Новые]
 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку