Luis Diaz
asked on
AutoHotkey: call an AutoHotkey file from another AutoHotkey file
Hello experts,
I need to launch an AutoHotkey once I turn on my machine:
The idea is to place the following at:
I am aware that I can put: C:\ProgramData\Microsoft\W indows\Sta rt Menu\Programs\Startup
However I need to add some text at this file as a result I cannot place this file at this folder.
What is the best strategy:
1-Put a single AutoHotkey file at: C:\ProgramData\Microsoft\W indows\Sta rt Menu\Programs\Startup to  automatically call autocorrect?
2-Create an AutoHotkey within my AutoHotkey file to run the autocorrect file? such as #!a:: however I need to remind every time that I need to launch this AutoHotkey to use autocorrect
Thank you for your help.
I need to launch an AutoHotkey once I turn on my machine:
The idea is to place the following at:
AutoCorrect1:="C:\P\LD-autocorrect.ahk"
AutoCorrect2:="C:\F\LD-autocorrect.ahk"
If (FileExist(AutoCorrect1))
Run,%AutoCorrect1%
Else
If (FileExist(AutoCorrect2))
Run,%AutoCorrect2%
Else
MsgBox,4112,Fatal Error, AutoCorrect does not exist on your system.
Return
I am aware that I can put: C:\ProgramData\Microsoft\W
However I need to add some text at this file as a result I cannot place this file at this folder.
What is the best strategy:
1-Put a single AutoHotkey file at: C:\ProgramData\Microsoft\W
2-Create an AutoHotkey within my AutoHotkey file to run the autocorrect file? such as #!a:: however I need to remind every time that I need to launch this AutoHotkey to use autocorrect
Thank you for your help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
3-Add the hotstringWhat does that mean?
Luis,
I'm going offline for a few hours. I'll look at this later.Regards, Joe
I'm going offline for a few hours. I'll look at this later.Regards, Joe
ASKER
No rush. Thank you for your help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Noted, Just to make sure that I am doing the right think:
1-If I create the shortcut of my AutoHotkey file like this:Should I manually modify the extension and put .lnk prior to send to: C:\ProgramData\Microsoft\W indows\Sta rt Menu\Programs\Startup)?
2-In case I need to transfer a new version of my AutoHotkey file I remove the old version, transfer new version with the same file, should I create again the shortcut?
Thank you for your help.
1-If I create the shortcut of my AutoHotkey file like this:Should I manually modify the extension and put .lnk prior to send to: C:\ProgramData\Microsoft\W
2-In case I need to transfer a new version of my AutoHotkey file I remove the old version, transfer new version with the same file, should I create again the shortcut?
Thank you for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Noted.
Now is clear.
Thank you for your help.
Now is clear.
Thank you for your help.
You're welcome, Luis, I'm glad that cleared it up for you. Regards, Joe
ASKER
If I do the following:
1-Run the file at startup
2- Launch the add hotstring feature through #a
3-Add the hotstring
4-Hotstring is not added
However if I do the same but I run the file at C:\ or another Folder step 4 is properly performed.
I hope it is clearer. If not let me know.
LD-autocorrect.ahk