Read lines from a file and pause for hotkey?
I'd like to iterate through lines in from a file. Using each line to paste or type that line into an application.
I'd then like to wait for some interaction perhaps via a hotkey.
I've managed to find this example code to read through a file.
Also I've found how to handle a hotkey with a while loop
Putting it all together I have something like...
running = true
def runHotkey(event):
global running
running = false
Env.addHotkey(
theFile = file(r"
for line in theFile:
while running:
print line # print line in sikuli
click(
theFile.close()
Does this look ok / safe ?
Thanks in advance.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was reopened
Can you help with this problem?
Provide an answer of your own, or ask Julian Moorhouse for more information if necessary.