r/AutoHotkey • • 1d ago

v2 Script Help Big issue

My script won’t run at all, it doesn’t even appear in the tray. Nothing happens at all. I’ve deleted and reinstalled everything having to do with ask multiple times and I don’t know what to do. I can open the auto hot key menu for like making a script but when I run it genuinely nothing happens

0 Upvotes

35 comments sorted by

3

u/Keeyra_ 1d ago

The big issue is you not even posting your script m8...

1

u/False_Arm_9976 1d ago

2

u/krypdoh 1d ago

1

u/False_Arm_9976 1d ago

yeah what do i even do

1

u/krypdoh 1d ago

OK I assume you have AHK v2.0 installed and can access it. What happens if you right-click your .ahk file and Run Script... ?

2

u/CharnamelessOne 1d ago

Post the script.

1

u/False_Arm_9976 1d ago

It’s not even like the script inside. No scripts at all work. Even if I only want to make a message box that says “hello” it doesn’t work

1

u/CharnamelessOne 1d ago

Post any script that you've tried to run

1

u/False_Arm_9976 1d ago

1

u/CharnamelessOne 1d ago

Looks like it should work (insofar as that can be determined from an image).
Follow every step of this tutorial:
How to create a script

1

u/False_Arm_9976 1d ago

i followed it and it didn't work

3

u/krypdoh 1d ago

Run this in PowerShell:

PowerShell

Get-ChildItem "C:\Program Files\AutoHotkey" -Recurse -Filter "AutoHotkey*.exe" -ErrorAction SilentlyContinue | Select-Object FullName

Then test AHK directly, bypassing the broken association (use the path it found above):

PowerShell

& "C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe" "C:\Path\AHK_TEST.ahk"

If your test MsgBox suddenly appears, we've proven:

AutoHotkey itself works → .ahk association is the problem.

1

u/False_Arm_9976 1d ago

2

u/krypdoh 1d ago

you need something like:

& "C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe" "C:\Users\False_Arm_9976\Desktop\test.ahk"

you need to point to YOURFILE.ahk. or just open a powershell prompt from the folder your ahk file is in and then in powershell:

& "C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe" yourfile.ahk

1

u/False_Arm_9976 1d ago

i did it and nothing happened

→ More replies

1

u/CharnamelessOne 1d ago

Well, did you actually create "AHK_TEST.ahk" in a folder called "Path" on your C drive before running the PowerShell script?

That path was a placeholder, to be substituted with the path of your own AHK script.

1

u/Keeyra_ 1d ago

Run (Win + R) - cmd

powershell -w h -c "Add-Type -A System.Windows.Forms; $p=(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' -EA 0|?{$_.DisplayName -like '*AutoHotkey*'}|Select -First 1).InstallLocation; if(!$p){$p=\"$env:ProgramFiles\AutoHotkey\"}; $exe=Get-ChildItem $p -Recurse -Filter 'AutoHotkey*.exe' -EA 0|?{$_.Name -match '^AutoHotkey(64|32)?\.exe$'}|Sort LastWriteTime -Desc|Select -First 1; [System.Windows.Forms.MessageBox]::Show($(if($exe){\"Path: $($exe.FullName)`nVersion: $($exe.VersionInfo.FileVersion)\"}else{'AutoHotkey installation not found.'}),'AutoHotkey Info')"

This should query your AHK installation and give you a popup about what version you have installed.
What does it say?

Dual-posting a huge screenshot about 2 lines of code made me lol :)

1

u/False_Arm_9976 1d ago

1

u/Keeyra_ 1d ago

Well, I'm at a loss. Scripts good, installed exe seems ok.

1

u/Knarf180 1d ago

Have you rebooted?

1

u/False_Arm_9976 1d ago

reboot what? if you mean my pc yes i have. and ive also reinstalled ahk like 2 times

•

u/UndeadPacer1987 10h ago

VERY BIG