Using greenshot with AHK Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
monkkey

Using greenshot with AHK  Topic is solved

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

=::
{
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?
User avatar
gwarble
Posts: 524
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?
User avatar
gwarble
Posts: 524
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: 366
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

; 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
broccolilili
Posts: 1
Joined: 11 Feb 2018, 14:42

Re: Using greenshot with AHK

11 Feb 2018, 14:45

I did it like this, because send key didnt work on greenshot neither. so i did a click on greenshot in taskbar, then sent the key, then back to the window i wanted to capture

MsgBox, click on the window you wana capture thx
Loop, 1080
{
send, {PgDn}
Sleep, 400
Click 1640, 1070
Sleep, 700
Send, {Printscreen}
Sleep, 300
Click 50,200
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Descolada, Joey5 and 318 guests