Search found 5163 matches

by infratec
Wed Sep 22, 2021 1:43 pm
Forum: Coding Questions
Topic: Get Light Sensor
Replies: 2
Views: 197

Re: Get Light Sensor

Found this:

viewtopic.php?f=13&t=51053

But it is not a working code.
by infratec
Tue Sep 21, 2021 12:09 pm
Forum: Coding Questions
Topic: Problem with WriteCGIString
Replies: 16
Views: 348

Re: Problem with WriteCGIString

Mabe you need to escape the = with %3D

Code: Select all

WriteCGIString(user$+"%3D"+resultat$)
Check the real data with WireShark or tcpdump.
by infratec
Mon Sep 20, 2021 3:05 pm
Forum: Coding Questions
Topic: How can i run another PB application with Pipe ?
Replies: 12
Views: 1453

Re: How can i run another PB application with Pipe ?

Since both programs are from you,
simply use UDP over a local port.
This is much easier to handle.
by infratec
Mon Sep 20, 2021 12:32 pm
Forum: General Discussion
Topic: SQLite Query returned as JSON array
Replies: 7
Views: 571

Re: SQLite Query returned as JSON array

More extended version: ; Quick and dirty but full sample for output SQLite (array) to Json file ; Marc56 - 2021/09/18 ; Extended by infratec 2021/09/20 ; in reply to https://www.purebasic.fr/english/viewtopic.php?f=7&t=77915 EnableExplicit Procedure.s JSONEscape(JSON$) JSON$ = ReplaceString(JSON...
by infratec
Mon Sep 20, 2021 10:29 am
Forum: General Discussion
Topic: SQLite Query returned as JSON array
Replies: 7
Views: 571

Re: SQLite Query returned as JSON array

; Quick and dirty but full sample for output SQLite (array) to Json file ; Marc56 - 2021/09/18 ; Extended by infratec 2021/09/20 ; in reply to https://www.purebasic.fr/english/viewtopic.php?f=7&t=77915 UseSQLiteDatabase() Enumeration #DB #Json EndEnumeration Procedure.s DatabaseQueryJSON(DB.i, ...
by infratec
Sun Sep 19, 2021 6:46 pm
Forum: Coding Questions
Topic: Check sqlite db table columns
Replies: 8
Views: 354

Re: Check sqlite db table columns

This is not a code which I can run.
So I can not do any tests.

Add something arround that the call of this procedure makes sense and I will have a closer look.
by infratec
Sun Sep 19, 2021 3:33 pm
Forum: Coding Questions
Topic: Check sqlite db table columns
Replies: 8
Views: 354

Re: Check sqlite db table columns

As Fangbeast already written:

You need DatabaseQuery() and not DatabaseUpdate() since you use NextDatabaseRow() to receive the results.
And don't forget FinishDatabase() after DatabaseQuery() :wink:
by infratec
Sat Sep 18, 2021 1:11 pm
Forum: Coding Questions
Topic: catch event from WebGadget
Replies: 11
Views: 488

Re: catch event from WebGadget

You can 'store' the images, or embedd them via Base64

https://www.w3docs.com/snippets/html/ho ... -html.html
by infratec
Fri Sep 17, 2021 12:43 pm
Forum: Coding Questions
Topic: [SOLVED] simple multiline with max length text?
Replies: 9
Views: 430

Re: simple multiline with max length text?

I want to have a box and the user write text in it. I want to have miltiline support so the user will be able to see all of the typed text. The text will be limited to a specific amount of chars. This works as expected: OpenWindow(0,200,200,300,200,"test",#PB_Window_SystemMenu) StringGadg...
by infratec
Fri Sep 17, 2021 12:18 pm
Forum: Coding Questions
Topic: 'Round' the corners of an image (draw black elements over it)
Replies: 6
Views: 376

Re: 'Round' the corners of an image (draw black elements over it)

Not the fastest, but the simplest: Procedure.i FilterCallback(x, y, Source, Target) Protected Result.i If Source & $FFFFFF = #Black Result = #Black Else Result = Target EndIf ProcedureReturn Result EndProcedure UseJPEGImageDecoder() Filename$ = OpenFileRequester("Choose an image", &quo...
by infratec
Thu Sep 16, 2021 5:47 pm
Forum: Coding Questions
Topic: Buttons
Replies: 11
Views: 742

Re: Buttons

And at least, a 'mixed' version: #ButtonColor = $E8DBA8 Structure DoctorizedButtonStructure Gadget.i TextUL$ TextUR$ TextLL$ TextLR$ TextC$ FrontColor.i BackColor.i EndStructure Procedure DoctorizedButtonGadgetCallBack() Protected *Parameter.DoctorizedButtonStructure *Parameter = GetGadgetData(Event...
by infratec
Thu Sep 16, 2021 5:00 pm
Forum: Coding Questions
Topic: Buttons
Replies: 11
Views: 742

Re: Buttons

Simpler Variant: #ButtonColor = $E8DBA8 Procedure DoctorizedButtonGadgetCallBack() Select EventType() Case #PB_EventType_MouseEnter SetGadgetAttribute(EventGadget(), #PB_Canvas_Cursor, #PB_Cursor_Hand) Case #PB_EventType_MouseLeave SetGadgetAttribute(EventGadget(), #PB_Canvas_Cursor, #PB_Cursor_Defa...
by infratec
Thu Sep 16, 2021 4:40 pm
Forum: Coding Questions
Topic: Buttons
Replies: 11
Views: 742

Re: Buttons

#ButtonColor = $E8DBA8 Structure DoctorizedButtonStructure Gadget.i TextGadget.i TextGadgetUL.i TextGadgetUR.i TextGadgetLL.i TextGadgetLR.i LeftClick.i EndStructure Procedure DoctorizedButtonGadgetCallBack() Protected *Parameter.DoctorizedButtonStructure *Parameter = GetGadgetData(EventGadget()) I...
by infratec
Thu Sep 16, 2021 12:49 pm
Forum: Coding Questions
Topic: Pressed / grid look
Replies: 9
Views: 673

Re: Pressed / grid look

Can you show a picture of what you want, or a link to a picture?
I'm not sure if I know what you want to achieve.