Search found 7208 matches

by infratec
Sat Jan 31, 2026 5:08 pm
Forum: Coding Questions
Topic: Missed output from progrum run by RunProgram?
Replies: 5
Views: 170

Re: Missed output from progrum run by RunProgram?

Btw. your code works on my PC.


; Executes the PB compiler with the -h option and displays the output

Compiler = RunProgram(#PB_Compiler_Home + "compilers/pbcompiler", "-h", "", #PB_Program_Open | #PB_Program_Read | #PB_Program_Error)
Output$ = ""
Error$ = ""
If Compiler
*Buffer = AllocateMemory ...
by infratec
Fri Jan 30, 2026 8:23 pm
Forum: Coding Questions
Topic: Missed output from progrum run by RunProgram?
Replies: 5
Views: 170

Re: Missed output from progrum run by RunProgram?

Your handling is not 100% correct.

AvailableProgramOutput() returns the bytes to read.
If you use ReadProgramString() you can still 'lock' the program, because it waits for a CR.
You should use ReadProgramData() and PeekS().
Also you should read stderr, because many programs are writing also some ...
by infratec
Sun Jan 25, 2026 11:02 am
Forum: Coding Questions
Topic: Comparison as argument
Replies: 2
Views: 179

Re: Comparison as argument

Code: Select all

Macro Check(a)
  Bool(a)
EndMacro

Integer = 0.6 ; rounded to 1
Debug Check(Integer * 2 = 2)
Debug Check(Integer * 2 = 3)
by infratec
Sun Jan 25, 2026 12:34 am
Forum: Feature Requests and Wishlists
Topic: It would be nice to have a binary shift
Replies: 5
Views: 364

It would be nice to have a binary shift

Up to now I never needed an arithmetic shift.
I always need a binary shift.

So it would be nice to have such a function available.
by infratec
Sat Jan 24, 2026 7:11 pm
Forum: Coding Questions
Topic: Long bug when negative bit is set
Replies: 11
Views: 525

Re: Long bug when negative bit is set

I don't know if this happens in older versions too, but I think so.
by infratec
Sat Jan 24, 2026 7:01 pm
Forum: Coding Questions
Topic: Long bug when negative bit is set
Replies: 11
Views: 525

Re: Long bug when negative bit is set

Ok, found an other way to fix:


Procedure.l Endian(val.l)
ProcedureReturn ((val & $000000FF) << 24) | ((val & $0000FF00) << 8) | ((val & $00FF0000) >> 8) | ((val & $FF000000) >> 24)
EndProcedure


Procedure.l EndianFix(val.l)
Protected Result.q
Result = ((val & $000000FF) << 24) | ((val ...
by infratec
Sat Jan 24, 2026 6:49 pm
Forum: Coding Questions
Topic: Long bug when negative bit is set
Replies: 11
Views: 525

Long bug when negative bit is set


Procedure.l Endian(val.l)
ProcedureReturn ((val & $000000FF) << 24) | ((val & $0000FF00) << 8) | ((val & $00FF0000) >> 8) | ((val & $FF000000) >> 24)
EndProcedure


Procedure.l EndianFix(val.l)
Protected Result.q
Result = ((val & $000000FF) << 24) | ((val & $0000FF00) << 8) | ((val & $00FF0000 ...
by infratec
Fri Jan 23, 2026 7:55 am
Forum: Tricks 'n' Tips
Topic: Supermarket list
Replies: 6
Views: 559

Re: Supermarket list

Only an idea:

if you have a webserver ... load it in a folder and write a spider basic app for the smartphone.
by infratec
Wed Jan 21, 2026 8:39 am
Forum: Coding Questions
Topic: WebViewGadget question ...
Replies: 1
Views: 204

Re: WebViewGadget question ...

It depends what you want to do :wink:

You can also open it with an empty page and inject a script to do something.

If you want to manipulate a page, you need of course to wait until this page is available.
by infratec
Sat Jan 17, 2026 10:21 pm
Forum: Coding Questions
Topic: ScintillaGadget using LEXER
Replies: 11
Views: 691

Re: ScintillaGadget using LEXER

I think you need at least the SciLexer.dll

https://www.scintilla.org/SciTEDownload.html
by infratec
Mon Jan 12, 2026 4:34 pm
Forum: Announcement
Topic: PureBasic 6.30 is out !
Replies: 186
Views: 46054

Re: PureBasic 6.30 is out !

Fixed!
by infratec
Mon Jan 12, 2026 2:58 pm
Forum: Announcement
Topic: PureBasic 6.30 is out !
Replies: 186
Views: 46054

Re: PureBasic 6.30 is out !

With 6.30 final I can not open a project -> Project file can not be loaded
With beta 7 it is/was working.

PB 6.30 x86 on win10 x64 fails.

PB 6.30 x64 on win10 x64 works.
by infratec
Sat Jan 10, 2026 10:56 am
Forum: Coding Questions
Topic: PlaySound with a 20KHz file produces sound ?!
Replies: 29
Views: 1453

Re: PlaySound with a 20KHz file produces sound ?!

You need an oszilloscope to check it.

If it is not 100% sine wave, you can hear the generated subfrequencies.
by infratec
Wed Jan 07, 2026 5:31 pm
Forum: Bugs - Mac OSX
Topic: [Done] Why CatchXML needs more memory then LaodXML?
Replies: 4
Views: 628

Re: Why CatchXML needs more memory then LaodXML?

What is the result of this:

; Load file into memory
fileid = ReadFile(#PB_Any, filename$)
If FileID
*memory = AllocateMemory(Lof(fileid))
If *memory
If ReadData(fileid, *memory, MemorySize(*memory)) <> MemorySize(*memory)
Debug "Was not able to read all bytes"
Else
Debug "Ok"
EndIf
Else ...