Auto-execute section and #Include Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
KarlP
Posts: 2
Joined: 19 Oct 2018, 10:22

Auto-execute section and #Include

19 Oct 2018, 10:36

Hi all,

I have 2 small scripts.
The 1st one is straight forward.
The 2nd is loaded by #Include.
The included file uses more #Inludes.

Works so far.
But after the #Include line the init code in the 1st script is skipped.

This init code checks the Numlock state and sets the proper icon.
So nothing complicated.


This is the start of the 1st script:
;=== INIT ===
#Include %A_ScriptDir%\SpecialKeyboard.ahk

if GetKeyState("NumLock", "T")
ShowIconNormal()
else
ShowIconCustom()
Return

How do I have to set it up so that the whole init code gets executed on script load?

Thanks
Karl
KarlP
Posts: 2
Joined: 19 Oct 2018, 10:22

Re: Auto-execute section and #Include  Topic is solved

19 Oct 2018, 11:14

Solved.
After more rtfm, I wrote the NumLock init code into a function and called that.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada and 240 guests