Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code is not working with multiple lines using STRING or ENTER #5

Closed
dslrcnc opened this issue May 10, 2022 · 3 comments · Fixed by #7
Closed

Code is not working with multiple lines using STRING or ENTER #5

dslrcnc opened this issue May 10, 2022 · 3 comments · Fixed by #7

Comments

@dslrcnc
Copy link

dslrcnc commented May 10, 2022

I keep receiving this message in the console:

ValueError: No keycode available for character '\r' (13/0x0d).

After executing this ducky script file

DELAY 1000
GUI r
ENTER
STRING 123

It seems the code reads the lines with an extra \r\n in the line 148, the code tries to remove \n but maybe it needs to remove also \r but this affects also the last line of the ducky script because it reads the line with 2 less caracters because the last line doesn't have the extra \r\n.

@dslrcnc
Copy link
Author

dslrcnc commented May 10, 2022

Changing line 148 to:
self.lines.append(line[:-2])
and adding and extra ENTER into the last line of the duckyscript.txt file seems to work fine.
also the library could be fixed using rstrip() function to remove \r\n

@ladyada
Copy link
Member

ladyada commented May 17, 2022

hiya good idea, please submit a PR to add rstrip()!

@Crims-on
Copy link

I'm running into the same issue when running the script, so please fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants