AHK-v2-script-converter
AHK-v2-script-converter copied to clipboard
AHK v1 -> v2 script converter WORK IN PROGRESS
Thank you for this script, it has been an immense help. Working v1 example: `RegExMatch(test_string, "O)()", match)` Incorrect v2 converter output: ````RegExMatch(test_string, "O)()", match)```` Acceptable v2 converter output: ````RegExMatch(test_string, "()",...
When attempting to convert code: `#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ;...
Input: ```AutoHotkey if RegExMatch(uri, "^\[url=") RegExMatch(uri, "\G[^\]]*", uri, 6) else { MsgBox 1,, URI appears invalid:`n%uri% IfMsgBox Cancel return } ``` Incorrect output: ```AutoHotkey if RegExMatch(uri, "^\[url=") RegExMatch(uri[0], "\G[^\]]*", &uri,...
Lexikos recently posted on the forums a link to a script that the v2 launcher uses to determine if a script is meant for v1 or v2 Might be useful...
This v1 line `Clipboard := "Powershell -command ""Get-CimInstance -ClassName win32_operatingsystem | Select-Object CSName, LastBootUpTime | FT -Autosize"""` is translated to v2 line `A_Clipboard := "Powershell -command ""Get-CimInstance -ClassName win32_operatingsystem |...
v1 code :- if (ok:=FindText(X, Y, 0, 0, 203, 187, 0, 0, Text)) v2 code :- if (ok:=FindText(&X, &Y, 0, 0, 203, 187, 0, 0, Text))
**V1** Process, Exist, notepad.exe if !ErrorLevel try Run notepad.exe else MsgBox Process Notepad.exe already exists! Return **V2** ErrorLevel := ProcessExist("notepad.exe") if !ErrorLevel try Run("notepad.exe") else MsgBox("Process Notepad.exe already exists!") Return...
#SingleInstance force MsgBox A_AhkVersion #NoEnv SendMode Input ;~ gui one ask for sex and age ;~ if sex is male and age > 20 ;~ gui two allows them to...
I usually get this error:  What does it mean?
Mike, Thanks for all you have done here. I reformatted QuickConverterV2.ahk and QuickConverterV2_scintilla.ahk. I don't know if you will be interested in these files but they may help speed up...