Search found 943 matches

by firace
Mon Sep 15, 2025 3:14 am
Forum: Coding Questions
Topic: PB 6.10 - quiet sound
Replies: 6
Views: 574

Re: PB 6.10 - quiet sound

According to ChatGPT, this is due to some volume normalisation applied by miniaudio.
As a quick fix, it suggests to try this:

SoundVolume(#PB_All, 2.0)
by firace
Sat Jun 21, 2025 9:30 am
Forum: Coding Questions
Topic: AES-128-CBC - replicate openssl result
Replies: 32
Views: 1946

Re: AES-128-CBC - replicate openssl result

Many thanks everyone for the nice ideas and especially infratec for your great solution!
Thanks to the community there is always something to learn here.
by firace
Fri Jun 13, 2025 9:14 am
Forum: Coding Questions
Topic: AES-128-CBC - replicate openssl result
Replies: 32
Views: 1946

AES-128-CBC - replicate openssl result

I'm trying to obtain the same result as this command:


echo "SUPERBIGSECRET" | openssl enc -aes-128-cbc -base64 -iv 20002000200020002000200020002000 -nosalt

(output should be "VRWqHjP23NtfjqhgWpVsXg==")

Can anyone see what I'm doing wrong? Thanks.




;; just an educational exercise
;; echo ...
by firace
Sat Apr 12, 2025 12:44 pm
Forum: Coding Questions
Topic: Rounded borderless editorgadget in a custom color window
Replies: 4
Views: 214

Re: Rounded borderless editorgadget in a custom color window

breeze4me: very clever, thanks.

first solution works great for me! (the second one has no effect here for some reason, maybe I should update my PB version)
by firace
Sat Apr 12, 2025 11:24 am
Forum: Coding Questions
Topic: Rounded borderless editorgadget in a custom color window
Replies: 4
Views: 214

Re: Rounded borderless editorgadget in a custom color window

Another failed attempt :)


OpenWindow(0, 0, 0, 405, 240, "Round-Borderless!", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ContainerGadget(10, 10, 10, 390, 220) ;; only needed to make custom color window look good ;)

SetWindowColor(0, $565656)
SetGadgetColor(10, #PB_Gadget_BackColor ...
by firace
Sat Apr 12, 2025 11:18 am
Forum: Coding Questions
Topic: Rounded borderless editorgadget in a custom color window
Replies: 4
Views: 214

Rounded borderless editorgadget in a custom color window

Struggling to get this to work... (for Windows)

This is my code right now:


OpenWindow(0, 0, 0, 405, 240, "Rounded corners and Borderless", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ContainerGadget(10, 10, 10, 390, 220) ;; only needed to make custom color window look good ...
by firace
Thu Apr 10, 2025 4:02 pm
Forum: Coding Questions
Topic: EditorGadget scrollbars darkmode issue
Replies: 5
Views: 417

Re: EditorGadget scrollbars darkmode issue

Fred: It's an undocumented API call (I think) and it's not really an easy to use solution :)

wombats: Both approaches are interesting, thanks for sharing.
by firace
Thu Apr 10, 2025 9:56 am
Forum: Coding Questions
Topic: EditorGadget scrollbars darkmode issue
Replies: 5
Views: 417

EditorGadget scrollbars darkmode issue

I have this color issue within editorgadget scrollbars when using dark mode (Windows 11):
Any ideas to make the white part dark?



OpenWindow(0, 30, 30, 500, 400, "Demo1", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget)
SetWindowColor(0, 0)

EditorGadget(1, 120, 60, 300, 100)

SetGadgetText(1 ...
by firace
Thu Apr 10, 2025 8:42 am
Forum: Coding Questions
Topic: SplitterGadget
Replies: 7
Views: 456

Re: SplitterGadget

SetGadgetState


OpenWindow(0, 100, 100, 400, 300, "Splitter Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

StringGadget(1, 0, 0, 0, 0, "Left Panel", #PB_Text_Center)
StringGadget(2, 0, 0, 0, 0, "Right Panel", #PB_Text_Center)

SplitterGadget(3, 10, 10, 380, 180, 1, 2, #PB_Splitter ...
by firace
Wed Apr 09, 2025 12:07 pm
Forum: Tricks 'n' Tips
Topic: Random gadget layout generator
Replies: 3
Views: 1045

Re: Random gadget layout generator

dark mode version (still working on it):

Image
by firace
Wed Apr 09, 2025 12:06 pm
Forum: Tricks 'n' Tips
Topic: Random gadget layout generator
Replies: 3
Views: 1045

Re: Random gadget layout generator

Thanks for the feedback, glad you like it :)
by firace
Tue Apr 08, 2025 8:16 am
Forum: Tricks 'n' Tips
Topic: Random gadget layout generator
Replies: 3
Views: 1045

Random gadget layout generator

Just a quick experiment. Each run will produce a different layout.


; Random Gadget Layout Generator (Grid-Aligned)

#WindowWidth = 880
#WindowHeight = 600
#MaxGadgets = 40
#MinSize = 120
#MaxSize = 450
#MaxTries = 300
#GridSize = 120

Structure GadgetRect
x.i
y.i
w.i
h.i
EndStructure

Global ...
by firace
Sat Apr 05, 2025 8:16 am
Forum: General Discussion
Topic: coordinates of text
Replies: 4
Views: 1614

Re: coordinates of text

Try this out:
(heavily based on old code by Rashad!)




Procedure WndProc(hWnd, uMsg, wParam, lParam)
itemh = SendMessage_(GadgetID(6), #LB_GETITEMHEIGHT, 0, 0)

Select uMsg
Case #WM_CONTEXTMENU
Select wParam
Case GadgetID(6)
GetCursorPos_(p.POINT)
ScreenToClient_ (GadgetID(6), @p ...
by firace
Mon Mar 31, 2025 9:44 pm
Forum: Coding Questions
Topic: Getting character code from emoji
Replies: 3
Views: 224

Re: Getting character code from emoji

Thanks, wasn't aware of this!
by firace
Mon Mar 31, 2025 8:57 pm
Forum: Coding Questions
Topic: Getting character code from emoji
Replies: 3
Views: 224

Re: Getting character code from emoji

Solved! After asking ChatGPT again (and fixing a few things) :)


Define emoji.s = "🐘" ; Elephant emoji
Define highSurrogate, lowSurrogate, unicodeValue

; Extract UTF-16 surrogate pair
highSurrogate = Asc(emoji) ; First character (could be high surrogate)
lowSurrogate = Asc(Mid(emoji, 2, 1 ...