Search found 3868 matches

by BarryG
Thu Aug 14, 2025 10:27 pm
Forum: Off Topic
Topic: Commodore is back!
Replies: 9
Views: 317

Re: Commodore is back!

With all due respect, I don't quite understand the point of this reboot.

I grew up with a VIC-20 and C64 and know them very well (and from a coding point-of-view, too). I agree this is pointless reboot, done for nostalgia only. It's not going to go anywhere. Hobbyists, collectors and enthusiasts ...
by BarryG
Tue Aug 12, 2025 10:29 pm
Forum: General Discussion
Topic: Speed on PB is slow ?!
Replies: 14
Views: 442

Re: Speed on PB is slow ?!

3167 ms on my very old PC. This is running it as a compiled exe, built with the ASM backend with v6.10 of PureBasic.
by BarryG
Mon Aug 11, 2025 10:37 pm
Forum: 3D Programming
Topic: Movie over 3D
Replies: 3
Views: 130

Re: Movie over 3D

I don't know anything about OGRE or 3D coding, sorry. But I do know that I've been playing MP4 movies with PureBasic for decades. It'll play any video that has codecs installed on your PC for it.
by BarryG
Mon Aug 11, 2025 12:14 pm
Forum: 3D Programming
Topic: Movie over 3D
Replies: 3
Views: 130

Re: Movie over 3D

minimy wrote: Mon Aug 11, 2025 11:57 am6.21 can play mp4 too
Just for the record: so can 6.10 and lower (it's not a 6.21 feature).
by BarryG
Mon Aug 11, 2025 8:36 am
Forum: Feature Requests and Wishlists
Topic: Week number in a Year
Replies: 9
Views: 1814

Re: Week number in a Year

Oh, right. :oops: Under the "Database" section. I was looking for "SQLite" in the index. :lol:
by BarryG
Mon Aug 11, 2025 1:21 am
Forum: Feature Requests and Wishlists
Topic: Week number in a Year
Replies: 9
Views: 1814

Re: Week number in a Year

SQLite? PureBasic doesn't support that? I see no lib for it.
by BarryG
Sun Aug 10, 2025 11:53 am
Forum: Feature Requests and Wishlists
Topic: Week number in a Year
Replies: 9
Views: 1814

Re: Week number in a Year

This will cause much eye rolling and complaints from some countries who want every week to start on Sunday (or Monday) including for week number of the year.

As long as it matches the week number shown in the CalendarGadget(), then no eye-rolling or complaints should arise. :)

I needed a week ...
by BarryG
Sat Aug 09, 2025 1:40 am
Forum: Tricks 'n' Tips
Topic: Uptime On Your App
Replies: 27
Views: 691

Re: Uptime On Your App


Just read the first sentence Randy wrote. The uptime if his program. Period.


Okay. My bad.

I could be wrong but I think it has the same limitation as GetTickCount_()
Otherwise, yes, You could substitute using ElapsedMilliseconds()

ElapsedMilliseconds() is a Quad, so doesn't have the same 49 ...
by BarryG
Fri Aug 08, 2025 3:07 pm
Forum: Tricks 'n' Tips
Topic: Uptime On Your App
Replies: 27
Views: 691

Re: Uptime On Your App

Uptime = Time since PC started.
Runtime = How long the app has been running.

That's what my comments are based on.
by BarryG
Fri Aug 08, 2025 1:11 pm
Forum: Tricks 'n' Tips
Topic: Uptime On Your App
Replies: 27
Views: 691

Re: Uptime On Your App

Call it at the beginning of your program and you'll get the uptime.

Wrong. Proof:

Debug ElapsedMilliseconds() ; Returns 0

It's got nothing to do with uptime at all. Fred has confirmed this in past comments. It's just a timer.

I can't remember in which PB version it changed, but today, the ...
by BarryG
Fri Aug 08, 2025 11:42 am
Forum: Tricks 'n' Tips
Topic: Uptime On Your App
Replies: 27
Views: 691

Re: Uptime On Your App

I wanted to be able to know how long my app was up and running.

Just use the value of Date() when your app starts, and keep calculating its runtime from that. To get you started:

start.q=Date()

Repeat
Sleep_(1000)
Debug "App runtime is: "+FormatDate("%hh:%ii:%ss",Date()-start)
ForEver
by BarryG
Fri Aug 08, 2025 11:35 am
Forum: Tricks 'n' Tips
Topic: Uptime On Your App
Replies: 27
Views: 691

Re: Uptime On Your App

jacdelad wrote: Fri Aug 08, 2025 8:28 am Also, shouldn't ElapsedMilliseconds() work too (and be cross platform)?
No, that's not uptime. It's just a timer from one call of it to the next.
by BarryG
Fri Aug 08, 2025 7:46 am
Forum: Tricks 'n' Tips
Topic: Outlook MSG to Text decoder
Replies: 1
Views: 98

Re: Outlook MSG to Text decoder

Yep. Some people here mocked ChatGPT not long ago but it really can do some good error-free stuff now. I used it last week to learn how change the volume of an app (by window), and it worked immediately. I'm amazed.
by BarryG
Fri Aug 08, 2025 5:21 am
Forum: Tricks 'n' Tips
Topic: Uptime On Your App
Replies: 27
Views: 691

Re: Uptime On Your App

GetTickCount_() doesn't work after 49.7 days of uptime, so it's not usable for this sort of thing. Microsoft says to use GetTickCount64() instead, but that's not immediately available in PureBasic as a single API command. Someone else here will surely step in and show how to use it.
by BarryG
Thu Aug 07, 2025 10:06 pm
Forum: Coding Questions
Topic: [SOLVED] confusion with ReplaceString()
Replies: 9
Views: 334

Re: confusion with ReplaceString()

Is it possible to explicitly specify to replace only the first word found and then exit ?

Yes, the help for ReplaceString() shows that it has a "number of occurrences" flag, so set it to "1" to exit after the first match:

Define string.s = "ABC time DEF GHIJK LM mtime NOP"
string ...