1

I tried to create simple .ahk script for remapping RightControl on AppsKey (win context menu). I've just put RCtrl::AppsKey in file.
It's working after I launch it, but it doesn't automatically start with Windows. I tried it with AllUsers\..\Startup and CurrentUser\..\Startup, but none of them did the job.

Could anyone help me? Thanks in advance.

Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
Yuriy Rozhkov
  • 117
  • 1
  • 11
  • If anyone is coming here looking to make a script *execute* at startup, after `AutoHotKey.ahk` loads, just put the lines you want to run at the start of the file, before any hotkeys or function declarations. – Noumenon Apr 02 '17 at 02:26

2 Answers2

3

Have you tried to copy other files into your startup folders? Is it working for the other files? It's very possible that your problem isn't directly related to AutoHotkey.

Another thing you could try is a startup entry in your registry. Just put this line into your script and run it once:

RegWrite, REG_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, %A_ScriptName%, %A_ScriptFullPath%
Forivin
  • 14,780
  • 27
  • 106
  • 199
  • Yes, I've already had another program in startup folder (Launchy). – Yuriy Rozhkov Sep 08 '15 at 23:17
  • FYI, for Autohokey version 2, I found that I had to write: `RegWrite(A_ScriptFullPath, "REG_SZ", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", A_ScriptName)` – Stephen Ellis Feb 16 '23 at 22:38
0

Solution: put the autohotkey script to windows scheduler, with high priority. It works for me.

Yuriy Rozhkov
  • 117
  • 1
  • 11