def write_tag(): bbs_io.pyPipe2Ansi("|CR") # Get currnet UserName from BBS username = bbs_io.pyPipe2String("|UH") bbsline = '|08 NOW |07<|12' + username + '|04!|12' + bbs + '|07> ' # Set default length of input field to 10 strlen = 0 strlen = len(bbsline) - 22 strlen = 75 - strlen # Append input field to text string text = bbs_io.pyInputField(bbsline, strlen) # Write out input field bbs_io.pyPipe2Ansi(text) # Now getline after inputfield!! :) Fancy. getstr = bbs_io.pyGetLine(strlen) bbs_io.pyPipe2Ansi("|CR") strlen = 0 strlen = len(getstr.strip()) if strlen > 0: try: connection = httplib.HTTPSConnection('api.parse.com', 443, timeout=5) connection.connect() except: return "" connection.request( 'POST', '/1/classes/wall', json.dumps({ "bbsname": bbs, "bbsfakeuser": False, "bbsuser": username.strip(), "bbstagline": getstr.strip() }), { "X-Parse-Application-Id": idkey, "X-Parse-REST-API-Key": restkey, "Content-Type": "application/json" }) result = json.loads(connection.getresponse().read()) results_length = len(result) if results_length == 0: bbs_io.pyPipe2Ansi( "|CR|04Message Error, Unable to Connect! |CR|CR|PA") else: bbs_io.pyPipe2Ansi("|CR|15Message Posted Successfully.|CR|CR|PA") else: bbs_io.pyPipe2Ansi("|CR|12aborted. |CR|CR|PA")
def write_tag(): bbs_io.pyPipe2Ansi("|CR") # Get currnet UserName from BBS username = bbs_io.pyPipe2String("|UH") bbsline = '|08 NOW |07<|12' + username + '|04!|12' + bbs + '|07> ' # Set default length of input field to 10 strlen = 0 strlen = len(bbsline) - 22 strlen = 75 - strlen # Append input field to text string text = bbs_io.pyInputField(bbsline, strlen) # Write out input field bbs_io.pyPipe2Ansi(text) # Now getline after inputfield!! :) Fancy. getstr = bbs_io.pyGetLine(strlen) bbs_io.pyPipe2Ansi("|CR") strlen = 0 strlen = len(getstr.strip()) if strlen > 0: try: connection = httplib.HTTPSConnection('api.parse.com', 443, timeout=5) connection.connect() except: return "" connection.request('POST', '/1/classes/wall', json.dumps({ "bbsname": bbs, "bbsfakeuser": False, "bbsuser": username.strip(), "bbstagline": getstr.strip() }), { "X-Parse-Application-Id": idkey, "X-Parse-REST-API-Key": restkey, "Content-Type": "application/json" }) result = json.loads(connection.getresponse().read()) results_length = len(result) if results_length == 0: bbs_io.pyPipe2Ansi("|CR|04Message Error, Unable to Connect! |CR|CR|PA") else: bbs_io.pyPipe2Ansi("|CR|15Message Posted Successfully.|CR|CR|PA") else: bbs_io.pyPipe2Ansi("|CR|12aborted. |CR|CR|PA")
bbs_io.pyPipe2Ansi(ostring) bbs_io.pyPipe2Ansi("|CR|07Add a global Oneliners? |15(|12y|04/|12n|07)|08: ") ch = bbs_io.pyGetKey() character = chr(int(ch)) bbs_io.pyPipe2Ansi(character.upper()) if character.upper() == 'Y': bbs_io.pyPipe2Ansi("|CR") # Get currnet UserName from BBS username = bbs_io.pyPipe2String("|UH") bbsline = '|08 NOW |07<|12' + username + '|04!|12' + bbs + '|07> ' # Set default length of input field to 10 strlen = 0 strlen = len(bbsline) - 22 strlen = 75 - strlen # Append input field to text string text = bbs_io.pyInputField(bbsline, strlen) # Write out input field bbs_io.pyPipe2Ansi(text) # Now getline after inputfield!! :) Fancy.
bbs_io.pyPipe2Ansi(ostring) bbs_io.pyPipe2Ansi("|CR|07Add a global Oneliners? |15(|12y|04/|12n|07)|08: ") ch = bbs_io.pyGetKey() character = chr(int(ch)) bbs_io.pyPipe2Ansi(character.upper()) if character.upper() == 'Y': bbs_io.pyPipe2Ansi("|CR") # Get currnet UserName from BBS username = bbs_io.pyPipe2String("|UH") bbsline = '|08 NOW |07<|12' + username + '|04!|12' + bbs + '|07> ' # Set default length of input field to 10 strlen = 0 strlen = len(bbsline) - 22 strlen = 75 - strlen # Append input field to text string text = bbs_io.pyInputField(bbsline,strlen); # Write out input field bbs_io.pyPipe2Ansi(text) # Now getline after inputfield!! :) Fancy.