免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4286 | 回复: 4
打印 上一主题 下一主题

谁会短信群发的编程 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-26 11:05 |只看该作者 |倒序浏览
6可用积分
编了好多天了啊,还是群发不了,谁会写啊?帮帮我吧,嗨,我这分都悬赏没了啊,想多点都不行!
def setSMS():
    setSMSOK = 1
    res = MDM.send('AT+CMGF=1', 0)
    res = MDM.send('\r', 20)
    res = MDM.receive(10)
    if (res.find('OK')== -1):
       setSMSOK = 0
    return setSMSOK

# Send the SMS to fixed number   
def sendsms(NUM,TEXT):
    res = MDM.send('AT+CMGS=', 0)
    res = MDM.send(NUM, 0)
    res = MDM.sendbyte(0x0d, 0)
    res = MDM.receive(90)
    print res
    res = MDM.send(TEXT, 10)
    print res
    res = MDM.send('\x1a', 0)
    print res
    sendingsms = 1
    print 'sending sms ...'
# Send SMS testing
def SMSsendtest():
    s = setSMS()
    print'The setSMS status is:',s
    a = '1300000000'
    print'The receive number is:',a
    b = 'hello world'
    print'The sending text is:',b
    sendsms(a,b)
这是发一个手机的程序,我又加上了x='15900000000' sendsms(x,b),但是不成功~~

最佳答案

查看完整内容

import appuifwimport messagingdata = appuifw.query(u"Type your name:", "text")nbr2 = "234567" # change the mobile number heretxt = u"Greetings from:" +datamessaging.sms_send(nbr1, txt)这个是PS60 的。 这还有两个连接: http://www.mobilenin.com/pys60/menu.htm #里边有一个 PS60的文档。http://www.mobilepythonbook.org/多动手,少动嘴。[ 本帖最后由 xiaobian 于 2008-5-27 20:26 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-05-26 11:05 |只看该作者

回复 #3 bingruoice 的帖子

import appuifw
import messaging

data = appuifw.query(u"Type your name:", "text")

nbr2 = "234567" # change the mobile number here
txt = u"Greetings from:" +data
messaging.sms_send(nbr1, txt)

这个是PS60 的。

这还有两个连接: http://www.mobilenin.com/pys60/menu.htm #里边有一个 PS60的文档。

http://www.mobilepythonbook.org/

多动手,少动嘴。

[ 本帖最后由 xiaobian 于 2008-5-27 20:26 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-05-26 21:49 |只看该作者

论坛徽章:
0
4 [报告]
发表于 2008-05-27 09:22 |只看该作者
顶一下,希望看到更多的信息啊~~谢谢

论坛徽章:
0
5 [报告]
发表于 2008-05-28 09:13 |只看该作者

回复 #2 xiaobian 的帖子

嗯,不过确实测试了好久啊~~嗨,不知道是哪里的问题,感觉都是两次调用就能发送的,结果就是不行
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP