Loading...
Pages: [1]   Go Down
Author Topic: Write to file and save  (Read 378 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone
i was wondering if anyone can help me out i have a teensy++2.0 and am trying to get it to write text in notepad and save it i got it to open notepad and write text but cant get it to save here is what i have and sorry if i post in the wrong place thanks..
Code:
void setup()   {
}
void loop()
{
delay(1000);
      Keyboard.set_modifier(MODIFIERKEY_RIGHT_GUI);
      Keyboard.set_key1(KEY_R);
      Keyboard.send_now();
      delay(1000);
      Keyboard.set_modifier(0);
      Keyboard.set_key1(0);
      Keyboard.send_now();
      delay(1000);
      Keyboard.print("notepad.exe");
      Keyboard.set_key1(KEY_ENTER);
      Keyboard.send_now();
      Keyboard.set_key1(0);
      Keyboard.send_now();
      delay(1000);
      Keyboard.println("Hello World!");
      delay(1000);
}
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 96
Posts: 6339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm guessing you have he Arduino send he same keystrokes you would use to save and exit if you were at the keyboard and didn't have a mouse.  I don't have a Windows machine handy to figure out what to type but I assume you have one.
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 116
Posts: 10132
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Ctrl + S to save
filename
Enter
Alt + F4 to exit
Logged

Pages: [1]   Go Up
Print
 
Jump to: