Oops, error: Target label does not exist.
Line 3502: SetTimer, GetAccInfo, 120, 50, UseErrorLevel
This is because older versions of the script did not have a need for
keypress-acc-viewer-functions.ahk or
UIA_Interface.ahk and therefore those files do not yet exist in the
keypress-files folder and there is no way for an old script to retrieve those files from your server.
Warning: the following applies only to those who manually downloaded the current version of the uncompiled script and replaced the old one without having a backup.
One way of dealing with this is to use
#include *i <filename> inside the
ToggleCaptureText() function, while having the current contents of the function moved into that <filename> file. This way, if that file is not found to be included, the
GetAccInfo label would not be found missing by the script and resulting in the error mentioned above, but instead the usual script error would be displayed allowing the script to run normally. A manual update operation would be necessary after that.
So here's the necessary modifications for the current version of the file (4.18.1) if you accidentally upgraded only the main file manually:
1. Function in the main script:
Code: Select all
ToggleCaptureText() {
#include *i keypress-files\text-capture.ahk
ShowLongMsg("ERROR: Missing files...")
SoundBeep, 300, 900
Sleep, 600
HideGUI()
}
2. New file bearing old function's contents plus a necessary Return, named
text-capture.ahk* as appears in new function contents:
Code: Select all
If !FileExist("keypress-files\keypress-acc-viewer-functions.ahk") || !FileExist("keypress-files\UIA_Interface.ahk")
{
ShowLongMsg("ERROR: Missing files...")
SoundBeep, 300, 900
Sleep, 600
HideGUI()
Return
}
TextZoomer := !TextZoomer
Menu, tray, % (TextZoomer=0 ? "Uncheck" : "Check"), Mouse text collector
If (TextZoomer=1)
SetTimer, GetAccInfo, 120, 50, UseErrorLevel
else
SetTimer, GetAccInfo, off
Sleep, 400
Return
3. Additions to main script, line 5317:
Code: Select all
captureFile := "keypress-files\text-capture.ahk"
accFile := "keypress-files\keypress-acc-viewer-functions.ahk"
accUIFile := "keypress-files\UIA_Interface.ahk"
and a few lines further (new line 5337), the FilePack string modified as follows:
FilePack := "beepersFile,ripplesFile,mouseFile,historyFile,captureFile,accFile,accUIFile,faqHtml,presentationHtml,shortcutsHtml,featuresHtml"
and then another little bit further just before the
Loop, Parse, FilePack, CSV:
Code: Select all
If !FileExist(captureFile)
FileMove, keypress-files\text-capture.txt, %captureFile%
* The
text-capture file should
not bear the ahk extension locally when this version of the script is first launched; it should be named as
text-capture.txt and placed in the keypress-osd folder, it will automatically be renamed by the main script
after the other two files were unpacked and placed in their corresponding folder.
I believe that would be all to make the script run and update correctly to this version and higher. Of course, the two additional files would have to be present în the zip file on the server, otherwise everything would be in vain (and indeed they are there).