AutoHotKey n00b problem.

Get help with using AutoHotkey and its commands and hotkeys
mam675
Posts: 1
Joined: 10 Sep 2018, 01:43

AutoHotKey n00b problem.

10 Sep 2018, 01:58

Hello I am Korean Programmer who learn AutoHotKey First time.
I want to create code

when i press Printscreen Key, Act like Alt + PrintScreen , Open mspaint.exe, And Paste it!

I tried to make code but it doesn't work. i have no idea what is going wrong.

below is code i wrote.

Code: Select all

AutoOpen(){
	!Printscreen
	Run mspaint.exe
	WinWaitActive, Untitled - Paint
	send, ^v
	
	return
}

~Printscreen::
	AutoOpen()
Error is this
  • 1. When i wrote "!Printscreen" and run it. then "Run mspaint.exe" doesn't work.

    2. After annotate "!Printscreen", Mspaint.exe work! opened! but "Ctrl+V" did nothing.
I want to use printscreen key as Alt+Printscreen and open mspaint automatically also pasted it.

i am waiting for Go-Su guys answer. thanks to listening.
WingbtZ
Posts: 22
Joined: 09 Aug 2018, 04:41

Re: AutoHotKey n00b problem.

10 Sep 2018, 03:18

Hello,

I tryd your script and had the same problem with it not pasting.

Try adding a delay in the WinWaitActive.

Example:

Code: Select all

Printscreen::
{
Send, !{Printscreen}
Run mspaint.exe
WinWaitActive, Untitled - Paint, , 1
Send, ^v
}
return

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], bsap, Chunjee, JoeWinograd, malcev, TablePerson22, vmech and 47 guests