AHK-v2-script-converter
AHK-v2-script-converter copied to clipboard
Some words in strings are erroneously replaced
Input:
MsgBox % "Steve picked up his clipboard."
MsgBox Steve opened his clipboard.
Incorrect output:
MsgBox("Steve picked up his A_Clipboard.")
MsgBox("Steve opened his A_Clipboard.")
This is just a string, with no relation to the Clipboard variable. Regardless of case or the surrounding string, the insertion of A_
is unwarranted.
This also applies to A_LoopFileFullPath
and A_LoopFileLongPath
(and maybe others?), although I suppose those are less likely to be an issue.
It appears that only the first occurrence of each name on a given line is replaced, which would be another bug if the replacement is warranted.
Other examples from my auto-spell script:
Input:
::controll::control
::crtical::critical
::proccess::process
::ptogress::progress
::tranform::transform
Output:
::controll::Control()
::crtical::Critical()
::proccess::ErrorLevel := Process()
::ptogress::gocProgress.Value :=
::tranform::; Removed : Transform(, , , )
Expected output: No change (same as input) because these are just words.
This is just a string, with no relation to the Clipboard variable. Regardless of case or the surrounding string, the insertion of
A_
is unwarranted.This also applies to
A_LoopFileFullPath
andA_LoopFileLongPath
(and maybe others?), although I suppose those are less likely to be an issue.
Have submitted a fix for keyword conversions affecting strings. If the pull-request is accepted, many keywords will no longer be replaced within strings. The following should be corrected... (A_BatchLines, A_isUnicode, A_LoopFileFullPath, A_LoopFileLongPath, A_NumBatchLines, Clipboard, ClipboardAll, ComObjParameter, ComSpec, New) More may be corrected in future updates.
#156 will fix Lexikos' example, but user1823's example is still broken
Hopefully fully fixing shouldn't be too hard, as the base is here for these kinds of issues