AHK Startup (Consolidate AHK Scripts' Tray Icons)

Post your working scripts, libraries and tools
FanaticGuru
Posts: 1208
Joined: 30 Sep 2013, 22:25

Re: AutoHotkey Startup (Consolidate AHK Scripts' Tray Icons)

11 Feb 2015, 12:52

I have only 1 instance of MultiStart & that is in C:\Users\user\Scripts\AHK\Startup. I don't know how it can be in C:\Users\user\Scripts\AHK\*.exe since the exe bit is not a folder. I never added any exe to any of my AHK scripts; the only one that has it is MultiStart & only because i copied it from your original script.
Be that as it may, I don't think it is possible to resolve the issue this way, so I will give up & just stay with all the individual scripts' shortcuts in the start-up folder.
Many thanks for your support & time. I hope we can still work together in future :)
It sounds like the problem is exactly what I said.

You have a copy of MultiStart in your Startup folder. Then when MultiStart runs, you have a path to run everything in the Startup folder, which causes the first instance of MultiStart to run everything in the Startup folder, which runs another instance of MultiStart, which then runs everything in the Startup folder, over and over.

The number of instances of a program running has nothing to do with how many times you have it in folders. I only have notepad.exe in one place on my computer but I can start that program over and over and have 10 instances of notepad.exe running at the same time.

This script is designed to run other scripts but one of the other scripts it runs cannot be another instance of itself which is what is happening when you tell it to run everything in the folder it is in.

You need to remove the line:
"C:\Users\user\Scripts\AHK\Startup\"

There is no need to have this script run everything in the Startup folder. That is done automatically by Windows when your computer boots up.

Rereading your post it sounds like you don't even need the Startup or Compiled Scripts paths, those were just examples in my script of path names. Not paths that you need for you.

You need to delete everything between:
(Join,


)]

And put only the paths that you want.

Everything between those two lines in my script are only examples.
All of these are only example of paths and how they are formatted:

Code: Select all

"C:\Users\Guru\Documents\AutoHotkey\Startup\"
"C:\Users\Guru\Documents\AutoHotkey\Compiled Scripts\*.exe"
A_MyDocuments "\AutoHotkey\My Scripts\Hotstring Helper.ahk"
"C:\Users\Guru\Documents\AutoHotkey\My Scripts\Calculator.ahk"
".\Web\Google Search.ahk"
"..\Dictionary.ahk"
"Hotkey Help.ahk"
"MediaMonkey.ahk"
These are not paths I would expect anyone else to use. They are examples to be edited by the user.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
DutchPete
Posts: 98
Joined: 03 Feb 2015, 03:59

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

11 Feb 2015, 13:26

You give 3 instructions:
* remove "C:\Users\user\Scripts\AHK\Startup\"
* delete everything between:
(Join,


)]
* put only the paths that you want

I have implemented the 1st one & tried to make sense of 2 & 3, so the relevant portion of my script now looks like this:

; INITIALIZATION - VARIABLES
;{-----------------------------------------------
;
Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
"C:\Users\user\Scripts\AHK\*.exe"
"C:\Users\user\Scripts\AHK\breakfast.ahk"
"C:\Users\user\Scripts\AHK\date.ahk"
"C:\Users\user\Scripts\AHK\é.ahk"
"C:\Users\user\Scripts\AHK\folders.ahk"
"C:\Users\user\Scripts\AHK\gra.ahk"
"C:\Users\user\Scripts\AHK\insertkeyreplacement.ahk"
"C:\Users\user\Scripts\AHK\journaldate.ahk"
"C:\Users\user\Scripts\AHK\markets.ahk"
"C:\Users\user\Scripts\AHK\mc.ahk"
"C:\Users\user\Scripts\AHK\salad.ahk"
"C:\Users\user\Scripts\AHK\skitch.ahk"
"C:\Users\user\Scripts\AHK\yog.ahk"
)]
;}

Is that OK? Note that I have deleted the "compiled scripts folder & have put everything (except MultiStart) in the AHK folder.
FanaticGuru
Posts: 1208
Joined: 30 Sep 2013, 22:25

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

12 Feb 2015, 13:30

You give 3 instructions:
* remove "C:\Users\user\Scripts\AHK\Startup\"
* delete everything between:
(Join,


)]
* put only the paths that you want

I have implemented the 1st one & tried to make sense of 2 & 3, so the relevant portion of my script now looks like this:

; INITIALIZATION - VARIABLES
;{-----------------------------------------------
;
Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
"C:\Users\user\Scripts\AHK\*.exe"
"C:\Users\user\Scripts\AHK\breakfast.ahk"
"C:\Users\user\Scripts\AHK\date.ahk"
"C:\Users\user\Scripts\AHK\é.ahk"
"C:\Users\user\Scripts\AHK\folders.ahk"
"C:\Users\user\Scripts\AHK\gra.ahk"
"C:\Users\user\Scripts\AHK\insertkeyreplacement.ahk"
"C:\Users\user\Scripts\AHK\journaldate.ahk"
"C:\Users\user\Scripts\AHK\markets.ahk"
"C:\Users\user\Scripts\AHK\mc.ahk"
"C:\Users\user\Scripts\AHK\salad.ahk"
"C:\Users\user\Scripts\AHK\skitch.ahk"
"C:\Users\user\Scripts\AHK\yog.ahk"
)]
;}

Is that OK? Note that I have deleted the "compiled scripts folder & have put everything (except MultiStart) in the AHK folder.
Are you sure you need this:
"C:\Users\user\Scripts\AHK\*.exe"

That line will cause to be run every file with the "exe" extension in the AHK folder. I thought you said you did not compile any of your scripts into exe files. You just need to make sure that you actually want to run all the exe files in your AHK folder. If not then you can remove that line.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
DutchPete
Posts: 98
Joined: 03 Feb 2015, 03:59

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

13 Feb 2015, 06:02

Yes, that did the trick !! I must have misunderstood you because I queried the presence of that line on the 10 Feb (bottom of page 3). Anyway, deleting it cleaned up the script which now works fine :bravo:
Many, many thanks for your patience, I am impressed that you did not give up.
KilliK
Posts: 175
Joined: 10 Mar 2016, 21:19

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

14 Apr 2016, 12:31

sorry to bring this up, but I am encountering a problem with your script.
I set a custom folder to load of bunch of my scripts from there. It loads them fine but it doesnt hide their tray icons, apart from one randomly. I have set systray from Windows to show the ahk icons and tried to refresh them by moving my mouse over the systray but they just dont hide.
is this a bug or something that I must set in my scripts first?
I am using the latest version of AHK and Windows 10 Pro x64
FanaticGuru
Posts: 1208
Joined: 30 Sep 2013, 22:25

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

14 Apr 2016, 15:41

Updated Script on First Page

Change Log (2016-04-14):
Updated TrayIcon functions to work better with Windows 10

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
FanaticGuru
Posts: 1208
Joined: 30 Sep 2013, 22:25

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

14 Apr 2016, 15:47

sorry to bring this up, but I am encountering a problem with your script.
I set a custom folder to load of bunch of my scripts from there. It loads them fine but it doesnt hide their tray icons, apart from one randomly. I have set systray from Windows to show the ahk icons and tried to refresh them by moving my mouse over the systray but they just dont hide.
is this a bug or something that I must set in my scripts first?
I am using the latest version of AHK and Windows 10 Pro x64
The TrayIcon Library that AHK Startup uses to hide the tray icons does not work properly with Windows 10. I have updated the library. I may not have corrected every function in the library to work with Windows 10 but I did corrected the three functions required to hide tray icons to work correctly with Windows 10.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
nathan323
Posts: 39
Joined: 31 Jan 2016, 02:53

Re: AHK Startup (Consolidate AHK Scripts' Tray Icons)

18 Jul 2017, 05:09

Excellent script.

Any way to exclude a particular scripts context menu entry, while still running script?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: paulpma and 89 guests