Search found 21 matches

by The8th
Mon Jun 12, 2023 3:15 pm
Forum: Coding Questions
Topic: How to color text in EditorGadget?
Replies: 1
Views: 278

How to color text in EditorGadget?

In PB 6.02 this example does not work any more. It is a code sample from ts-soft just to provide a working example (at least it worked until PB 6.01). What has been changed in PB, why was this changed, and how can we make the code work again? EnableExplicit ; Selects Text inside an EditorGadget ; Li...
by The8th
Sat May 06, 2023 4:00 pm
Forum: Coding Questions
Topic: How do I get the leftmost/righmost character in a string?
Replies: 22
Views: 900

Re: How do I get the leftmost/righmost character in a string?

Thank you guys that you invest so much efforts in my problem. But I do not want to include extra modules and procedures in my code. My goal is to simply test if there is one of these strange characters on the right end of my strings. My strings involved only contain one of these characters each, and...
by The8th
Sat May 06, 2023 9:03 am
Forum: Coding Questions
Topic: How do I get the leftmost/righmost character in a string?
Replies: 22
Views: 900

Re: How do I get the leftmost/righmost character in a string?

Thanks for all who have tried the example. I fear there is no solution for these characters. Debug Chr($1F150) doesn't work also (should show an 🅐). Trim functions fail with an error: Define example$ = "🅐A🅚K🅝" Debug RTrim(example$ , "🅝") Debug LTrim(example$ , "🅐") Caut...
by The8th
Sat May 06, 2023 7:37 am
Forum: Coding Questions
Topic: How do I get the leftmost/righmost character in a string?
Replies: 22
Views: 900

How do I get the leftmost/righmost character in a string?

I try to simply retrieve the rightmost/leftmost character in a string. But it does not work. How can I achieve this? EnableExplicit Define example$ = "🅐A🅚K🅝" Define i.b Debug Right(example$, 1) Debug "" Debug Left(example$, 1) Debug "" For i = 1 To Len(example$) Debug M...
by The8th
Fri Dec 11, 2020 12:07 pm
Forum: Coding Questions
Topic: How can I set text to an EditorGadget?
Replies: 4
Views: 992

Re: How can I set text to an EditorGadget?

RASHAD wrote:PureBasic 5.72 is using Riched20.dll
Try using PB ver 5.73 with the most recent dll (msftedit.dll)
Everything is OK
Ah, thanks. That's it. I missed this.
Henry
by The8th
Thu Dec 10, 2020 1:32 pm
Forum: Coding Questions
Topic: How can I set text to an EditorGadget?
Replies: 4
Views: 992

Re: How can I set text to an EditorGadget?

My question is: Why does it work in a TextGadget, but not in the EditorGagdet? The problem is not the language glyphs, it happens after all Unicode characters. And it is independant of the font. It happens with all fonts. Look at the following example. The text is OK in the TextGadget, not OK in the...
by The8th
Tue Dec 08, 2020 9:44 am
Forum: Coding Questions
Topic: How can I set text to an EditorGadget?
Replies: 4
Views: 992

How can I set text to an EditorGadget?

I am trying to put text to an EditorGadget, but all efforts fail. I want the text in the EditorGadget look the same as in the TextGadget (bottom example) EnableExplicit #ST_UNICOE = 8 Define ste.SETTEXTEX ste\flags = #ST_UNICOE ste\codepage = 1200 Define text$ = "Before they're forever banned?&...
by The8th
Sun Jul 28, 2019 8:19 am
Forum: Coding Questions
Topic: How to enable Unicode support for regular expressions?
Replies: 8
Views: 2575

Re: How to enable Unicode support for regular expressions?

Forget my last posting!
Positive lookbehind and lookahead are about 5 times faster!
I assumed the opposite would be true before I tested.
That is:
(?<=[^\p{L}\p{M}\p{Nd}\p{Pc}]|^) is faster than ([^\p{L}\p{M}\p{Nd}\p{Pc}]|^)
Henry
by The8th
Sun Jul 28, 2019 7:21 am
Forum: Coding Questions
Topic: How to enable Unicode support for regular expressions?
Replies: 8
Views: 2575

Re: How to enable Unicode support for regular expressions?

I tested your code, and it is working. As I only need to check for a match I removed the positive lookbehind and lookbefore. Hope this saves some microseconds when searching several thousand files for matches :lol: . If one needs the exact matches (e. g. for ExtractRegularExpression, ReplaceRegularE...
by The8th
Sat Jul 27, 2019 6:21 pm
Forum: Coding Questions
Topic: How to enable Unicode support for regular expressions?
Replies: 8
Views: 2575

Re: How to enable Unicode support for regular expressions?

Thanks John for adding the request.
This also affects expressions like [^A-Za-z] or \W and similar which also fail for Unicode characters.
And thanks for your snippet. I will have a look at it tomorrow when I have more time.
Henry
by The8th
Sat Jul 27, 2019 12:17 pm
Forum: Coding Questions
Topic: How to enable Unicode support for regular expressions?
Replies: 8
Views: 2575

Re: How to enable Unicode support for regular expressions?

replace \b with \s Sorry, but \s only includes words between spaces, but not word boundaries. That means, it does not cover brackets, punctuation marks, quotation marks and other stuff. And it does not cover all the numerous non-alpha characters in all languages worldwide which are meant to be word...
by The8th
Sat Jul 27, 2019 7:43 am
Forum: Coding Questions
Topic: How to enable Unicode support for regular expressions?
Replies: 8
Views: 2575

How to enable Unicode support for regular expressions?

In the following example (PB 5.70 LTS X86) EnableExplicit Define s1$ = "Keins glich dem anderen." Define s2$ = "Bis man es anglich." Define s3$ = "Man sieht das täglich." Define s4$ = "Nichts ist unmöglich." Define regex.l = CreateRegularExpression(#PB_Any, &q...
by The8th
Thu Jun 21, 2018 8:50 am
Forum: Windows
Topic: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;
Replies: 13
Views: 7548

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Thanks for all your work, idle. I tried with your current version, but the result is still the same. Except that a different user agent is detected now. But HTML5 WebAudio still does not work. Browser doesn't support WebAudio: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko...
by The8th
Fri Jun 15, 2018 11:33 am
Forum: Windows
Topic: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;
Replies: 13
Views: 7548

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Hello idle, I tried your WebView example (#WIN32_IE = $600) with the URLs listed on https://sdr.hu/ But I am sorry, it does not bring along any browser emulation which supports the Edge HTML5 renderer. All webpages report this: Browser doesn't support WebAudio: Mozilla/5.0 (Windows NT 6.2; WOW64; Tr...
by The8th
Sat May 26, 2018 11:36 am
Forum: Feature Requests and Wishlists
Topic: HTML GUI Renderer
Replies: 10
Views: 3787

Re: HTML GUI Renderer

The old Trident rendering machine of Internet Explorer is really hopelessly out of date. The Edge machine has e. g. built in audio features (like live streaming) which IE never can do reguardless of what browser code you enter in FEATURE_BROWSER_EMULATION in the registry. This hint is often given wh...