Using greenshot with AHK

Get help with using AutoHotkey and its commands and hotkeys
monkkey

Using greenshot with AHK

10 Oct 2017, 19:33

Hi, I wanted to make a script that repeatedly takes a screenshot of my screen using AHK. However, the hotkey I set up for greenshot doesn't seem to work. Here is my code:

Code: [Select all] [Download] GeSHi © Codebox Plus

=::
{
Send {ScrollLock}
}


I set up the program to take a screenshot when I press the ScrollLock key, but for some reason, AHK doesn't trigger it when I press the '=' key. Am I doing something wrong?
gwarble
Posts: 220
Joined: 30 Sep 2013, 15:01

Re: Using greenshot with AHK

10 Oct 2017, 20:01

=::ScrollLock
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
monkkey

Re: Using greenshot with AHK

10 Oct 2017, 20:24

Unfortunately, that didn't seem to work. I wonder, could it be because greenshot isn't the window that's in focus?
gwarble
Posts: 220
Joined: 30 Sep 2013, 15:01

Re: Using greenshot with AHK

10 Oct 2017, 22:03

I don't know anything about greenshot, personally i would try do it with pure ahk

but you can try to go back to the style you had above but without the {}'s around the send command, with a return after it (on my phone now or i'd show in code), then add in a "winactivate before the send if thats what greenshot requires
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
User avatar
Tomer
Posts: 206
Joined: 21 Aug 2016, 05:11

Re: Using greenshot with AHK

11 Oct 2017, 02:15

you can use nircmd.exe
http://www.nirsoft.net/utils/nircmd.html

for example:

Code: [Select all] [Download] GeSHi © Codebox Plus

; Save 10 screenshots in a loop, and wait 60 seconds between the screenshot save calls. The filenames of the screenshot will contain the time and date of the saved screenshot.
run, nircmd.exe loop 10 60000 savescreenshot c:\temp\scr~$currdate.MM_dd_yyyy$-~$currtime.HH_mm_ss$.png

Return to “Ask For Help”

Who is online

Users browsing this forum: cdw3423, fischgeek, helensmith, Odlanir, tazzzan33, Yahoo [Bot] and 49 guests