AutoHotkey Community

It is currently May 26th, 2012, 11:57 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 3rd, 2008, 1:53 pm 
In PERL you can store data at the end of a script, which can be handled like data from an external source.
Quote:
Everything after the __DATA__ token is available for reading via the filehandle FOOBAR::DATA, where FOOBAR is the name of the current package when the __DATA__ token is reached.
For details see [perldoc.perl.org]

Is there something similar in AHK?

Thank you &
Regards from Germany


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2008, 4:28 pm 
Offline

Joined: March 19th, 2006, 5:52 am
Posts: 419
You can use your script as an ini file.
Code:
/*
[section1]
item1=0
item2=1
*/

IniRead, item1, %A_ScriptFullPath%, section1, item1, 0
IniRead, item2, %A_ScriptFullPath%, section1, item2, 1


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2008, 4:47 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
:arrow: that is... uncompiled


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2008, 9:47 pm 
TheIrishThug wrote:
You can use your script as an ini file.

Great. Works as intended.

Thank´s a lot


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2008, 10:13 pm 
Offline

Joined: March 19th, 2006, 5:52 am
Posts: 419
SKAN wrote:
:arrow: that is... uncompiled

Very true. I almost never compile and AHK script. Sometimes I forget it's an option.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group