| View previous topic :: View next topic |
| Author |
Message |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Sun Jul 12, 2009 10:14 pm Post subject: |
|
|
| Roger, I'll add test soon. |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Sun Jul 12, 2009 10:32 pm Post subject: |
|
|
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% |
|
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 894 Location: Berlin, DE
|
Posted: Mon Jul 13, 2009 4:21 am Post subject: |
|
|
| 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.^^ |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Mon Jul 13, 2009 4:27 am Post subject: |
|
|
EDIT:
Still have the error, in larger ini files, it still gives error. I dont know why. |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 894 Location: Berlin, DE
|
Posted: Mon Jul 13, 2009 2:01 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Mon Jul 13, 2009 4:41 pm Post subject: |
|
|
Let me retry.
EDIT:
I #Included wrong file, but other than that, I see no bugs |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Mon Jul 13, 2009 5:21 pm Post subject: |
|
|
| BTW, when do you think add section and and keys and values will be done? |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 894 Location: Berlin, DE
|
Posted: Mon Jul 13, 2009 10:03 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Mon Jul 13, 2009 10:35 pm Post subject: |
|
|
| Ok, will do |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Tue Jul 14, 2009 2:31 am Post subject: |
|
|
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% |
|
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 894 Location: Berlin, DE
|
Posted: Tue Jul 14, 2009 3:15 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Fry
Joined: 01 Nov 2007 Posts: 883
|
Posted: Tue Jul 14, 2009 4:03 am Post subject: |
|
|
| Hmmm, ok then |
|
| Back to top |
|
 |
Drugwash
Joined: 08 Sep 2008 Posts: 608 Location: Ploiesti, RO
|
Posted: Tue Jul 14, 2009 9:58 am Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 894 Location: Berlin, DE
|
Posted: Tue Jul 14, 2009 2:28 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 894 Location: Berlin, DE
|
Posted: Wed Jul 15, 2009 9:02 am Post subject: Update |
|
|
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. |
|
| Back to top |
|
 |
|