Search found 1186 matches

by Paul
Mon May 15, 2023 1:00 am
Forum: Coding Questions
Topic: NUMBER EXPECTED INSTAEAD OF A STRING' ERROR WHEN LOADING FUNCTIONS DYNAMICLY
Replies: 10
Views: 399

Re: NUMBER EXPECTED INSTAEAD OF A STRING' ERROR WHEN LOADING FUNCTIONS DYNAMICLY

luis wrote: Mon May 15, 2023 12:57 am Where I saw something like that before ?
:lol:
Ahhh this is great !
Yup, but apparently he didn't :lol:
by Paul
Mon May 15, 2023 12:19 am
Forum: Coding Questions
Topic: NUMBER EXPECTED INSTAEAD OF A STRING' ERROR WHEN LOADING FUNCTIONS DYNAMICLY
Replies: 10
Views: 399

Re: NUMBER EXPECTED INSTAEAD OF A STRING' ERROR WHEN LOADING FUNCTIONS DYNAMICLY

So, i've been experiencing this compiler error. Whenever i try to call a function that requires a string as input using OpenLibrary and CallFunction, it refuses to compile and throws this error: 'Number Expected Instead Of A String". Here Is An Example with the function MessageBox from user32....
by Paul
Fri May 05, 2023 1:38 pm
Forum: Coding Questions
Topic: I need a special CountString command fast
Replies: 14
Views: 637

Re: I need a special CountString command fast

Faster than regex.... Shouldn't the repeat loop in your procedure look like this? Procedure myCountString( toSearch.s, toFind.s ) Protected p=1, count=0 Repeat p = FindString(toSearch,toFind,p) If p p+1 count+1 EndIf Until p=0 ProcedureReturn count EndProcedure
by Paul
Wed Apr 19, 2023 5:36 pm
Forum: Coding Questions
Topic: Possible to call a procedure by reference/address?
Replies: 15
Views: 693

Re: Possible to call a procedure by reference/address?

From what I see here, your example would not work simply by extracting JSON to a structure because ExtractJSONStructure requires the Structure member names to be identical to the JSON member keys. The structure would need fields like this which of course is not allowed... Structure Example Database ...
by Paul
Sun Apr 16, 2023 3:11 pm
Forum: Announcement
Topic: PureBasic 6.02 LTS is out !
Replies: 89
Views: 17638

Re: PureBasic 6.02 beta 1 is out !

It's probably a leftover of previous install, it should only install in programdata, as program files is usually read only. No, this was first time install on new os. My actual install path was: C:\Compilers\PureBasic602_64 And the example folder shows up in both: C:\Compilers\PureBasic602_64\Examp...
by Paul
Sun Apr 16, 2023 2:51 pm
Forum: Announcement
Topic: PureBasic 6.02 LTS is out !
Replies: 89
Views: 17638

Re: PureBasic 6.02 beta 1 is out !

Is the installer suppose to install the Examples folder twice on Windows?

It seems to be installing the same thing here and here...
C:\Program Files\PureBasic\Examples
C:\ProgramData\PureBasic\Examples
by Paul
Sat Apr 15, 2023 11:08 pm
Forum: Coding Questions
Topic: Get JSON value into a string
Replies: 5
Views: 288

Re: Get JSON value into a string

Or extract into a structure... json$ = ~"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x0000000000000000000000000000000000000000000000000000000000000000\"}" Structure jsondata jsonrpc.s id.i result.s EndStructure hJSON= ParseJSON(#PB_Any,json...
by Paul
Fri Apr 07, 2023 12:40 am
Forum: Coding Questions
Topic: "resolution test"
Replies: 11
Views: 460

Re: "resolution test"

Not sure what the final output is suppose to look like but here is the output from idle's code... 1st image is on 4k monitor (4096x2160), 175% scaling, no dpi aware. 2nd image is 4k monitor (4096x2160), 175% scaling, dpi aware enabled. https://reelmedia.org/test/4knodpi2.jpg https://reelmedia.org/te...
by Paul
Thu Apr 06, 2023 9:15 pm
Forum: Coding Questions
Topic: "resolution test"
Replies: 11
Views: 460

Re: "resolution test"

1st image is on 4k monitor (4096x2160), 175% scaling, no dpi aware.
2nd image is 4k monitor (4096x2160), 175% scaling, dpi aware enabled. (notice this version does not scale to the entire screen)


Image

Image
by Paul
Thu Apr 06, 2023 5:33 am
Forum: Coding Questions
Topic: image popup, catchimage(-1/0 issue
Replies: 11
Views: 419

Re: image popup, catchimage(-1/0 issue

jassing wrote: Thu Apr 06, 2023 4:44 am If I use #PB_ANY, it doesn't work.
Because as Demivec said, you have to use

Code: Select all

img = CatchImage(#PB_Any, ?MenuCopy)
MenuItem(1, "Copy jSysLogClient() call", ImageID(img))
and you used...

Code: Select all

img = CatchImage(#PB_Any, ?MenuCopy)
MenuItem(1, "Copy jSysLogClient() call", img)
by Paul
Tue Apr 04, 2023 2:24 pm
Forum: Coding Questions
Topic: Coding Question - Purevision Text Gadget
Replies: 2
Views: 205

Re: Coding Question - Purevision Text Gadget

The positioning of the text is what is available with PureBasic.
If you are on Windows you can select the API flag which will allow you to center the text vertically...
Image
by Paul
Sat Mar 25, 2023 3:49 pm
Forum: Coding Questions
Topic: Use list instead of array
Replies: 2
Views: 346

Re: Use list instead of array

Like this?? Structure Songs ; store all songs name in an sub directory (Path$) Path$ SongQty.i List SongName$() EndStructure Structure DirInfos ; store the song info in an parent directory TotalSong.i TotalDir.i List DirNo.Songs() EndStructure Global NewList RootDir.DirInfos() AddElement(RootDir()) ...
by Paul
Tue Mar 14, 2023 3:43 pm
Forum: Applications - Feedback and Discussion
Topic: PureVision Form Designer for PureBasic/SpiderBasic
Replies: 16
Views: 3323

Re: PureVision Form Designer for PureBasic/SpiderBasic

If you add a custom gadget to your form it will be exported regardless of the platform you are designing for.
Of course your custom gadget must be made for SpiderBasic if you want it to compile with SpiderBasic.
by Paul
Tue Feb 28, 2023 11:20 pm
Forum: Coding Questions
Topic: GetFunction fails...but just in this code
Replies: 24
Views: 1467

Re: GetFunction fails...but just in this code

Um, just tried your code using 6.01 B4 x64 on Windows 10 Home and it worked fine. Tried both ASM and C backend.
Line 77 does not return 0 (returns 140728349698768 on my system)
by Paul
Wed Feb 15, 2023 9:35 pm
Forum: Coding Questions
Topic: [SOLVED] If not Defined() then Define inside If/CompilerIf. Defined() always returns 0
Replies: 5
Views: 306

Re: If not Defined() then Define inside If/CompilerIf. Defined() always returns 0

Shouldn't it be... Structure MyStruct Param.s EndStructure CompilerIf Defined(MyStruct, #PB_Structure) Debug "1. Constant 'MyStruct' is declared" CompilerEndIf CompilerIf Not Defined(MyStruct, #PB_Structure) Debug "2. Constant 'MyStruct' is not declared" CompilerEndIf ;Structure ...