AutoHotkey Community

It is currently May 26th, 2012, 8:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 129 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 9  Next
Author Message
 Post subject:
PostPosted: July 12th, 2009, 10:14 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Roger, I'll add test soon.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 12th, 2009, 10:32 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Heres a major problem

The variable 2 is blank. I think it has to do with Misc1 & Misc2



Code:
#Include ini.ahk
f =
(
[Home]
Path=C
[Email]
Misc1=12345
Misc2=67890
)
Content := ini_getSection(f, "Email")
1 := ini_getValue(Content, "Email", "Misc1",1)
2 := ini_getValue(Content, "Email", "Misc2",1)
msgbox,%1%
msgbox,%2%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 4:21 am 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Thx for the report and taking time to test. I have fixed and updated the archive. I had allways problems with last line. The test is also added in test module. And I have given credit to you as tester.^^


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 4:27 am 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
EDIT:

Still have the error, in larger ini files, it still gives error. I dont know why.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 2:01 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Are you sure you downloaded and used the newer version 0.4.1 (not 0.4)? My test are success. Please send me or show the ini content and how you access that content. I would like to inspect it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 4:41 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Let me retry.

EDIT:

I #Included wrong file, but other than that, I see no bugs


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 5:21 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
BTW, when do you think add section and and keys and values will be done?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 10:03 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
In the next days, if I have more time. And I want begin to work on add functions, only if all other functions work correct. If you or others have more test cases, let me know.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 13th, 2009, 10:35 pm 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Ok, will do


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2009, 2:31 am 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
This bug will probably never be encountered, but It might be worth it to fix. The space look a like character, is ALT + 0160.
Other than this, these functions are rock solid

Code:
#Include ini.ahk
f =
(
[Home]
Path=C
[Email]
Misc c=12345 ; The space you see in between c and c is the character alt + 0160
Misc=67890
)
Content := ini_getSection(f, "Email")
1 := ini_getValue(Content, "Email", "Misc c",1)
2 := ini_getValue(Content, "Email", "Misc",1)
msgbox,%1%
msgbox,%2%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2009, 3:15 am 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
I have tested it and it does work. Even this is not a bug!? On my pc, this works. %1% results to "Misc c=12345 ; The space you see in between c and c is the character alt + 0160" and %2% to "67890" correctly.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2009, 4:03 am 
Offline

Joined: November 1st, 2007, 10:03 pm
Posts: 885
Hmmm, ok then


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2009, 9:58 am 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
The ALT+0160 character is sometimes used to create a visually nice appearance of a string where the Space character is not allowed.

As an example, since years ago I have renamed my My Computer shortcut on the desktop to ALT+0160 (and assigned it a blank icon) so it would be completely invisible, since I never use it and cannot be completeley removed due to Win9x architecture, neither can the Space character be used for a name.

Same character combination may be used in web-based environment to avoid the need for %20 which takes 3 chars.

So it may not be so uncommon after all. Hopefully there is no bug in regard to this character. Unfortunately, I have not yet had time to test this script as it's a quite busy week. :cry:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 14th, 2009, 2:28 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Thx for the information, to Drugwash and Fry, to touch that subject. I knew that character and have allways asked me what is it good for.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Update
PostPosted: July 15th, 2009, 9:02 am 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Updated to version 0.5.

Last changes
  • Added functions: ini_insertKey() and ini_insertSection()
  • Some small corrections and changes on regexes.
  • Added some more tests. (Now 25 Test cases.)

Not sure if Regex is really the best solution for such a thing. Some more comments please.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 129 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 9  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], notsoobvious, Uberi and 18 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