AHK Startup (Consolidate AHK Scripts' Tray Icons)

Post your working scripts, libraries and tools for AHK v1.1 and older
AHKxx
Posts: 75
Joined: 26 Feb 2014, 01:37

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

24 Mar 2014, 19:26

FanaticGuru wrote:
Thanks for taking the time to test and post AHKxx!

FG
My pleasure.

These two scripts together make AHK into an integrated application. I'm new to AHK, but they're making it much easier to get what I want out of it.

Is it possible to disable/comment out the "Script lines most recently executed..." window that pops up when Startup completes?

Thanks!
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

24 Mar 2014, 20:19

AHKxx wrote:Is it possible to disable/comment out the "Script lines most recently executed..." window that pops up when Startup completes?

Thanks!
I do not get any pop up like that.

That sounds like one of your scripts has the command ListLines somewhere in it. That is a command that is generally only used for debugging a script.

You can try having AHK Startup run without starting any other scripts.

Code: Select all

Files := [	; Additional Startup Files and Folders Can Be Added Between the ( Continuations  ) Below
(Join, 
)]
Assuming you are not using an additional text file to list your startup scripts.

If the dialog still appears that is a mystery. If it does not appear then you need to start each of your scripts manually to see if one of them might be causing the popup.

That popup is not normal though. When I run AHK Startup I see nothing but a brief flicker down in the tray icons area as tray icons are created when the scripts are started and then very quickly destroyed.

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
AHKxx
Posts: 75
Joined: 26 Feb 2014, 01:37

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

24 Mar 2014, 21:18

Thanks for the reply.

Strange. When I run the individual scripts on their own, I don't get the ListLines window.

And when I run Startup without any scripts or folders in the menu, I don't get the ListLines window either.

But when I run Startup with a folder reference, but remove all scripts from the folder, I DO get the ListLines window. In that case, the tray icon tool tip shows only itself, and the right click menu has no submenus (which is what I'd expect...?)

Here's what the window is showing when the folder is specified, but contains no scripts:

Code: Select all

Script lines most recently executed (oldest first).  Press [F5] to refresh.  The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0).  The bottommost line's elapsed time is the number of seconds since it executed.

---- D:\Dropbox\AHK files\Startup - AutoHotkey v4.ahk
017: SendMode,Input
018: SetWorkingDir,%A_ScriptDir%
020: DetectHiddenWindows,On
026: Files := ["D:\Dropbox\AHK files\Startup\"]
035: if FileExist(RegExReplace(A_ScriptName,"(.*)\..*","$1.txt"))  
040: Scripts := {}
041: For key,File in Files
043: RegExMatch(File,"^(\.*)\\",Match), R := StrLen(Match1)  
044: if (R=1)  
046: if (R>1)  
049: File_Exp := File
050: if RegExMatch(File_Exp,"\\$")  
051: Loop,%File_Exp%*.*,,1
059: }
061: Startup := {}
062: For index,Script in Scripts
070: Sort,Tip_Text
071: Tip_Text := Trim(Tip_Text, " 
")
072: Menu,Tray,Tip,%Tip_Text%
075: Send,{LWin Down}b{LWin Up}{Enter}{Escape} (0.09)

Press [F5] to refresh.

Then once I hit F5, the levee breaks. :shock: (I have no idea if that's at all meaningful.)

Code: Select all

Script lines most recently executed (oldest first).  Press [F5] to refresh.  The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0).  The bottommost line's elapsed time is the number of seconds since it executed.

---- D:\Dropbox\AHK files\Startup - AutoHotkey v4.ahk
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
193: SendMessage,0x417,A_Index - 1,pRB,ToolbarWindow32%idxTB%,ahk_class %sTray%
194: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)  
196: iBitmap := NumGet(btn, 0)
197: cmdID := NumGet(btn, 4)
198: statyle := NumGet(btn, 8)
199: dwData := NumGet(btn, (A_Is64bitOS ? 16 : 12))
200: iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))
202: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)  
204: hWnd := NumGet(nfo, 0)
205: uID := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
206: msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
207: hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))
209: WinGet,pID,PID,ahk_id %hWnd%
210: WinGet,sProcess,ProcessName,ahk_id %hWnd%
211: WinGetClass,sClass,ahk_id %hWnd%
213: if !sExeName || (sExeName = sProcess) || (sExeName = pID)  
215: DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)  
216: Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
217: oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1  
218: oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID  
219: oTrayIcon_GetInfo[Index,"pID"]     := pID  
220: oTrayIcon_GetInfo[Index,"uID"]     := uID  
221: oTrayIcon_GetInfo[Index,"msgID"]   := msgID  
222: oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon  
223: oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd  
224: oTrayIcon_GetInfo[Index,"Class"]   := sClass  
225: oTrayIcon_GetInfo[Index,"Process"] := sProcess  
226: oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")  
227: oTrayIcon_GetInfo[Index,"Tray"]    := sTray  
228: }
229: }
230: DllCall("VirtualFreeEx", "Uint", hProc, "Uint", pProc, "Uint", 0, "Uint", 0x8000)  
231: DllCall("CloseHandle", "Uint", hProc)  
232: }
179: idxTB := TrayIcon_GetTrayBar()
239: Setting_A_DetectHiddenWindows := A_DetectHiddenWindows
240: DetectHiddenWindows,On
241: WinGet,ControlList,ControlList,ahk_class Shell_TrayWnd
242: RegExMatch(ControlList, "(?<=ToolbarWindow32)\d+(?!.*ToolbarWindow32)", nTB)  
243: Loop,%nTB%
245: ControlGet,hWnd,hWnd,,ToolbarWindow32%A_Index%,ahk_class Shell_TrayWnd
246: hParent := DllCall( "GetParent", Ptr, hWnd )
247: WinGetClass,sClass,ahk_id %hParent%
248: if (sClass <> "SysPager")  
250: idxTB := A_Index
251: Break
253: DetectHiddenWindows,%Setting_A_DetectHiddenWindows%
254: Return,idxTB
180: WinGet,pidTaskbar,PID,ahk_class %sTray%
182: hProc := DllCall("OpenProcess", UInt, 0x38, Int, 0, UInt, pidTaskbar)
183: pRB := DllCall("VirtualAllocEx", Ptr, hProc, Ptr, 0, UInt, 20, UInt, 0x1000, UInt, 0x4)
185: SendMessage,0x418,0,0,ToolbarWindow32%idxTB%,ahk_class %sTray%
187: szBtn := VarSetCapacity(btn, (A_Is64bitOS ? 32 : 24))
188: szNfo := VarSetCapacity(nfo, (A_Is64bitOS ? 32 : 24))
189: szTip := VarSetCapacity(tip, 128 * 2)
191: Loop,%ErrorLevel%
230: DllCall("VirtualFreeEx", "Uint", hProc, "Uint", pProc, "Uint", 0, "Uint", 0x8000)  
231: DllCall("CloseHandle", "Uint", hProc)  
232: }
233: DetectHiddenWindows,%Setting_A_DetectHiddenWindows%
234: Return,oTrayIcon_GetInfo
083: OnExit,ExitSub
085: Loop,10
087: For index,Script in Startup
091: Sleep,A_index**2 * 1000 + 5000 (4.24)

Press [F5] to refresh.

When the script and folder are fully loaded, as I've been running it, the window gets drawn just before the icons are destroyed.
AHKxx
Posts: 75
Joined: 26 Feb 2014, 01:37

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

24 Mar 2014, 21:40

Follow on from previous post.

When I go back to the very first version of Startup that I downloaded (a few weeks ago, before the recent round up updates), and remove all scripts so that it just starts itself and runs nothing, I still get the List Lines window.

Code: Select all


Script lines most recently executed (oldest first).  Press [F5] to refresh.  The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0).  The bottommost line's elapsed time is the number of seconds since it executed.

---- D:\Dropbox\AHK files\Startup - AutoHotkey old.ahk
017: SendMode,Input
018: SetWorkingDir,%A_ScriptDir%
021: Scripts := []
026: Startup := {}
028: For index,Script in Scripts
035: Sort,Tip_Text
036: Tip_Text := Trim(Tip_Text, " 
")
037: Menu,Tray,Tip,%Tip_Text%
040: Send,{LWin Down}b{LWin Up}{Enter}{Escape} (0.06)

Press [F5] to refresh.
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

25 Mar 2014, 20:08

Updated Script on First Page

Change Log (2014-03-25):
Commented Out this code

Code: Select all

; Shortcut Trick to Get Windows 7 to Update Hidden Tray
Send {LWin Down}b{LWin Up}{Enter}{Escape}
Win+B is a keyboard shortcut in Windows 7 to the little up arrow in the Tray Notification area, then {Enter} opens the hidden notification area. This causes the tray icons to be updated which gets rid of a problem inherent in Windows where tray icons sometimes do not move properly to the hidden area and then behave strangle because they are suppose to be in the hidden area but are not. Opening the hidden area causes everything that is suppose to be in the hidden area to get updated and moved where they are suppose to be.

This is all great if the script is run in Windows 7 and that little arrow is present but if the hidden area is disabled or in some flavors of Windows Win+B highlights the first tray icon then when {Enter} is pressed the default action for that icon is preformed which in this case is to open the scripts window where ListLines is displayed.

If Windows has a tray icon in this limbo state it usually realizes it eventually and fixes it and because the script tries several times over a few minutes to remove tray icons it should eventually get rid of it. If you don't use the hidden tray area then it is a moot point.

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
AHKxx
Posts: 75
Joined: 26 Feb 2014, 01:37

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

09 Oct 2014, 21:08

FanaticGuru wrote:
AHKxx wrote:Is it possible to disable/comment out the "Script lines most recently executed..." window that pops up when Startup completes?

Thanks!
I do not get any pop up like that.

That sounds like one of your scripts has the command ListLines somewhere in it. That is a command that is generally only used for debugging a script.

You can try having AHK Startup run without starting any other scripts.

Code: Select all

Files := [	; Additional Startup Files and Folders Can Be Added Between the ( Continuations  ) Below
(Join, 
)]
Assuming you are not using an additional text file to list your startup scripts.

If the dialog still appears that is a mystery. If it does not appear then you need to start each of your scripts manually to see if one of them might be causing the popup.

That popup is not normal though. When I run AHK Startup I see nothing but a brief flicker down in the tray icons area as tray icons are created when the scripts are started and then very quickly destroyed.

FG
This is an old mystery, that I have finally solved... or at least identified the source. A quick recap:

For the entire time I've been using the AutoHotKey Startup script, almost every time the script runs, after all the referenced scripts are loaded, a window will either pop up or come to the front. This window will often be the AHK debugging window (the one that says "Script lines most recently executed (oldest first). Press [F5] to refresh" at the top.) Other times, it will be an apparently random window of a program already running, sometimes Winamp, or Keepass, or TrueCrypt, or Dropbox, or whatever it might be.

Here is what's causing this. After the script runs, the mouse cursor gets positioned directly over one of the icons in the system tray, and is then clicking it, causing the associated program to come to the top. That icon is usually the AHK icon, but not always. I position my Task Bar vertically along the right side on the screen, and as I move different system tray icons into "position 1" (upper left of the sys tray), that will be the program that opens up.

Check it out in this screen cap. It's not easy to see without uploading a full screen screencap, and it happens more consistently on those programs that respond quickly to a key press. But the thing to watch for is the automatic positioning of the mouse pointer which then clicks whichever icon is pushed into that position by the multiple AHK icons, just before all the AHK icons collapse into the single Startup icon. In the screen cap, I am unloading Startup using Ctrl+Win+Alt+ESC before reloading it again.

Image

A few things to note:
1- This happens in the same way no matter how wide the Task Bar is - it clicks in the same position relative to the left edge of the toolbar, at a height determined by how far up the the AHK icons get pushed.
2- When the task bar is in its traditional horizontal bottom position, a similar thing happens, where the AHK icons expand horizontally to the left, and then the mouse gets repositioned and clicks on which ever program's task bar button is under it just as the AHK icons collapse.
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

10 Oct 2014, 01:36

AHKxx wrote:This is an old mystery, that I have finally solved... or at least identified the source.
You need to be sure that you are using the latest version which is what is on the first page.

You need to make sure these lines stay commented out like they are in the first page script:

Code: Select all

; Shortcut Trick to Get Windows 7 to Update Hidden Tray (Uncomment if needed)
; Send {LWin Down}b{LWin Up}{Enter}{Escape} 
Win+b is the Windows shortcut for focus on "Show hidden icon" button, {Enter} opens hidden icon area, {Escape} closes hidden icon area

These lines can cause what you are describing on some setups.

I probably should just take them out completely but on some setups, mine for example they work fine.

On others they cause a tray icon to get highlighted and then {Enter} is pressed, which is basically the same as clicking on it and doing the default action for that icon.

These lines were only ever used when you had a hidden icon tray area (which I do) and due to a fluke in Windows an icon would end up ghosting and appear to be visible when it was really hidden. Opening up the hidden tray area would fix the problem as Windows rescanned and figured out which icons were in which area. This is what this Send is suppose to do. Eventually Windows will fix the ghosting icon on its on in 10 to 60 seconds. And since the script attempts several times over a period of minutes to remove the tray icons it will remove it once Windows figures out where it really is.

I hope this is your problem and removing these lines fixes it for you. I don't see anything else in the script that could be activating an icon.

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
AHKxx
Posts: 75
Joined: 26 Feb 2014, 01:37

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

10 Oct 2014, 14:47

Thanks for the reply, FG.

The problem was that...

Code: Select all

; Send {LWin Down}b{LWin Up}{Enter}{Escape}
...had gotten uncommented. Not sure how, but once I commented that out, it was good.

I was also using the next-to-most-recent version from page one, but that didn't seem to be the issue. I've updated in any case.

Thanks again for your help, and for this fantastic set of scripts! :clap: :superhappy:
User avatar
tzucker
Posts: 42
Joined: 28 Oct 2014, 14:07
Location: Bronx, New York
Contact:

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

29 Oct 2014, 15:22

Thanks - I've been looking for something just like this! I have already implemented it with the few scripts I have written.
Tom Zucker-Scharff
An AutoHotKey Newbie
DutchPete

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

04 Feb 2015, 09:05

FanaticGuru wrote:AHK Startup

This is my startup script that I put a shortcut to run in my startup folder to load my standard scripts on computer bootup.

It basically Runs a list of scripts.
This list can include a folder which will run all files in that folder and subfolders. Wildcards * and ? can also be used.
Relative path can also be used by using .\ at the beginning of a file path. One dot is the folder this script is located in. Each additional dot steps back one folder.
It also looks for a txt file with the same name as the script and includes the files listed there.
It then creates a tooltip that list all the scripts that it started.
It then removes the tray icon of all the scripts it started leaving only the "AutoHotkey Startup" tray icon.
When AutoHotkey Startup is exited or stopped all the scripts it started will also be exited and stopped.

I use this script for startup but it does not necessarily have to be used that way. It is useful any time you want to run several AHK scripts but only have one tray icon and have all the scripts start and stop together.

You lose the functionality of right mouse clicking on a scripts tray icon as the tray icons for the scripts are removed. So there are no individual script tray icons to click on and stop, pause, suspend, edit, etc. a script but I have another one of my scripts always running that gives me a different way to access those abilities other than right clicking a tray icon.

Hotkey Help - Help Dialog for Currently Running AHK Scripts

Update: Added a custom right click menu to the AHK Startup tray icon to allow access to some individual script controls.

Code: Select all

; AHK Startup
; Fanatic Guru
; 2014 03 25
;
; Startup Script for Startup Folder to Run on Bootup.
;{-----------------------------------------------
; Runs the Scripts Defined in the Files Array
; Removes the Scripts' Tray Icons leaving only AHK Startup
; Creates a ToolTip for the One Tray Icon Showing the Startup Scripts
; If AHK Startup is Exited All Startup Scripts are Exited
;}

; INITIALIZATION - ENVIROMENT
;{-----------------------------------------------
;
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force  ; Ensures that only the last executed instance of script is running
DetectHiddenWindows, On
;}

; INITIALIZATION - VARIABLES
;{-----------------------------------------------
;
Files := [	; Additional Startup Files and Folders Can Be Added Between the ( Continuations  ) Below
(Join, 
"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"
)]
;}

; AUTO-EXECUTE
;{-----------------------------------------------
;
if FileExist(RegExReplace(A_ScriptName,"(.*)\..*","$1.txt")) ; Look for text file with same name as script
	Loop, Read, % RegExReplace(A_ScriptName,"(.*)\..*","$1.txt")
		if A_LoopReadLine
			Files.Insert(A_LoopReadLine)

Scripts := {}
For key, File in Files
{
	RegExMatch(File,"^(\.*)\\",Match), R := StrLen(Match1) ; Look for relative pathing
	if (R=1) 
		File_Exp := A_ScriptDir SubStr(File,R+1)
	else if (R>1)
		File_Exp := SubStr(A_ScriptDir,1,InStr(A_ScriptDir,"\",,0,R-1)) SubStr(File,R+2)
	else
		File_Exp := File
	if RegExMatch(File_Exp,"\\$") ; If File ends in \ assume it is a folder
		Loop, %File_Exp%*.*,,1 ; Get full path of all files in folder and subfolders
			Scripts.Insert(A_LoopFileFullPath)
	else
		if RegExMatch(File_Exp,"\*|\?") ; If File contains wildcard
			Loop, %File_Exp%,,1 ; Get full path of all matching files in folder and subfolders
				Scripts.Insert(A_LoopFileFullPath)
		else
			Scripts.Insert(File_Exp)
}

Startup := {}
for index, Script in Scripts ; Run All the Scripts, Keep Their PID, Keep Info for Tooltip Text
{
	RegExMatch(Script,"([^\\]*)\..*$", Match), Script_Name := Match1
	Run, %Script%,,, pid
	Startup[Script_Name,"PID"] := pid
	Tip_Text .= Script_Name "`n"
}

Sort, Tip_Text ; Create the Tooltip
Tip_Text := Trim(Tip_Text, " `n")
Menu, Tray, Tip, %Tip_Text% ; Tooltip is limited to first 127 characters

; Shortcut Trick to Get Windows 7 to Update Hidden Tray 
;   (Uncomment if needed, but can cause problems in some setups)
; Send {LWin Down}b{LWin Up}{Enter}{Escape} 

Sleep 500
gosub MenuBuild

Tray_Icons := {}

OnExit, ExitSub ; Gosub to ExitSub when this Script Exits

Loop, 10	; Try To Remove Over Time Because Icons May Lag During Bootup
{
	Tray_Icons := TrayIcon_GetInfo()
	for index, Script in Startup
		for index2, Icon in Tray_Icons
			If (Script.Pid = Icon.Pid)
				TrayIcon_Remove(Icon.hWnd, Icon.uID)
	Sleep A_index**2 * 1000
}
;
;}-----------------------------------------------
; END OF AUTO-EXECUTE

; HOTKEYS
;{-----------------------------------------------
;
~#^!Escape::ExitApp ; <-- Terminate Script
;}

; SUBROUTINES
;{-----------------------------------------------
;
ExitSub: ; Stop All the Startup Scripts (Called When this Scripts Exits)
	for index, Script in Startup
		PostMessage, 0x111, 65307,,,% "ahk_pid " Script.PID
ExitApp
;}

; SUBROUTINES - GUI
;{-----------------------------------------------
;
MenuBuild:	
	for index, Script in Startup
	{	
		PID := Script.PID
		Menu, SubMenu_%PID%, Add, View Lines, ScriptCommand
		Menu, SubMenu_%PID%, Add, View Variables, ScriptCommand
		Menu, SubMenu_%PID%, Add, View Hotkeys, ScriptCommand
		Menu, SubMenu_%PID%, Add, View Key History, ScriptCommand
		Menu, SubMenu_%PID%, Add
		Menu, SubMenu_%PID%, Add, &Open, ScriptCommand
		Menu, SubMenu_%PID%, Add, &Edit, ScriptCommand
		Menu, SubMenu_%PID%, Add, &Exit, ScriptCommand
	}

	for index, Script in Startup
	{	
		PID := Script.PID
		Menu, Tray, Add, %index%, :SubMenu_%PID%
	}

	Menu, Tray, NoStandard
	Menu, Tray, Add
	Menu, Tray, Standard
return

ScriptCommand:
	Cmd_Open    = 65300
	Cmd_Edit    = 65401
	Cmd_Exit    = 65405
	Cmd_ViewLines      = 65406
	Cmd_ViewVariables  = 65407
	Cmd_ViewHotkeys    = 65408
	Cmd_ViewKeyHistory = 65409
	PID := RegExReplace(A_ThisMenu,"SubMenu_(\d*)$","$1")
    cmd := RegExReplace(A_ThisMenuItem, "[^\w#@$?\[\]]") ; strip invalid chars
    cmd := Cmd_%cmd%
	PostMessage, 0x111, %cmd%,,,ahk_pid %PID%
	if (cmd = 65405)
	{
		for index, Script in Startup
			if (Script.PID = PID)
			{
				Startup.Remove(index)
				break
			}
		Menu, Tray, Delete, %index%
		Tip_Text := RegExReplace(Tip_Text,index "\v?")
		Menu, Tray, Tip, %Tip_Text%
	}
return
;}


; FUNCTIONS - LIBRARY
;{-----------------------------------------------
;

TrayIcon_GetInfo(sExeName := "")
{
	Setting_A_DetectHiddenWindows := A_DetectHiddenWindows
	DetectHiddenWindows, On
	oTrayIcon_GetInfo := {}
	For key, sTray in ["Shell_TrayWnd","NotifyIconOverflowWindow"]
	{
		idxTB := TrayIcon_GetTrayBar()
		WinGet, pidTaskbar, PID, ahk_class %sTray%
		
		hProc := DllCall("OpenProcess", UInt, 0x38, Int, 0, UInt, pidTaskbar)
		pRB   := DllCall("VirtualAllocEx", Ptr, hProc, Ptr, 0, UInt, 20, UInt, 0x1000, UInt, 0x4)

		SendMessage, 0x418, 0, 0, ToolbarWindow32%idxTB%, ahk_class %sTray%   ; TB_BUTTONCOUNT
		
		szBtn := VarSetCapacity(btn, (A_Is64bitOS ? 32 : 24))
		szNfo := VarSetCapacity(nfo, (A_Is64bitOS ? 32 : 24))
		szTip := VarSetCapacity(tip, 128 * 2)
		
		Loop, %ErrorLevel%
		{
			SendMessage, 0x417, A_Index - 1, pRB, ToolbarWindow32%idxTB%, ahk_class %sTray%   ; TB_GETBUTTON
			DllCall("ReadProcessMemory", Ptr, hProc, Ptr, pRB, Ptr, &btn, UInt, szBtn, UInt, 0)

			iBitmap := NumGet(btn, 0)
			cmdID   := NumGet(btn, 4)
			statyle := NumGet(btn, 8)
			dwData  := NumGet(btn, (A_Is64bitOS ? 16 : 12))
			iString := NumGet(btn, (A_Is64bitOS ? 24 : 16))

			DllCall("ReadProcessMemory", Ptr, hProc, Ptr, dwData, Ptr, &nfo, UInt, szNfo, UInt, 0)

			hWnd  := NumGet(nfo, 0)
			uID   := NumGet(nfo, (A_Is64bitOS ? 8 : 4))
			msgID := NumGet(nfo, (A_Is64bitOS ? 12 : 8))
			hIcon := NumGet(nfo, (A_Is64bitOS ? 24 : 20))

			WinGet, pID, PID, ahk_id %hWnd%
			WinGet, sProcess, ProcessName, ahk_id %hWnd%
			WinGetClass, sClass, ahk_id %hWnd%

			If !sExeName || (sExeName = sProcess) || (sExeName = pID)
			{
				DllCall("ReadProcessMemory", Ptr, hProc, Ptr, iString, Ptr, &tip, UInt, szTip, UInt, 0)
				Index := (oTrayIcon_GetInfo.MaxIndex()>0 ? oTrayIcon_GetInfo.MaxIndex()+1 : 1)
				oTrayIcon_GetInfo[Index,"idx"]     := A_Index - 1
				oTrayIcon_GetInfo[Index,"cmdID"]   := cmdID
				oTrayIcon_GetInfo[Index,"pID"]     := pID
				oTrayIcon_GetInfo[Index,"uID"]     := uID
				oTrayIcon_GetInfo[Index,"msgID"]   := msgID
				oTrayIcon_GetInfo[Index,"hIcon"]   := hIcon
				oTrayIcon_GetInfo[Index,"hWnd"]    := hWnd
				oTrayIcon_GetInfo[Index,"Class"]   := sClass
				oTrayIcon_GetInfo[Index,"Process"] := sProcess
				oTrayIcon_GetInfo[Index,"Tooltip"] := StrGet(&tip, "UTF-16")
				oTrayIcon_GetInfo[Index,"Tray"]    := sTray
			}
		}
		DllCall("VirtualFreeEx", "Uint", hProc, "Uint", pProc, "Uint", 0, "Uint", 0x8000)
		DllCall("CloseHandle", "Uint", hProc)
	}
	DetectHiddenWindows, %Setting_A_DetectHiddenWindows%
	Return oTrayIcon_GetInfo
}

TrayIcon_GetTrayBar()
{
	Setting_A_DetectHiddenWindows := A_DetectHiddenWindows
	DetectHiddenWindows, On
	WinGet, ControlList, ControlList, ahk_class Shell_TrayWnd
	RegExMatch(ControlList, "(?<=ToolbarWindow32)\d+(?!.*ToolbarWindow32)", nTB)
	Loop, %nTB%
	{
		ControlGet, hWnd, hWnd,, ToolbarWindow32%A_Index%, ahk_class Shell_TrayWnd
		hParent := DllCall( "GetParent", Ptr, hWnd )
		WinGetClass, sClass, ahk_id %hParent%
		If (sClass <> "SysPager")
			Continue
		idxTB := A_Index
		Break
	}
	DetectHiddenWindows, %Setting_A_DetectHiddenWindows%
	Return  idxTB
}

TrayIcon_Remove(hWnd, uID)
{
		NumPut(VarSetCapacity(NID,(A_IsUnicode ? 2 : 1) * 384 + A_PtrSize * 5 + 40,0), NID)
		NumPut(hWnd , NID, (A_PtrSize == 4 ? 4 : 8 ))
		NumPut(uID  , NID, (A_PtrSize == 4 ? 8  : 16 ))
		Return DllCall("shell32\Shell_NotifyIcon", "Uint", 0x2, "Uint", &NID)
}

;}
This script uses TrayIcon functions created by others that I have updated to be more functional for my needs. These functions are probably useful for others and the original links to them are broken and the old functions probably would not work even if the links were live as they were written for AutoHotkey Basic.

I #include [Library] TrayIcon.ahk in my script as I use these functions in other scripts but have manually placed the three required function at the end of AutoHotkey Startup above for convenience.

Here is a link to my version of the entire updated TrayIcon Library:

Updated TrayIcon Library

FG
Attachments
Multistart 4 Feb.PNG
Hi FG, I used your start-up script & customised the folders & files only. However, at start-up I get an error message, as shown in the PNG attachment. I had a look at my script but cannot work it out. In fact, I cannot even find the illegal character, and I don't know what is taken as line 26. I am totally new to AHK, so would like to ask you if you can have a look. I have also attached the script.
Many thanks. Peter
Multistart 4 Feb.PNG (7.07 KiB) Viewed 10077 times
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

05 Feb 2015, 12:47

DutchPete wrote: Hi FG, I used your start-up script & customised the folders & files only. However, at start-up I get an error message, as shown in the PNG attachment. I had a look at my script but cannot work it out. In fact, I cannot even find the illegal character, and I don't know what is taken as line 26. I am totally new to AHK, so would like to ask you if you can have a look. I have also attached the script.
Many thanks. Peter
Make sure you only change the lines indicated below.

Code: Select all

Files := [  ; Additional Startup Files and Folders Can Be Added Between the ( Continuations  ) Below
(Join, 
; vvv ONLY CHANGE LINES BETWEEN HERE vvv
"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"
; ^^^ AND HERE ^^^
)]
Also make sure you have the latest version of AHK which can be downloaded on the front page of this site: http://ahkscript.org/download/ahk-install.exe

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
DutchPete

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

05 Feb 2015, 13:03

Thanks for your help. I have a previous version of AHK installed. To install the latest, should I 1st uninstall the older version, or can the newer one be installed "on top of it"?
If you recommend to uninstall the old version, can I keep the other AHK scripts I have written already & use them with the new version?
ozzii
Posts: 481
Joined: 30 Oct 2013, 06:04

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

06 Feb 2015, 01:07

You can just install on top of the old one.
Never had any problem.
DutchPete

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

06 Feb 2015, 05:25

I installed the latest version, then edited the part of the script you mentioned. But I customised the scripts & folders for me. However, I get an error message as follows:

error at line 26
line text: ;
error: the leftmost character above is illegal in an expression.
The program will exit.

FYI below I have copied my amended version of your lines. I don't where is line 26, nor what is illegal. My scripting expertise is almost zero.

1 other question: you have a line A_My Documents, which I kept. But I am on Windows 8.1 (64 bit) & have no folder "My Documents", and all my scripts are in user\Scripts\AHK\compiled scripts.
My so-called MultiStart script (the one you provided in effect) is in user\Scripts\AHK\startup

I hope you can set me right on these 2 issues.
Peter

Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
; vvv ONLY CHANGE LINES BETWEEN HERE vvv
"C:\Users\user\Scripts\AutoHotkey\Startup\"
"C:\Users\user\Scripts\AutoHotkey\Compiled Scripts\*.exe"
A_MyDocuments "\AutoHotkey\compiled scripts\breakfast.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\date.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\é.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\gra.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\journaldate.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\markets.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\mc.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\salad.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\yog.ahk"
; ^^^ AND HERE ^^^
)]
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

06 Feb 2015, 11:37

DutchPete wrote:I installed the latest version, then edited the part of the script you mentioned. But I customised the scripts & folders for me. However, I get an error message as follows:

error at line 26
line text: ;
error: the leftmost character above is illegal in an expression.
The program will exit.

FYI below I have copied my amended version of your lines. I don't where is line 26, nor what is illegal. My scripting expertise is almost zero.

1 other question: you have a line A_My Documents, which I kept. But I am on Windows 8.1 (64 bit) & have no folder "My Documents", and all my scripts are in user\Scripts\AHK\compiled scripts.
My so-called MultiStart script (the one you provided in effect) is in user\Scripts\AHK\startup

I hope you can set me right on these 2 issues.
Peter

Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
; vvv ONLY CHANGE LINES BETWEEN HERE vvv
"C:\Users\user\Scripts\AutoHotkey\Startup\"
"C:\Users\user\Scripts\AutoHotkey\Compiled Scripts\*.exe"
A_MyDocuments "\AutoHotkey\compiled scripts\breakfast.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\date.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\é.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\gra.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\journaldate.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\markets.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\mc.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\salad.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\yog.ahk"
; ^^^ AND HERE ^^^
)]
You need to remove the two comment lines I added. I was not sure if you could have comments in that particular circumstance, and apparently you can not. You are getting a different error now in the same command line though so odds are it was an old version problem and me adding those comments just confused the issue.

Code: Select all

Files := [  ; Additional Startup Files and Folders Can Be Added Between the ( Continuations  ) Below
(Join, 
"C:\Users\user\Scripts\AutoHotkey\Startup\"
"C:\Users\user\Scripts\AutoHotkey\Compiled Scripts\*.exe"
A_MyDocuments "\AutoHotkey\compiled scripts\breakfast.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\date.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\é.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\gra.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\journaldate.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\markets.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\mc.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\salad.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\yog.ahk"
)]
A_MyDocuments is a variable built into AHK that is suppose to contain the location of your documents folder. I am not sure what it contains on Windows 8. I believe it still points to a document folder by what ever name Windows 8 calls it.

You can make a one line script and run it to find out.

Code: Select all

MsgBox % A_MyDocuments
And you by no means have to use it. You can use full paths. That is just an example to show how you can make a path that will work when you use the script on different computers where the documents folder might have a different path.

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
DutchPete

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

06 Feb 2015, 11:59

Thank you for your reply. I get another error message now, it's quite extensive. It is in the GIF file attached.
A_My Documents gets you to C:\Users\user, so I left it in.
Once again, here is the syntax I used in the script:

; INITIALIZATION - VARIABLES
;{-----------------------------------------------
;
Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
"C:\Users\user\Scripts\AutoHotkey\Startup\"
"C:\Users\user\Scripts\AutoHotkey\Compiled Scripts\*.exe"
A_MyDocuments "\AutoHotkey\compiled scripts\breakfast.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\date.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\é.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\gra.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\journaldate.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\markets.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\mc.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\salad.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\yog.ahk"
)]
;}
Attachments
error.GIF
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

09 Feb 2015, 13:32

DutchPete wrote:Thank you for your reply. I get another error message now, it's quite extensive. It is in the GIF file attached.
A_My Documents gets you to C:\Users\user, so I left it in.
Once again, here is the syntax I used in the script:

; INITIALIZATION - VARIABLES
;{-----------------------------------------------
;
Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
"C:\Users\user\Scripts\AutoHotkey\Startup\"
"C:\Users\user\Scripts\AutoHotkey\Compiled Scripts\*.exe"
A_MyDocuments "\AutoHotkey\compiled scripts\breakfast.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\date.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\é.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\gra.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\journaldate.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\markets.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\mc.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\salad.ahk"
"C:\Users\user\Scripts\AutoHotkey\compiled scripts\yog.ahk"
)]
;}
The error message is pretty clear. The file breakfast.ahk cannot be found at the path given at the top of the error.

I don't know what files you have or where they are located on your computer but generally I would not put a script called breakfast.ahk in a folder called "compiled scripts" as breakfast.ahk is not a proper name for a compiled script. Normally compiled scripts end in "exe". You can put it there though if you like.

You need to verify what the full path to "breakfast.ahk" is and if it is different than the path given in the error message Action line.

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
DutchPete

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

10 Feb 2015, 09:57

I have amended the path for the breakfast.ahk script, it is like the other scripts as it is located in the same folder.
When I run my "MultiStar" script, it gets into a terrible routine whereby it activates a new instance of the breakfast.ahk script all the time. I had to forcibly delete MultiStart to stop this. I don't know if this line "C:\Users\user\Scripts\AHK\*.exe" has anything to do with it?

In any case, all the other scripts were activated. Here is the text:

Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
"C:\Users\user\Scripts\AHK\Startup\"
"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"
)]
;}
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

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

10 Feb 2015, 13:44

DutchPete wrote:I have amended the path for the breakfast.ahk script, it is like the other scripts as it is located in the same folder.
When I run my "MultiStar" script, it gets into a terrible routine whereby it activates a new instance of the breakfast.ahk script all the time. I had to forcibly delete MultiStart to stop this. I don't know if this line "C:\Users\user\Scripts\AHK\*.exe" has anything to do with it?

In any case, all the other scripts were activated. Here is the text:

Files := [ ; Additional Startup Files and Folders Can Be Added Between the ( Continuations ) Below
(Join,
"C:\Users\user\Scripts\AHK\Startup\"
"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"
)]
;}
I would imagine that your MultiStar(ie this script) is in "C:\Users\user\Scripts\AHK\Startup\" or "C:\Users\user\Scripts\AHK\*.exe". That is causing this script to run another instance of itself which then runs another instance of itself, over and over. Each instance also starting multiply instances of the other scripts as well.

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
DutchPete

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

11 Feb 2015, 01:16

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 :)

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: JoeWinograd and 132 guests