Search found 198 matches

by RNIB
Thu Nov 28, 2024 2:10 pm
Forum: Beginners
Topic: RegEx Help
Replies: 5
Views: 8482

Re: RegEx Help

Ahh, okay. Well I've got the logging working at last. The only problem now is that with logging enabled it runs really, really slow. However, making by making it run so slow, it works as it should and so the log file doesn't show where it's going wrong. Insert emjoi of banging head against a brick w...
by RNIB
Wed Nov 27, 2024 3:39 pm
Forum: Beginners
Topic: RegEx Help
Replies: 5
Views: 8482

Re: RegEx Help

Yeah I think you are right. The weird thing is that it appears that the first time it sees this particular tag, it thinks its missing and adds a new one. When it then starts the 2nd loop, it always correctly reads this tag and so doesn't try to add a new one. The difference was in my test set of fil...
by RNIB
Tue Nov 26, 2024 11:35 am
Forum: Beginners
Topic: RegEx Help
Replies: 5
Views: 8482

RegEx Help

I think I may finally have worked out why my macro is being so inconsistent and its to do with the RegEx I'm using but I don't understand RegEx enough (or at all) to work out how to correct it. The macro I'm failing to create looks at the metadata tags within an HTML file and checks the content of t...
by RNIB
Fri Nov 22, 2024 4:31 pm
Forum: Technical / Scripting
Topic: Issue with Multiple While Commands?
Replies: 11
Views: 12323

Re: Issue with Multiple While Commands?

Oh OF COURSE :oops: :oops: :lol: :lol:

I'll have a look at ReadFile. I've always avoided it because I was never sure how to then find specific content within it.
by RNIB
Fri Nov 22, 2024 3:12 pm
Forum: Technical / Scripting
Topic: Issue with Multiple While Commands?
Replies: 11
Views: 12323

Re: Issue with Multiple While Commands?

I will take a look at trying to create a custom log file but I'm struggling a bit with understanding how to do this and what needs to be captured. In the mean time I believe I've found the the area of code that is causing the problems, just not exactly which bit of code it is or why. I think it's to...
by RNIB
Thu Nov 21, 2024 4:59 pm
Forum: Technical / Scripting
Topic: Issue with Multiple While Commands?
Replies: 11
Views: 12323

Re: Issue with Multiple While Commands?

Well I'm slowly getting there. I've managed to find 3 errors so far and the REALLY annoying thing is that if I step through the macro it works PERFECTLY. However, if I run it, the first couple of SRT's run fine and then it just thinks it can't find any of the meta tags and just runs the SRT's that a...
by RNIB
Wed Nov 20, 2024 11:03 am
Forum: Technical / Scripting
Topic: Issue with Multiple While Commands?
Replies: 11
Views: 12323

Re: Issue with Multiple While Commands?

Well I solved the problem of why subsequent SRT's were changing the wrong lines. I had a spelling mistake in the line that saves the html file each time. As a result subsequent SRT's weren't working on the updated file :oops: :oops: :oops: What I still haven't worked out is that it now works fine wi...
by RNIB
Tue Nov 19, 2024 12:41 pm
Forum: Technical / Scripting
Topic: Issue with Multiple While Commands?
Replies: 11
Views: 12323

Issue with Multiple While Commands?

Apologies for the length of this but I've got myself completely confused and have gone 'code blind'. I just can't see what I'm doing wrong. I'm wondering if it's because I'm using lots of while commands which themselves are enclosed within a Repeat Until loop but really not sure. I've got this macro...
by RNIB
Wed Nov 13, 2024 10:00 am
Forum: Technical / Scripting
Topic: Detect Date Format & Change If Required?
Replies: 5
Views: 7718

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...
by RNIB
Tue Nov 12, 2024 2:37 pm
Forum: Technical / Scripting
Topic: Detect Date Format & Change If Required?
Replies: 5
Views: 7718

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...
by RNIB
Tue Nov 12, 2024 11:08 am
Forum: Technical / Scripting
Topic: Detect Date Format & Change If Required?
Replies: 5
Views: 7718

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...
by RNIB
Mon Nov 11, 2024 11:00 am
Forum: Technical / Scripting
Topic: Check if String matches one of multiple options?
Replies: 3
Views: 5323

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...
by RNIB
Fri Nov 08, 2024 3:14 pm
Forum: Technical / Scripting
Topic: Check if String matches one of multiple options?
Replies: 3
Views: 5323

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...
by RNIB
Fri Nov 01, 2024 12:09 pm
Forum: Technical / Scripting
Topic: Difference In File Size Calculations
Replies: 3
Views: 5354

Re: Difference In File Size Calculations

Ahh, thank you. That combined with setting rounding mode to 0 seems to have done the trick
by RNIB
Thu Oct 31, 2024 5:22 pm
Forum: Technical / Scripting
Topic: Difference In File Size Calculations
Replies: 3
Views: 5354

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...
Sign up to our newsletter for free automation tips, tricks & discounts