Search found 14 matches

by Manuel
Sat Mar 30, 2019 2:44 am
Forum: Feature Requests and Wishlists
Topic: CountString() case-sensitivity
Replies: 1
Views: 1350

CountString() case-sensitivity

Could CountString() please be enhanced to recognize #PB_String_CaseSensitive and #PB_String_NoCase, to act like FindString() and ReplaceString() does? I'm currently doing it by changing both the target string and test string to lower case first, but flags to do it would be nicer. Thank you.
by Manuel
Sun May 07, 2017 11:45 am
Forum: Coding Questions
Topic: Embedding font in PB code?
Replies: 10
Views: 6235

Re: Embedding font in PB code?

Note for future reference: the font name in LoadFont() must be the internal font name of the TTF file (seen when double-clicking it to preview it); and NOT be the actual TTF filename itself. I just spent hours trying to work out why this wasn't working, and that was the reason. :?
by Manuel
Sun May 07, 2017 8:23 am
Forum: Tricks 'n' Tips
Topic: List Taskbar buttons
Replies: 10
Views: 5803

Re: Aaaand this...

Can this code know which order the buttons on the taskbar are, so I can sort them in an array with index 0 being the first button (leftmost, next to "Start") on the taskbar, and index N being the last button (rightmost, next to the clock) on the taskbar? That would be handy.
by Manuel
Thu Apr 27, 2017 8:40 am
Forum: Feature Requests and Wishlists
Topic: Handling Try/Catch
Replies: 23
Views: 10052

Re: Handling Try/Catch

wilbert wrote:Try/Catch is useful for those situations where an error can occur that isn't handled by PureBasic so the application doesn't crash.
So it's like the "Trap" command of some older Basics, or "On Error Resume Next" of Visual Basic Classic?
by Manuel
Wed Apr 26, 2017 10:58 pm
Forum: Feature Requests and Wishlists
Topic: Handling Try/Catch
Replies: 23
Views: 10052

Re: Handling Try/Catch

PokeL has no return value so the second approach makes no sense.
True, so that was a bad example. I've seen other Try/Catch examples where the tested item does have a return value (such as "Try LoadImage..."), so I should amend my question to be: how is Try/Catch better in those cases than If ...
by Manuel
Wed Apr 26, 2017 9:04 am
Forum: Feature Requests and Wishlists
Topic: Handling Try/Catch
Replies: 23
Views: 10052

Re: Handling Try/Catch

Can someone explain the practical difference between these two sets of codes? Because I fail to see why Try/Catch is needed, especially when it adds more typing and code.

Try
PokeL(0, 12345)
Catch
ErrorLog("Write to zero address")
EndTry

If PokeL(0, 12345) = 0 ; Failure.
ErrorLog("Write to ...
by Manuel
Sun Apr 23, 2017 8:35 am
Forum: Coding Questions
Topic: Start my exe from Run dialog box?
Replies: 2
Views: 1294

Re: Start my exe from Run dialog box?

Thanks for that, it works fantastic!!!
by Manuel
Sun Apr 23, 2017 1:40 am
Forum: Coding Questions
Topic: Start my exe from Run dialog box?
Replies: 2
Views: 1294

Start my exe from Run dialog box?

I need to be able to start my exe from the Windows Run dialog box (Win+R) without using the path, so if its installed in C:\Program Files\FooFolder\Foo.exe I can just press Win+R and type "Foo" to run it. Is there a way? This would have to automatically work across reboots, too. TIA.
by Manuel
Fri Apr 21, 2017 12:34 pm
Forum: Coding Questions
Topic: Is administrator account
Replies: 11
Views: 3332

Re: Is administrator account

mk-soft wrote:Set compiler option 'Request Administrator mode...'
That totally defeats the purpose. Use IsUserAdmin_() instead.
by Manuel
Sat Apr 15, 2017 1:16 am
Forum: General Discussion
Topic: [Resolved] How to close topic
Replies: 14
Views: 5483

Re: [Resolved] How to close topic

I hate the [resolved] posted in the topic titles.
They take space which could be used for a better description, they are distracting and it's just something I have to mentally remove from the text when parsing the posts in the forum.
I'm the opposite. If I'm searching for the answer for something ...
by Manuel
Fri Apr 14, 2017 11:00 am
Forum: General Discussion
Topic: [Resolved] How to close topic
Replies: 14
Views: 5483

Re: [Resolved] How to close topic

No, you do it by editing your first post. That way it shows up as [Solved] for others, but also lets others see the accepted solution if they have the same problem.
by Manuel
Tue Apr 04, 2017 12:11 pm
Forum: General Discussion
Topic: A new approach to resolve antivirus False Positives
Replies: 27
Views: 18899

Re: A new approach to resolve antivirus False Positives

firace wrote:Unfortunately I abandoned this project as I lost motivation.
That's not good to hear. Want to tell us what you did, so we can learn and do it ourselves? "Teach a man a fish".
by Manuel
Sun Apr 02, 2017 11:48 am
Forum: Coding Questions
Topic: Set Gadget Font via Windows API
Replies: 16
Views: 5118

Re: Set Gadget Font via Windows API

Thanks for taking the time to reply, but I spent 3+ hours trying to make this work without any progress and gave up.
Uninstalled PB and rewrote the entire program in C and delivered it to the client in under 30 mins.
The demo version of PureBasic doesn't support API calls, which is why you couldn ...
by Manuel
Sun Apr 02, 2017 2:28 am
Forum: General Discussion
Topic: A new approach to resolve antivirus False Positives
Replies: 27
Views: 18899

Re: A new approach to resolve antivirus False Positives

Any news on this so we can do it ourselves?