Scriptlet Utility - Add to toolbar

The popular SciTE-based AutoHotkey Script Editor
User avatar
FanaticGuru
Posts: 1905
Joined: 30 Sep 2013, 22:25

Scriptlet Utility - Add to toolbar

Post by FanaticGuru » 03 Oct 2022, 16:39

When I attempt to use the "Add to toolbar" button of the Scriptlet Utility to add a scriptlet icon to the toolbar, Scriptlet Utility hangs which also hangs SciTE4AutoHotkey. I have to end the task manually to kill them. Then when I start SciTE4AutoHotkey backup, all the default global tools and the scriptlet buttons are gone. I tried deleting my SciTE folder in My Documents but only way I get them back is to reinstall SciTE4AutoHotkey.

I can add scripts to the toolbar manual through the UserToolbar.properties file but not through the Scriptlet Utility.

Are others able to use the Scriptlet Utility to add toolbar buttons? I am not sure if it is something unique to my setup.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: Scriptlet Utility - Add to toolbar

Post by LAPIII » 01 Jan 2023, 21:43

Where is UserToolbar.properties? I only see Toolbar.properties.

User avatar
FanaticGuru
Posts: 1905
Joined: 30 Sep 2013, 22:25

Re: Scriptlet Utility - Add to toolbar

Post by FanaticGuru » 02 Jan 2023, 12:28

LAPIII wrote:
01 Jan 2023, 21:43
Where is UserToolbar.properties? I only see Toolbar.properties.

The UserToolbar.properties should be located in your User folder under ...\Documents\AutoHotkey\SciTE

In general, this is where you find all your user settings that you can edit. The files under C:\Program Files\AutoHotkey\SciTE should normally not be editted.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: Scriptlet Utility - Add to toolbar

Post by LAPIII » 02 Jan 2023, 18:10

I'm not sure how I would add a scriptlet? I want to name one #SingleInstance Force and contain:

Code: Select all

#SingleInstance Force
#NoTrayIcon

User avatar
FanaticGuru
Posts: 1905
Joined: 30 Sep 2013, 22:25

Re: Scriptlet Utility - Add to toolbar

Post by FanaticGuru » 03 Jan 2023, 15:00

LAPIII wrote:
02 Jan 2023, 18:10
I'm not sure how I would add a scriptlet? I want to name one #SingleInstance Force and contain:

Code: Select all

#SingleInstance Force
#NoTrayIcon

In the UserToolbar.properties file you would add this at the bottom:
=Scriptlet: #SingleInstance Force|%LOCALAHK% tools\SUtility.ahk /insert "#SingleInstance Force"||%ICONRES%,12
I bolded the two important parts. The first is what is displayed, the second is the scriptlet file name. They do not necessarily have to be the same.

Then you need to create a file named #SingleInstance Force.scriptlet in the folder located at \Documents\AutoHotkey\SciTE\Scriptlets with:

Code: Select all

#SingleInstance Force
#NoTrayIcon

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: Scriptlet Utility - Add to toolbar

Post by LAPIII » 11 Jan 2023, 15:02

If you take out Scriptlet: from that line added to UserToolbar.properties, it will be removed from the button's tooltip.
E.g. =#SingleInstance Force|%LOCALAHK% tools\SUtility.ahk /insert "#SingleInstance Force"||%ICONRES%,12

Post Reply

Return to “SciTE4AutoHotkey”