1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
I've contacted one of the authors of CTerm, and got his permisson to use these scripts with FQTerm.
Other scripts were directly drawn from qterm0.4.1.
Any file to be written to or read from should be in the format of UTF-8.
Usage:
//UI functions
msgBox(msg)
no return value
yesnoBox(msg)
return boolean value
sessionID=long(sys.argv[0])
formatError(sessionID)
get the traceback info
return string
getArticle(sessionID, interval)
copy current article
return (string, success)
copyArticle(sessionID)
copy current article (obsolete)
return string
getText(sessionID, line)
get text at line
return string
getAttrText(sessionID, line)
get attr text at line
return string
sendString(sessionID, str)
send string to server
return number of bytes written
sendParsedString(sessionID, str)
send string with escape
return number of bytes written
caretX(sessionID)
caret x
return int
caretY(sessionID)
caret y
return int
columns(sessionID)
screen width
return int
rows(sessionID)
screen height
return int
isConnected(sessionID)
connected to server or not
return int
disconnect(sessionID)
disconnect from server
reconnect(sessionID)
reconnect
getBBSCodec(sessionID)
get the bbs encoding, GBK or Big5
return string
getAddress(sessionID)
get the bbs address
return string
getPort(sessionID)
get the bbs port number
return int
getProtocol(sessionID)
get the bbs protocol, 0/1/2 TELNET/SSH1/SSH2
return int
getReplyKey(sessionID)
get the key to reply messages
return string (wtf...?)
getURL(sessionID)
get the url string under mouse (not sure if works)
return string
previewImage(sessionID, url)
preview the image link
fromUTF8(str, codec)
decode from utf8 to string in specified codec
return string
toUTF8(str, codec)
decode from string in specified codec to utf8
return string
artDialog(content)
open a dialog with content denoted in the argument
|