misfitsman805 Posted October 13, 2011 Share Posted October 13, 2011 Was bored today so decided to rewrite Darrens Wallpaper Prank for the Teensy 2.0. Not the greatest looking code, but it works. /* Rewrite of Darren Kitchen's Wallpaper Prank. Coded by Misfitsman805 for Teensy 2.0 Feel free to edit */ void setup() { delay(5000); Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_D); Keyboard.send_now(); clear_keyboard(); delay(700); Keyboard.set_key1(KEY_PRINTSCREEN); Keyboard.send_now(); clear_keyboard(); delay(200); Keyboard.set_modifier(MODIFIERKEY_SHIFT); Keyboard.set_key1(KEY_F10); Keyboard.send_now(); clear_keyboard(); delay(400); Keyboard.print("v"); delay(40); Keyboard.print("d"); delay(300); Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_R); Keyboard.send_now(); clear_keyboard(); delay(700); Keyboard.print("mspaint.exe"); enter_key(); delay(1000); Keyboard.set_modifier(MODIFIERKEY_CTRL); Keyboard.set_key1(KEY_V); Keyboard.send_now(); clear_keyboard(); delay(500); Keyboard.set_modifier(MODIFIERKEY_CTRL); Keyboard.set_key1(KEY_S); Keyboard.send_now(); clear_keyboard(); delay(1000); Keyboard.print("%userprofile%\\a.bmp"); enter_key(); delay(500); Keyboard.set_modifier(MODIFIERKEY_ALT); Keyboard.set_key1(KEY_F); Keyboard.send_now(); clear_keyboard(); delay(400); Keyboard.print("k"); delay(100); Keyboard.print("f"); delay(1000); Keyboard.set_modifier(MODIFIERKEY_ALT); Keyboard.set_key1(KEY_F4); Keyboard.send_now(); clear_keyboard(); delay(300); Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_D); Keyboard.send_now(); clear_keyboard(); } void loop() { // No need for loop } void clear_keyboard() { Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); } void enter_key() { Keyboard.set_key1(KEY_ENTER); Keyboard.send_now(); clear_keyboard(); } 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.