Skip to content

Commit c2d18ff

Browse files
authored
Update to delaying system
1 parent e7b36f8 commit c2d18ff

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

piduck.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,25 @@ def pharse(line, known, deltrue):
4848
command = line.split()
4949
else:
5050
command = [" "]
51-
if not deltrue:
52-
if command[0] == "DELAY":
53-
sleep(int(command[1]) / 100)
54-
return
55-
elif command[0] == "REM":
56-
return
57-
elif command[0] == "REPEAT":
58-
return # todo
59-
else:
60-
sleep(default_delay / 100)
61-
if command[0] == "STRING":
62-
string(" ".join(command[1:]))
51+
if command[0] == "DELAY":
52+
sleep(int(command[1]) / 100)
6353
return
54+
elif command[0] == "REM":
55+
return
56+
elif command[0] == "REPEAT":
57+
return # todo
6458
elif command[0] == "DEFAULTCHARDELAY":
6559
string_delay = int(command[1])
6660
return
6761
elif command[0] == "DEFAULTDELAY":
6862
default_delay = int(command[1])
6963
return
64+
else:
65+
if not deltrue:
66+
sleep(default_delay / 100)
67+
if command[0] == "STRING":
68+
string(line[len("STRING "):])
69+
return
7070
elif command[0] in keymap.aliasmap:
7171
pharse(keymap.aliasmap[command[0]] + " " + " ".join(command[1:]), known, True)
7272
return

0 commit comments

Comments
 (0)