View previous topic :: View next topic |
Author |
Message |
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Jul 08, 2005 6:32 am Post subject: |
|
|
Thanks for all the nice comments. However, this was a short-lived version....
A bug was drawn to my attention: function GetBefore would return the entire input string if no match
was found. The hole has been plugged and while I was at it, I added a case-sensitivity toggle to
GetBefore and GetAfter.
Get version 4.6 here: http://www.vdsworld.com/download.php?id=363
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Tue Sep 06, 2005 7:42 pm Post subject: |
|
|
String.DLL version 4.7 is on the loose.
* Bug fix in function FileOps
* Changes in documentation
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Sep 07, 2005 1:34 am Post subject: |
|
|
excellent
Serge _________________
|
|
Back to top |
|
|
JRoza Contributor
Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Wed Sep 07, 2005 6:07 am Post subject: |
|
|
Thanks Dr.
Much appreciated as always!
Jan |
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Wed Nov 23, 2005 5:36 pm Post subject: |
|
|
Hey Dread,
I started using your string.dll and am impressed with the speed of file ops.
Though one problem I've encountered is with large files with a number in brackets in their name. e.g. a 250,000 line text file (12.6MB) named "Copy (2) of testfile.txt" will cause a run time error 27 at the line where @string function is.
If I remove either space on either side of the (2) in the file name, or remove the 2 leaving just () in the name it works fine.
If I run my application on the original that "Copy (2) of testfile.txt" was copied from there's no error. Changing the name to "Copy (2 2) of testfile.txt" or "C (2) of testfile.txt" works fine too!
Using the same name on a smaller file works fine. _________________ cheers
Dave |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed Nov 23, 2005 7:36 pm Post subject: |
|
|
Cannot reproduce that error
Tried that filename as input file, as output file, tried small files, tried big file (60 MB - 300,000 lines).
Just cannot break the dll....
So you gotta come up with more info if we are to pinpoint it.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Thu Nov 24, 2005 3:05 am Post subject: |
|
|
Ok, my test file has 190,000 strings that need changing.
On further testing I've noticed a couple of things. If I copy the file again (creating Copy of (3)...), sometimes the "Copy of (2)..." is now ok - but "Copy of (3).." is not. Other times both are not ok.
Smaller files with similiar names seem to be ok.
Also it only seems to happen if I drag and drop onto the exe, or use windows SendTo. Double-clicking on the exe seems ok.
Edit: double-clicking worked on the files with (#) in their name, but failed on another file!
I really can not find any repeatable conditions.
Dread, don't worry too much about it as my test file was massive overkill for what my application is intended for.
PS When the error occurs I'm using source files of the same name as the destination file. _________________ cheers
Dave |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Nov 24, 2005 6:39 am Post subject: |
|
|
Hmmm - no real pattern. That's a tough one! Most likely it's related to file access when you use same file
as input and output. But I just don't see why that should relate to chars in the filename
But let's try to fix it.
Which OS are you using?
Which subfunction(s) of FileOps do you call?
Perhaps send me a mail (support@dread.dk) - then I could mail ya a special debug version.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Thu Nov 24, 2005 2:18 pm Post subject: |
|
|
Dr. Dread wrote: | Hmmm - no real pattern. That's a tough one! |
It's got me beat. At first it appeared to me to be the filename.
Quote: | Most likely it's related to file access when you use same file
as input and output. |
That was a thought I had... but on further testing it errors at a point where the input and output files are different files. (long story)
Quote: | Which OS are you using? |
XP Pro SP2.
Quote: | Which subfunction(s) of FileOps do you call? |
I call StringCount, and then 3 lines later I call Replace. Though I've gone back and tested an older version that only called Replace, and the error still occurs. Though the older versions never caused an error before!?!?
Tonight I also got the same error with a small file - so file size is not part of the problem. The actual name and/or size seems irrelevent as to whether the error occurs or not.
Hmm, I've just noticed I have 2 different versions of string.dll here. I have v4.7 in the input file's directory (I was testing drag-and-drop from there). But I have v4.4 in the output directory (where the exe normally resides).
PS I've just discovered something that may be more help than my ramblings above:
string.dll v4.4 = no error
string.dll v4.6 = error
string.dll v4.7 = error
If I had v4.5 I could tell you if it also caused the error. _________________ cheers
Dave |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Dec 23, 2005 9:06 am Post subject: |
|
|
Version 5.0 has been released.
Lots of changes:
Fixed buffer overflow in FileOps-Replace
A handful of new functions
Many adjustments
New FileOpsRes range of functions allows you to load up to 9 files in separate "file slots", perform any
number of FileOps (30 different available) on each one, and then save and unload it.
In this way the DLL will not have to load/save the file once for each operation on the file. This will provide
great speed improvements for multiple operations on the same file.
FileOpsRes is only available in registered versions. The personal version has a 5 seconds delay on LOADFILE &
SAVEFILE. The commercial-license version works at full speed.
String.DLL now requires user registration.
A personal license is free and entitles you to use String.DLL in Visual DialogScript programs intended for
your own personal use or in non-commercial programs.
A commercial license costs $25. It entitles you to use String.DLL in any type of Visual DialogScript programs.
You can complete both types of registration here: http://www.dread.dk/support/
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing
Last edited by Dr. Dread on Fri Dec 23, 2005 12:59 pm; edited 2 times in total |
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Fri Dec 23, 2005 11:43 am Post subject: |
|
|
Well cant wait to try this one..
I might register the commercial one later tho.. need to test it out first
Thank you so much for this great work |
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Fri Dec 23, 2005 2:23 pm Post subject: |
|
|
Ok, got my string 5.0..
Question:
I a have a file test.txt containing for example:
biclaming
bicflaming
When I do this:
info @string(FileOps,MatchLines,test.txt,,bic,LINENOS,,[EXACT],)
String finds it on both line.. But I was expecting a empty response, since there is no EXACT match for "bic"
I am doing something wrong?
thanks |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Dec 23, 2005 3:17 pm Post subject: |
|
|
EXACT toggles case-sensitivity, just as in VDS string functions. So "bic"+EXACT will find bic, bicycle,
bicflaming etc. But not Bic or bIcing etc.
So you could extract all lines at first with this function and then use a RegEx or HoldsWord function to do
a further evaluation.
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Fri Dec 23, 2005 3:18 pm Post subject: |
|
|
BTW: Helpfile is awful with this function
I'll change that.
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Fri Dec 23, 2005 3:31 pm Post subject: |
|
|
Ahhh!! Yes.. kind of my fault also
Thanks I will try your suggestion |
|
Back to top |
|
|
|