Search found 190 matches
- Wed Nov 13, 2024 10:00 am
- Forum: Technical / Scripting
- Topic: Detect Date Format & Change If Required?
- Replies: 5
- Views: 162
Re: Detect Date Format & Change If Required?
Thank you both for your help on this. The reasoning that if the language were en-GB that the date format would be DD-MM-YYYY is certainly reasonable. However, unfortunately this isn't the case. Nor is it sadly possible to have any control over the parsed HTML file. The files I'm working with are tho...
- Tue Nov 12, 2024 2:37 pm
- Forum: Technical / Scripting
- Topic: Detect Date Format & Change If Required?
- Replies: 5
- Views: 162
Re: Detect Date Format & Change If Required?
If the day is less than 13 you have no way of knowing which one it is. Good point! Hmm. Seeing as the format needs to be YYYY-MM-DD and that it's more important that the date is in that format then it is that the date itself is accurate to the day, I guess I could look at the first 4 characters and...
- Tue Nov 12, 2024 11:08 am
- Forum: Technical / Scripting
- Topic: Detect Date Format & Change If Required?
- Replies: 5
- Views: 162
Detect Date Format & Change If Required?
I'm stuck on what I hope is the final hurdle. I'm reading the metadata of an HTML file and capturing in the variable dcDateMatches1_1 the date that has been entered. What I now need to do is determine whether that date has been entered correctly or not. If a date has been entered in the wrong format...
- Mon Nov 11, 2024 11:00 am
- Forum: Technical / Scripting
- Topic: Check if String matches one of multiple options?
- Replies: 3
- Views: 110
Re: Check if String matches one of multiple options?
This is brilliant. Thank you both so much. I had previously been playing around with using separate but just couldn't get my head around how to make it work and it never occurred to me to use Position. Both solutions are far, far more elegant than anything I was crudely trying to create and work bea...
- Fri Nov 08, 2024 3:14 pm
- Forum: Technical / Scripting
- Topic: Check if String matches one of multiple options?
- Replies: 3
- Views: 110
Check if String matches one of multiple options?
I'm reading a line of metadata within a HTML file to get the language code. The line will appear as something like: <meta name="dc:language" content="en-GB"/> This is captured as strDCLANGValue1 earlier in my code However, the only bit I'm interested in is the content between " ", in this case en-GB...
- Fri Nov 01, 2024 12:09 pm
- Forum: Technical / Scripting
- Topic: Difference In File Size Calculations
- Replies: 3
- Views: 421
Re: Difference In File Size Calculations
Ahh, thank you. That combined with setting rounding mode to 0 seems to have done the trick
- Thu Oct 31, 2024 5:22 pm
- Forum: Technical / Scripting
- Topic: Difference In File Size Calculations
- Replies: 3
- Views: 421
Re: Difference In File Size Calculations
Okay, I think I've worked out how to get a correct calculation when it counts the file size of ALL files. The help file says that the default mode of Round is to round to the nearest value. However it appears that I have to specifically set the round mode to 0 to make this work. However, there is st...
- Thu Oct 31, 2024 4:26 pm
- Forum: Technical / Scripting
- Topic: Difference In File Size Calculations
- Replies: 3
- Views: 421
Difference In File Size Calculations
Where I work we create audio books in a format called DAISY and this involves checking the books in a DAISY validator which runs hundreds of different checks to make sure the book conforms to the DAISY standard. One of those checks is that it calculates the size of the book in Kilobytes and checks t...
- Fri Oct 25, 2024 9:37 am
- Forum: Technical / Scripting
- Topic: Get Total File Size of All Files In Folder
- Replies: 1
- Views: 4391
Get Total File Size of All Files In Folder
I need to find what the overall total byte size is of all files within a folder but the number of files, file types and file names will be different each time. Is there a way I can do this simply, something along the lines of: FileSize>C:\Temp\*.*,nFileSize Or do I need to count the number of files,...
- Wed Oct 16, 2024 4:02 pm
- Forum: Technical / Scripting
- Topic: Dialog Designer Help
- Replies: 8
- Views: 1105
Re: Dialog Designer Help
Ahh, okay. Well that is definitely better Didn't realise you could do that.
- Wed Oct 16, 2024 3:40 pm
- Forum: Technical / Scripting
- Topic: Dialog Designer Help
- Replies: 8
- Views: 1105
Re: Dialog Designer Help
just need to sort out preventing multiple selections now. That's what radio boxes are for. Dialog>Dialog1 object Dialog1: TForm Left = 238 Top = 95 HelpContext = 5000 BorderIcons = [biSystemMenu] Caption = 'Select Option' ClientHeight = 213 ClientWidth = 381 Color = clBtnFace Font.Charset = DEFAULT...
- Wed Oct 16, 2024 1:47 pm
- Forum: Technical / Scripting
- Topic: Dialog Designer Help
- Replies: 8
- Views: 1105
Re: Dialog Designer Help
Ahh, got it. I understand now. Thank you for this, I was getting myself all mixed up. As you say, just need to sort out preventing multiple selections now.
Thanks again.
Thanks again.
- Wed Oct 16, 2024 11:06 am
- Forum: Technical / Scripting
- Topic: Dialog Designer Help
- Replies: 8
- Views: 1105
Re: Dialog Designer Help
I want the user to be able to only select one option and, ideally, for that to only be submitted when the press the OK button. I thought I was using the GetDialogProperty to get the checked value but then it's not redirecting to the correct label as no matter what option is selected, the same sub ro...
- Wed Oct 16, 2024 10:34 am
- Forum: Technical / Scripting
- Topic: Dialog Designer Help
- Replies: 8
- Views: 1105
Dialog Designer Help
I am writing a macro that performs a series of tasks each of which consists of several stages. As individual stages are used in more than one tasks, I've set each stage as a sub routine and then used labels to define the start of each task e.g. Label>Task1 GoSub>Stage1 GoSub>Stage2 GoSub>Stage 3 Lab...
- Tue Sep 24, 2024 4:47 pm
- Forum: Technical / Scripting
- Topic: Strip out specific characters from string
- Replies: 9
- Views: 2293
Re: Strip out specific characters from string
Hi, expanding on Dorian's suggestion: For Regex, \K means forget what you have matched already and continue, so in the example you match dc:title until content=" then forget everything (\K) and continue and match subsequent characters that are not ", ie Warriors:. Hope it helps. //Read source file ...