AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A Command for writing in the .ahk

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Sty!a



Joined: 31 Jan 2005
Posts: 65

PostPosted: Thu Feb 03, 2005 11:10 am    Post subject: A Command for writing in the .ahk Reply with quote

It would be Cool , when there would be a command to write in a specific part of the ahk.
Example
AHKwrite, %var1%, section
Wink
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Thu Feb 03, 2005 11:52 am    Post subject: Reply with quote

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

PostPosted: Thu Feb 03, 2005 11:56 am    Post subject: Reply with quote

I thing its very clear.
_________________

Th!s !s STYLE
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 03, 2005 12:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group