0
votes

I have a Windows tablet. I need to send a key using a Gui button instead of the on-screen keyboard.

Hence, I want to have a Gui button on the screen, on pressing which, the key "n" should be sent to the Application window appearing below the button.

1

1 Answers

0
votes
#SingleInstance,force
Gui,+AlwaysOnTop
gui, add, button, x5 y30 h20 w70 gsub2, Next
Gui, Show
return



sub2:
Gui,Hide
{
send n  
}
sleep 200
Gui, Show
return 

The script above displays a button "next" on the screen and on clicking the button, the key "n" is sent to the window below.