Populate a
localhost
filename in user's HOME directory, as default, with (perhaps chunked) content
RJM Programming - March, 2022
Create Local
MAMP
File
Optional Path (else user home directory)
Base Filename (eg.
AutoHotKey
compiling script)
Chunking Start Code
Content (maybe chunked)
EnvGet, vUserProfile, USERPROFILE param := "" paramtwo := "x.ahk" paramthree := "x.exe" yeslf := "" dq := Chr(34) Loop, %0% ; For each parameter: { if A_Index = 1 ZZ_Index = "%1%" else if A_Index = 2 ZZ_Index = "%2%" else if A_Index = 3 ZZ_Index = "%3%" If ZZ_Index contains ".ahk" { paramtwo = "%ZZ_Index%" paramthree := StrReplace(paramtwo, ".ahk", ".exe") } else { If ZZ_Index contains ".AHK" { paramtwo = "%ZZ_Index%" paramthree := StrReplace(paramtwo, ".AHK", ".exe") } else { yeslf := StrReplace(ZZ_Index, "(])", "`r`n") If StrLen("%yeslf%") = StrLen("%ZZ_Index%") { If ZZ_Index contains "." { FileDelete, %vUserProfile%\%paramtwo% FileCopy, %ZZ_Index%, %vUserProfile%\%paramtwo% } else { If SubStr(yeslf, 1, 1) = Chr(34) yeslf := SubStr(yeslf, 2, (Strlen(yeslf) - 2)) param := "yes" } } else If SubStr(yeslf, 1, 1) = Chr(34) yeslf := SubStr(yeslf, 2, (Strlen(yeslf) - 2)) param := "yes" ; Fetch the contents of the variable whose name is contained in A_Index. } } } If StrLen(param) != 0 { FileDelete, %vUserProfile%\%paramtwo% FileAppend, %yeslf%, %vUserProfile%\%paramtwo% } IfWinExist Ahk2Exe.exe for AutoHotKey WinActivate else { Run c:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe /in %vUserProfile%\%paramtwo% /out %vUserProfile%\%paramthree% WinActivate Ahk2Exe.exe for AutoHotKey } Run %vUserProfile%\%paramthree% return