Replies: 4 comments 2 replies
-
|
Good morning, |
Beta Was this translation helpful? Give feedback.
-
|
Could a low-effort high-reward solution be to create 10-48 folders somewhere in the userprofile similar to API.x64 where each folder represents a function that can be called by function-key? At the end of the day there's a limit to how many function keys are available (48 as far as i counted)... |
Beta Was this translation helpful? Give feedback.
-
|
you could create a Ui and then delegate a script execution as required via Buttons or shortcuts (https://doc.qt.io/qtforpython-5/PySide2/QtWidgets/QShortcut.html). There is |
Beta Was this translation helpful? Give feedback.
-
|
Continuing the streak of digging old issues... 🧟 I've heard similar requests multiple times so I gave it a try. The following python script works with the Function key shortcut by @LPeccoud, I create a plugin whose name starts with "___" so I'm sure it will stay on top of the list. import os
import sys
import importlib
from pathlib import Path
import utility_controller as uc
def main():
# Get the API.x64 base directory
api_base = Path(__file__).parent.parent
# get all folder paths in the API.x64 base directory
folder_paths = [f.path for f in os.scandir(api_base) if f.is_dir()]
# sort them alphabetically
folder_paths.sort()
# get the folder name from the folder path
folder_names = [Path(f).name for f in folder_paths]
prompt_parts = []
for i, folder_name in enumerate(folder_names):
prompt_parts.append(f"{i}={folder_name}")
prompt = ", ".join(prompt_parts)
# get the user input
user_input = uc.get_user_int(prompt)
# get the folder name from the user input
for extension in [".py", ".dll"]:
plugin_path = folder_paths[int(user_input)] + "\\" + folder_names[int(user_input)] + extension
if Path(plugin_path).exists():
print(f"Opening {plugin_path}...")
result = uc.run_external_program_from_custom_directory(plugin_path)
print(result)
breakThe issue is that you still need to type a number and press enter... which mean you would be faster using key down from the list you get from the Fn shortcut : One way around would be to use @Brunner246 does the "define shortcut for each of the menu_options" request make sense ? |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
I have sent this wish in several times in support, so i just add it in here for formality as well.
The user experience would be increased extreme if the user could launch Python scripts from the function keys.
Right now the amount of quickly accessible scripts is limited by the space for buttons inside the window.
Another aspect is the fact that you save a lot of time by not having to move the mouse to the buttons, it really interrupts the user performance when you have tasks with high repetition.
Beta Was this translation helpful? Give feedback.
All reactions