 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Sty!a
Joined: 31 Jan 2005 Posts: 65
|
Posted: Thu Feb 03, 2005 11:10 am Post subject: A Command for writing in the .ahk |
|
|
It would be , when there would be a command to write in a specific part of the ahk.
Example
AHKwrite, %var1%, section
 |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Thu Feb 03, 2005 11:52 am Post subject: |
|
|
| TBH, I've no clue what you're talking about can you clearify what your request is about ?! |
|
| Back to top |
|
 |
Sty!a
Joined: 31 Jan 2005 Posts: 65
|
Posted: Thu Feb 03, 2005 11:56 am Post subject: |
|
|
I thing its very clear. _________________
Th!s !s STYLE |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Feb 03, 2005 12:54 pm Post subject: |
|
|
If you want the script to modify itself, the best approach is to make a new copy of it and insert the lines where you need: | Code: | FileDelete, %A_ScriptFullPath%.NEW
Loop, Read, %A_ScriptFullPath%, %A_ScriptFullPath%.NEW
{
if A_Index = 100 ; The insertion point has been arrived at.
{
FileAppend, `; Here is the next to insert right before the above line number.`n
}
FileAppend, %A_LoopReadLine%`n
}
MsgBox, 4,, Overwrite original script with new one?
IfMsgBox, Yes
FileMove, %A_ScriptFullPath%.NEW, %A_ScriptFullPath%, 1 |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|