Shortcut for crop option

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AutoHelpKey
Posts: 7
Joined: 28 Sep 2022, 08:50

Shortcut for crop option

Post by AutoHelpKey » 06 Feb 2023, 12:06

Been using autohotkey a lot to help with automation of responses etc.

I have to create a report with screenshots, which isn't a problem to use a shortcut for the first screenshot (win + shift + s).
When on the slideshow document (pptx) sometimes I have to crop the image further, which requires right click and select crop.

I have tried looking online for Microsoft documentation on a default shortcut, but can't find any information regarding this.

Does anybody use autohotkey with a shortcut (example win + shift + e) for crop?

User avatar
mikeyww
Posts: 26602
Joined: 09 Sep 2014, 18:38

Re: Shortcut for crop option

Post by mikeyww » 06 Feb 2023, 12:32

Code: Select all

#Requires AutoHotkey v2.0
ppt := "ahk_exe POWERPNT.EXE"
#HotIf WinActive(ppt)
#+e::Send '!jpvc' ; WIN-SHIFT-E = Crop image after selecting it
#HotIf
A simple alternative is that you can customize the quick access toolbar to include a crop. You can then use an Alt key sequence to activate it.

AutoHelpKey
Posts: 7
Joined: 28 Sep 2022, 08:50

Re: Shortcut for crop option

Post by AutoHelpKey » 07 Feb 2023, 04:34

Thanks for your reply!
I am currently still using V1, haven't made the update to V2 yet, might be the time to do so.
I should have been more clear also, I meant google slides, not powerpoint. That's my mistake.

I have attempted to modify your code to the following, which didn't work.

Code: Select all

If WinActive ahk_exe chrome.exe
{
#+e::
Sendinput, '!jpvc' 
return
}

User avatar
boiler
Posts: 16773
Joined: 21 Dec 2014, 02:44

Re: Shortcut for crop option

Post by boiler » 07 Feb 2023, 05:58

Make sure to refer to the documentation to use correct syntax. Below is correct syntax for v1, but you need to replace the key sequence that was meant for PowerPoint to what is needed to perform the same actions in Google Slides.

Code: Select all

SetTitleMatchMode, 2
#IfWinActive, - Google Slides - Google Chrome ahk_exe chrome.exe
#+e::Send, !jpvc ; replace with keyboard shortcut sequence for Google Slides

I think Send is probably better than SendInput in this case, but you can try both.

AutoHelpKey
Posts: 7
Joined: 28 Sep 2022, 08:50

Re: Shortcut for crop option

Post by AutoHelpKey » 07 Feb 2023, 07:36

Thanks for your reply. Having looked at the google slides documentation:
https://support.google.com/docs/answer/ ... -shortcuts

It doesn't look like there is an official shortcut for crop on google slide.
I was thinking potentially mouse click right, scroll down 13 (to crop image option) and then left click. As there doesn't seem to be another option I can think of.

User avatar
mikeyww
Posts: 26602
Joined: 09 Sep 2014, 18:38

Re: Shortcut for crop option

Post by mikeyww » 07 Feb 2023, 11:14

You can change the send command to send what you need. The documentation has a list of all key names. See the section for the Send command.

AutoHelpKey
Posts: 7
Joined: 28 Sep 2022, 08:50

Re: Shortcut for crop option

Post by AutoHelpKey » 17 Mar 2023, 12:29

In case anybody in future wants to know, the feature to make crop a shortcut isn't available on google slides. I'd recommend everybody who wants a shortcut for google slides to add a feature request in the help slides improve bit, maybe one day they will add this ability.

Post Reply

Return to “Ask for Help (v1)”