Skip to content

Instantly share code, notes, and snippets.

@potato4d
Last active August 29, 2015 13:58
Show Gist options
  • Save potato4d/10003605 to your computer and use it in GitHub Desktop.
Save potato4d/10003605 to your computer and use it in GitHub Desktop.
Tes.so SNS Post. Attention: tssns2.dll is necessary
#!python2
#coding:utf-8
import sys
from ctypes import *
if __name__ == '__main__':
lib = windll.tssns2
ID = "YourID"
PASS = "YourPassword"
print('////////////////////')
print('Tes.so sns client')
print('////////////////////')
print('')
print('ID:'+ID)
print('\n')
stat = lib.TsSnsConnectA("test")
if(lib.TsSnsLoginA(stat, ID, PASS) == 0):
sys.exit()
buf = pointer(c_int(0))
while(True):
post = raw_input(">>>")
if(post == 'exit'):
sys.exit()
if(post == ''):
print(u"発言が空欄です!")
lib.TsSnsPostMsgA(stat, 1, post, buf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment