Best way to use AHK to write a .ahk file?
Best way to use AHK to write a .ahk file?
I have a basic understanding of gui's, so I was planning on having a pop up box where someone would enter in the variable needed for different parts of a script that needs to be deployed. The actual output of what I want written into a script I can put together pretty easily I think. But what's the best way to turn code from clipboard or variable data into a .ahk file?
Re: Best way to use AHK to write a .ahk file?
One method maybe FileAppend
Code: Select all
FileAppend,
(
::btw::by the way
;A line of text.
;By default, the hard carriage return (Enter) between the previous line and this one will be written to the file.
; This line is indented with a tab; by default, that tab will also be written to the file.
;Variable references such as %Var% are expanded by default.
), D:\My File.ahk
Run, D:\My File.ahk
Re: Best way to use AHK to write a .ahk file?
Lepes wrote: ↑28 Sep 2022, 16:44One method maybe FileAppend
Code: Select all
FileAppend, ( ::btw::by the way ;A line of text. ;By default, the hard carriage return (Enter) between the previous line and this one will be written to the file. ; This line is indented with a tab; by default, that tab will also be written to the file. ;Variable references such as %Var% are expanded by default. ), D:\My File.ahk Run, D:\My File.ahk
beauty, this looks like it thanks