fullyloaded Posted October 7, 2011 Share Posted October 7, 2011 Hi I'm having a little problem with some coding i'm working on for my teensy and was wondering if anyone can help? the problem is when i add this line of code Keyboard.print("strHDLocation = "C:\Users\Public\BACK.GIF""); i get this error when compiling stry '\' in program is there anyway around this? thanks... Quote Link to comment Share on other sites More sharing options...
Mr-Protocol Posted October 7, 2011 Share Posted October 7, 2011 Does the firmware need escape characters? Quote Link to comment Share on other sites More sharing options...
ascorbic Posted October 7, 2011 Share Posted October 7, 2011 Change each \ to a double Keyboard.print("strHDLocation = "C:\\Users\\Public\\BACK.GIF""); The slash character is a special character, when all you want is one slash, you need two of them. Quote Link to comment Share on other sites More sharing options...
Mr-Protocol Posted October 7, 2011 Share Posted October 7, 2011 AKA Escape Character :P Not sure if the firmware uses it or not. I don't have the new ducky, I code for the teensy based one. Quote Link to comment Share on other sites More sharing options...
fullyloaded Posted October 7, 2011 Author Share Posted October 7, 2011 Hi Mr-Protocol i don't have the rubber ducky i also have the teensy base one ascorbic i tried using the double "/" but still getting the same error i am also using arduino-0022 :( thanks... Quote Link to comment Share on other sites More sharing options...
Mr-Protocol Posted October 7, 2011 Share Posted October 7, 2011 (edited) I dont think you can use the new firmware on the teensy based one... This is my code, it works: Keyboard.print("cd C:\\Users\\Public\\Documents"); Edited October 7, 2011 by Mr-Protocol Quote Link to comment Share on other sites More sharing options...
fullyloaded Posted October 7, 2011 Author Share Posted October 7, 2011 I dont think you can use the new firmware on the teensy based one... This is my code, it works: Keyboard.print("cd C:\\Users\\Public\\Documents"); Mr-Protocol thanks worked great! Quote Link to comment Share on other sites More sharing options...
Mr-Protocol Posted October 7, 2011 Share Posted October 7, 2011 (edited) No problem, Hopefully you found your error/s in your code. looking at your OP it seems you have 2 sets of " at the end of your directory... That was probably the issue as well as the escape character for \ Edited October 7, 2011 by Mr-Protocol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.