Page 1 of 2

Can't find script

Posted: 10 Dec 2017, 16:14
by Bob Shuken
I moved my old files to a new Windows 10 computer. Now Hotkey uses an old script that is not correct and was updated on the old computer. I have searched the new computer for the .AHK script and it doesn't show up anywhere, but it still works. I tried to load a new script and it is not recognized. Where could my old script be hiding?

Re: Can't find script

Posted: 10 Dec 2017, 16:36
by Hiney
Bob Shuken wrote:I moved my old files to a new Windows 10 computer. Now Hotkey uses an old script that is not correct and was updated on the old computer. I have searched the new computer for the .AHK script and it doesn't show up anywhere, but it still works. I tried to load a new script and it is not recognized. Where could my old script be hiding?
what does your script do? if you cant find the process maybe its a standard feature in windows 10 that you are mistaking for your script

Re: Can't find script

Posted: 10 Dec 2017, 18:52
by Bob Shuken
My script only sends text strings. For example, :o:cc:1234567 sends 1234567 when I type cc. The old script had an old number. I had edited the script to a new number. Now it only sends the old number and I can't find the script to edit it.

Re: Can't find script

Posted: 10 Dec 2017, 18:55
by Capn Odin
if it has a tray icon you can right click it and choose "Edit This Script" then "Save As".
Edit: But I don't know how the script would start on its own on a new computer.

Re: Can't find script

Posted: 10 Dec 2017, 19:09
by Bob Shuken
There is no tray icon. There is a screen icon (green square with big H). If I right click it there is no "edit this script" selection. If I right click the screen in an empty space and select new-auto hotkey script, a new empty notepad shows up, but when I put in a script line and save it as new.ahk, it is not recognized by autohotkey. Don't worry about spelling.

Re: Can't find script

Posted: 10 Dec 2017, 20:11
by Capn Odin
Try opening the task manager, then choose startup and right click your script and click "Open file location".

Edit: are you talking about a "compiled" script ?
are you ruining a .exe to start your hotstrings ?

Re: Can't find script

Posted: 11 Dec 2017, 00:39
by Bob Shuken
My script doesn't show up there.
I don't know what a compiled script is. I just followed the original instructions, wrote a script on Notepad and saved it with an AHK extension. That's what I can'r find.
Yes I'm running hotkey.exe

Re: Can't find script

Posted: 11 Dec 2017, 01:04
by jeeswg
Try this:
Task Manager,
View, Select Columns...,
tick Command Line,
Processes tab,
check for any instances of AutoHotkey/compiled scripts.

A compiled script is an exe that was created from an ahk file.

You can use something like NirSoft SearchMyFiles, to try and find recent files with a certain name and modified date.

You may want to try reinstalling AutoHotkey, if double-clicking ahk files gives unexpected behaviour. Btw if you double-click a blank ahk file, nothing will happen (or you will get a tray icon appear for a split second). You could put the line #Persistent somewhere, to make an empty script (/any script) stay open indefinitely.

Re: Can't find script

Posted: 11 Dec 2017, 03:08
by Guest
1 - You could also try to double click on the green AutoHotkey tray icon, it should open the AutoHotkey GUI - in the title bar it should say the path of the script that is running "c:\pathto\script.ahk"
2 - If it is from your old computer it may be that your script is called autohotkey.ini (yes .INI not .AHK) and probably resides in your AutoHotkey folder.
3 - if you still can't find it, try a file searching program to find all files with your specific text - csearcher for example, you don't need to install it as it is a portable application - see https://www.portablefreeware.com/index.php?id=2870

Re: Can't find script

Posted: 11 Dec 2017, 04:16
by jeeswg
- @Guest: Thanks for reminding me. Here is a script to list AutoHotkey windows, these usually contains the paths for the scripts.

Code: Select all

q:: ;list AutoHotkey windows
DetectHiddenWindows, On
WinGet, vWinList, List, ahk_class AutoHotkey
vOutput := ""
Loop, % vWinList
{
	hWnd := vWinList%A_Index%
	WinGetTitle, vWinTitle, % "ahk_id " hWnd
	;WinGetClass, vWinClass, % "ahk_id " hWnd
	;WinGet, vPID, PID, % "ahk_id " hWnd
	vOutput .= hWnd " " vWinTitle "`r`n"
}
Clipboard := vOutput
MsgBox, % vOutput
return
- NirSoft SearchMyFiles is also portable, it's a tiny exe, less than half a MB.

Re: Can't find script

Posted: 11 Dec 2017, 08:21
by Capn Odin
I am sorry, but I can't understand how you are able to run a script, that you don't know the location of, on a new computer when it doesn't run at startup.

How do you run it is it a shortcut or an executable on the desktop ?

Re: Can't find script

Posted: 12 Dec 2017, 13:10
by Bob Shuken
I don't understand either, but the fact is, I have hotkey.exe on my desktop, shows as a greeen H icon. When I double click it I get a pop up box that asks if I want to allow it to make changes to my computer. Whether I say yes or no, nothing further happens. When I right click it, I get the typical pop up that allows me to find properties, etc. Nothing points me to the script. When I search the computer with file explorer for anything with hotkey or AHK I get only the hotkey installer in the programs folder, and the new script I tried to write on the desktop which hotkey doesn't recognize. Despite all of the above, hotkey is still working correctly with the old script that I can't locate. Since I can't locate any script that hotkey recognizes I can't run your loop program.

Re: Can't find script

Posted: 12 Dec 2017, 13:15
by KuroiLight
The simplest solution is to use windows search and search for *.ahk, and look through the results.

Re: Can't find script

Posted: 12 Dec 2017, 13:49
by Capn Odin
It sounds like the hotkey.exe is the script in "compiled" form, try opening it in a text editor and scroll to the bottom, you may just find it there.

Re: Can't find script

Posted: 12 Dec 2017, 14:53
by Guest
Capn Odin is probably right, hotkey.exe is a compiled script which is why you see only a limited tray menu without the options suggested above.

My advice: go to https://autohotkey.com/download/ and download the installer, actually install AutoHotkey (if you're not allowed to do so: see below*) - now start autohotkey.exe, it should show you the help documentation which will tell you to write a script. What you have described is a very simple hotstrings so you can easily make it again. The first few paragrahps of the tutorial cover everything you need to know for a simple installation and your first hotstring (::cc::1234567).
Now each time you write a new script and save it as "new script.ahk" double clicking on it will start it (and you can edit, stop etc via the tray menu, don't forget to reload after editing + saving it). I don't recommend you compile scripts, just run the script.ahk

* If you can not install software you can download "Download AutoHotkey .zip" which is below the blue download button on the download page. Just unpack it to a new AutoHotkey folder - you can also write a script and save it. In this case I would probably recommend you compile it - you should find a "compiler" folder in the folder where you unpacked autohotkey - if you start "Ahk2Exe.exe" you should be able to compile your script to "hotkey.exe" as you have it now.

Re: Can't find script

Posted: 12 Dec 2017, 20:03
by Bob Shuken
I searched everywhere and the active script doesn't show up on the C drive using windows file explorer. I opened the hotkey.exe file in notebook and can't find any of the script text or info about the script path. I will try the reinstall next.

Re: Can't find script

Posted: 16 Dec 2017, 17:50
by Bob Shuken
So I uninstalled autohotkey.exe, deleted all .AHK files I could find, then started over by downloading autohotkey from the website. Installations seemed OK. I then wrote a simple script and named it myautohotkey.ahk. When I start autohotkey, instead of starting the script, I get a page that says I didn't tell it where to look for the script. I've tried locating the script on the desktop, the documents folder, and the autohokey program file folder. Nothing works.

Re: Can't find script

Posted: 18 Dec 2017, 18:43
by Bob Shuken
PLEASE I NEED HELP. I totally got rid of everything relating to Hotkey on my new computer, then downloaded the installer from the website, went to the quick start tutorial and followed every step exactly. I saved the .AHK file desktop, and put in a one line script. The desktop icon is a notepad icon, not a Hotkey icon. When I double click it as per the tutorial, all that happens is that it opens in the edit mode as a notepad file. When I double click on the Hotkey icon in the Program File Hotkey folder it says I haven't told it where to look for the script file.

Re: Can't find script

Posted: 19 Dec 2017, 00:19
by divanebaba
Maybe this could help:
Goto this Website and take portable version of Everything by Void Tools.
This requires, that you know at least a part of the name of your script you searching for.
If you don't know the name, type only .ahk and it will list all files with this mime-type.

Re: Can't find script

Posted: 19 Dec 2017, 00:31
by Bob Shuken
Thanks, but too late, see above I already removed all instances of AHK and reinstalled Hotkey, but now even though I followed the tutorial directions exactly it still doesn't work.