Image

Creative laboratory → Automatic opening of a link to the site

#Arduino #Windows #Automation #Scetches
Date of publication: 20.05.2024

Automatic opening of a link to the site

The script will automatically open the link specified in the code on the Windows operating system. Can be used as a link to instructions or additional description.

#if ARDUINO > 10605
#include <Keyboard.h>
#endif

void typeKey(uint8_t key)
{
	Keyboard.press(key);
	delay(50);
	Keyboard.release(key);
}

/* Init function */
void setup()
{
	// Begining the Keyboard stream
	Keyboard.begin();
	
	//Wait 500ms
	delay(500);
	
	delay(3000);

	Keyboard.press(KEY_LEFT_GUI);
	Keyboard.press('r');
	Keyboard.releaseAll();
	
	delay(200);
	
	Keyboard.print("https://synay.net");
	
	typeKey(KEY_RETURN);
	
	delay(3000);
		
	// Ending stream
	Keyboard.end();
}

/* Unused endless loop */
void loop() {}




No Comments Yet