I figured out that with
Code: Select all
Houses_VisitHouseRequest(HouseID,Password)Code: Select all
Command> RoMScript("Houses_VisitHouseRequest( USERNAME,"");")
Invalid CommandCode: Select all
Houses_VisitHouseRequest(HouseID,Password)Code: Select all
Command> RoMScript("Houses_VisitHouseRequest( USERNAME,"");")
Invalid CommandCode: Select all
RoMScript('Houses_VisitHouseRequest( USERNAME,"");')Code: Select all
USERNAME = "Awesomeness"
RoMScript('Houses_VisitHouseRequest( '..USERNAME..',"");')
Code: Select all
RoMScript('Houses_VisitHouseRequest("Awesomeness","");')Code: Select all
Command> sendMacro('Houses_VisitHouseRequest("Lisa","");')
[color=#008000]Drücke MACRO: RoMScript ausführen "Houses_VisitHouseRequest("Lisa","")".[/color]
Code: Select all
keyboardPress(key.VK_A,key.VK_SHIFT)
keyboardPress(key.VK_W)
keyboardPress(key.VK_E)
keyboardPress(key.VK_S)
keyboardPress(key.VK_O)
keyboardPress(key.VK_M)
keyboardPress(key.VK_E)
keyboardPress(key.VK_N)
keyboardPress(key.VK_E)
keyboardPress(key.VK_S)
keyboardPress(key.VK_S)
keyboardPress(key.VK_ENTER)
Um, I don't think so. The only difference between RoMScript and sendMacro is sendMacro prints a message.lisa wrote:try using sendMacro instead of RoMScript, I vaguely remember something about ROMScript expecting a returned value but sendMacro just sends the command and doesn't expect anything in return.
Edit boxes kill the bot because the macro system requires a keypress to action the macro. The way I'm dealt with this in the past is to clear the focus in the same command that opens the edit box.lisa wrote:ok so my current theory is that you can't actually use/edit the macro system while the join house popup is active
Code: Select all
RoMScript("} ChoiceOption(3); z = GetKeyboardFocus(); if z then z:ClearFocus() end a={") I actually thought you already did code for that when doing your login thingy.rock5 wrote:So maybe Lisas way is the only way. But maybe we could make a function that breaks down a string and does it for you.
Code: Select all
for i = 0,255 do
print(i..": "..getKeyName(i))
end
Code: Select all
0:
1:
2:
3: Scroll Lock
4:
5:
6:
7:
8: Backspace
9: Tab
10:
11:
12: Num 5
13: Enter
14:
15:
16: Shift
17: Right Ctrl
18: Right Alt
19:
20: Caps Lock
21:
22:
23:
24:
25:
26:
27: Esc
28:
29:
30:
31:
32: Space
33: Page Up
34: Page Down
35: End
36: Home
37: Left
38: Up
39: Right
40: Down
41:
42:
43:
44: Sys Req
45: Insert
46: Delete
47:
48: 0
49: 1
50: 2
51: 3
52: 4
53: 5
54: 6
55: 7
56: 8
57: 9
58:
59:
60:
61:
62:
63:
64:
65: A
66: B
67: C
68: D
69: E
70: F
71: G
72: H
73: I
74: J
75: K
76: L
77: M
78: N
79: O
80: P
81: Q
82: R
83: S
84: T
85: U
86: V
87: W
88: X
89: Y
90: Z
91: Left Windows
92: Right Windows
93:
94:
95:
96: Num 0
97: Num 1
98: Num 2
99: Num 3
100: Num 4
101: Num 5
102: Num 6
103: Num 7
104: Num 8
105: Num 9
106: Num *
107: Num +
108:
109: Num -
110: Num Del
111: Num /
112: F1
113: F2
114: F3
115: F4
116: F5
117: F6
118: F7
119: F8
120: F9
121: F10
122: F11
123: F12
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144: Pause
145: Scroll Lock
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160: Shift
161: Right Shift
162: Right Ctrl
163: Right Ctrl
164: Right Alt
165: Right Alt
166:
167:
168:
169:
170:
171:
172: M
173: D
174: C
175: B
176: P
177: Q
178: J
179: G
180:
181:
182:
183: F
184:
185:
186: ;
187: =
188: ,
189: -
190: .
191: /
192: `
193:
194: F15
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219: [
220: \
221: ]
222: '
223:
224:
225:
226: \
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
Code: Select all
function enterName(str)
str = string.upper(str)
-- Type all characters
for i = 1, #str do
keyboardPress(string.byte(str,i))
end
-- Press Enter
keyboardPress(key.VK_ENTER)
endCode: Select all
keyboardPress(string.byte(str,1),key.VK_SHIFT)
for i = 2, #str do keyboardPress(string.byte(str,i)) endActually I did a bit more testing and it seemed to be working. For some reason the first time I wrote the function, similar to what you just wrote, it didn't capitalize it so I thought it didn't work.lisa wrote:If you use second arg like I mentioned, the capitals works fine.
I remember mentioning it but I don't remember if it was fixed. Looks like it wasn't. I'll bring it up again with Administrator.lisa wrote:Which reminds me, wasn't there some discussion about checking if caps lock was on when doing keypresses?
Code: Select all
local charname = "Awesomeness"
local pass = "somepass"
keyboardType(charname)
keyboardPress(key.VK_TAB)
keyboardType(pass)
keyboardPress(key.VK_ENTER)
Code: Select all
Command> RoMScript('ChoiceOption(4);Houses_VisitHouseRequest("Lisa","");')