You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with your ducky2python thing and used a very basic Hello World Ducky script from ducktoolkit dot com userscripts.
Your translation of "GUI r" to pyautogui.hotkey("win","R") does not work on Win10. What works is pyautogui.hotkey("win","Run"). I realise the Ducky language specifies "GUI r" to get to the Run menu on Windows systems. Maybe at one time it did work.
The other thing is that since you wrap the output STRING in double quotes it does not escape the " and \ characters of the Ducky STRING command. This causes an syntax error.
This was just an exercise to learn more about Python and I came across your stuff. Figured you may want to know.
Ducky script used and converted online:
DELAY 3000
GUI r
DELAY 500
STRING notepad
DELAY 500
ENTER
DELAY 750
STRING Hello World!!!
ENTER STRING $userDir = (Get-ChildItem env:\userprofile).value + '\Ducky Report ' + $folderDateTime
ENTER STRING $Report = "<div id=left><h3>Computer Information</h3></div>"
ENTER
Rather than just raise an issue, I decided to try to solve the escape issue. It's easy to just complain.
Line 72 of the ducky2python.js file previousStatement = "pyautogui.typewrite(\"" + duckyScript[line].slice(7).replace(/\\/g,"\\\\").replace(/\"/g, "\\\"") + "\", interval=0.02)";
Line 71 of the ducky2python.py file previousStatement = "pyautogui.typewrite(\"" + (line[7:]).replace("\\","\\\\").replace("\"", "\\\"") + "\", interval=0.02)"
No idea for the "GUI r" issue.
I could never figure out this pull thing of github so I will not even try.
The text was updated successfully, but these errors were encountered:
bobbonomo Thank you for bringing this to attention. I had no idea why it was bringing up a snipping tool instead of the run prompt. "win","r" actually still does work to open up the run prompt and I use that all the time with daily tasks... however the caps version "win","R" does not and thanks to your mentioning here I was able to catch that and not dismiss this tool.
I know this is years after and you probably do not really need it anymore but nonetheless I fixed both of your mentioned issues it and submitted the changes through a pull request.
I've been playing around with your ducky2python thing and used a very basic Hello World Ducky script from ducktoolkit dot com userscripts.
Your translation of "GUI r" to pyautogui.hotkey("win","R") does not work on Win10. What works is pyautogui.hotkey("win","Run"). I realise the Ducky language specifies "GUI r" to get to the Run menu on Windows systems. Maybe at one time it did work.
The other thing is that since you wrap the output STRING in double quotes it does not escape the " and \ characters of the Ducky STRING command. This causes an syntax error.
This was just an exercise to learn more about Python and I came across your stuff. Figured you may want to know.
Ducky script used and converted online:
DELAY 3000
GUI r
DELAY 500
STRING notepad
DELAY 500
ENTER
DELAY 750
STRING Hello World!!!
ENTER
STRING $userDir = (Get-ChildItem env:\userprofile).value + '\Ducky Report ' + $folderDateTime
ENTER
STRING $Report = "<div id=left><h3>Computer Information</h3></div>"
ENTER
Rather than just raise an issue, I decided to try to solve the escape issue. It's easy to just complain.
Line 72 of the ducky2python.js file
previousStatement = "pyautogui.typewrite(\"" + duckyScript[line].slice(7).replace(/\\/g,"\\\\").replace(/\"/g, "\\\"") + "\", interval=0.02)";
Line 71 of the ducky2python.py file
previousStatement = "pyautogui.typewrite(\"" + (line[7:]).replace("\\","\\\\").replace("\"", "\\\"") + "\", interval=0.02)"
No idea for the "GUI r" issue.
I could never figure out this pull thing of github so I will not even try.
The text was updated successfully, but these errors were encountered: