Skip to main content
Max Mugen
Inspiring
March 26, 2022
Question

F Keys to run actions are full, any other option ?

  • March 26, 2022
  • 2 replies
  • 1305 views

I'm running out of space for running shortcuts related to actions
I mean the f keys. 
Is anyone aware of a solution to assign an action to other key bindings?

I'm also running illustrator with a stream deck so already have access to the main shortcuts but for the tools not for the actions.  too bad I can't run actions from there...

on the same subject does anyone know if adobe would activate the use of the f keys 13 through 24? it would be very handy?

This topic has been closed for replies.

2 replies

Inventsable
Legend
March 26, 2022

I use Logitech software to bind my gaming mouse to F13 - F24, then AutoHotKey to bind F13 - F24 to different keybindings (anything I want) including running scripts which trigger actions which have no hotkeys associated with them. This is specifically a Windows solution, but I've heard you can do similar things with other macro programs like Alfred, SharpKeys, etc (believe these aren't free, though).

 

Scripting named actions is rather easy:

 

app.doScript("Revert", "Default", false);
// (actionName, actionSet, showDialog?)

 

And you can execute JSX scripts in Illustrator via AHK arbitrarily through COM objects:

 

; At some point above the hotkey, like the Auto-Execute/header section of script
com := ComObjCreate("Illustrator.Application")

; Then coding something that triggers on an F23 keypress:
F23::
  com.DoJavaScriptFile("action1.jsx") ; Filepath is relative to AHK script locale
  return ; Return null / stop execution of code after this line for this hotkey

F24::
  com.DoJavaScriptFile("action2.jsx") ; etc
  return

 

You can just write one-line JSX scripts referring to the named Action like above, and connect them to any hotkey you'd want via the AHK COM objects above. That allows you to run any Action from any key or combination of any amount of keys regardless of the limitations you'd have with the keybindings Adobe gives you. There's probably some equivalent in other macro programs but I'm personally unfamiliar.

Inventsable
Legend
March 26, 2022

Been a while since I'd done this and I realized my main AHK script doesn't directly call COM this way so I wanted to reconfirm before leaving any bad information online. I've successfully ran this AHK script:

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

com := ComObjCreate("Illustrator.Application")
F1::
  com.DoJavaScriptFile("C:\Users\TRSch\OneDrive\Documents\Adobe Scripts\testAlert.jsx") ; Couldn't get this to work without absolute path for some reason
return

For some reason, I wasn't able to use local paths despite having SetWorkingDir -- may be rusty in AHK now that I primarily code in other languages though.

daanir2168211
Inspiring
March 27, 2022

Here is my version

#NoEnv 
;#Warn ;Enable warnings to assist with detecting common errors.
SendMode Input 
#SingleInstance force

#IfWinActive ahk_class illustrator
  F1:: RunScript("Script_1.jsx") 
  F2:: RunScript("Script_2.jsx")

RunScript(script)
{
 ;Main script folder
 FullPath := "d:\Resources\Scripts\Illustrator\" . script
 Run Illustrator.exe %FullPath% , ,Max
 return
}
CarlosCanto
Community Expert
Community Expert
March 26, 2022

you already used up all 48 action shortcuts?!!

 

[edit] sorry it's 44, F1 is not available

Max Mugen
Max MugenAuthor
Inspiring
March 26, 2022

Well yes almost ^^' 

mainly because most of them are related to scale / rotate / reflect with different settings so it clogs a lot of keys 

-- maxmugen.com
CarlosCanto
Community Expert
Community Expert
March 26, 2022

hmm...how about Button Mode? would that help? it's not as convenient as keystrokes but it gives you one click access and button color options for easier spotting if you have many of them...there's probably no limits to the number of actions you can have