Search found 6373 matches

by infratec
Fri Apr 19, 2024 7:22 am
Forum: Tricks 'n' Tips
Topic: libcurl.pbi
Replies: 57
Views: 8698

Re: libcurl.pbi

Updated libcurl dlls to 8.7.1
by infratec
Thu Apr 18, 2024 6:55 pm
Forum: Coding Questions
Topic: Linker error
Replies: 3
Views: 82

Re: Linker error

Comment out stuff in your dll sourcecode.

If you reduced it to a minimum with fault, show us the code.
by infratec
Thu Apr 18, 2024 6:53 pm
Forum: Coding Questions
Topic: ReceiveHTTP doesnt work on Windows 7. Any solution?
Replies: 11
Views: 453

Re: ReceiveHTTP doesnt work on Windows 7. Any solution?

PureBasic is using libcurl :wink:

But if you want to do it yourself, use my libcurl.pbi and test HTTPRequestI()
by infratec
Wed Apr 17, 2024 9:53 am
Forum: Bugs - Linux
Topic: IMA when using NextIPAddress()
Replies: 1
Views: 95

Re: IMA when using NextIPAddress()

Just tested on the development PC: As soon as I used wg-quick up wg I get an IMA After wg-quick down wg It works again. For testing: apt install wireguard wg genkey | tee /etc/wireguard/private.key | wg pubkey > /etc/wireguard/public.key touch /etc/wireguard/wg.conf Insert into wg.conf: [Interface] ...
by infratec
Wed Apr 17, 2024 9:38 am
Forum: Bugs - Linux
Topic: IMA when using NextIPAddress()
Replies: 1
Views: 95

IMA when using NextIPAddress()

Hi, suddenly a program crashes with an IMA. It crashes when I call NextIPAddress() On the development PC it works (Debian 12.5) On the target PC IMA (Debian 12.5) Only difference: on the target PC is an additional wireguard interface. Code to test: EnableExplicit Define IP.i If OpenConsole() PrintN(...
by infratec
Tue Apr 16, 2024 9:57 pm
Forum: Coding Questions
Topic: Compound JSON Extraction
Replies: 1
Views: 122

Re: Compound JSON Extraction

Look at

Code: Select all

ExtractJSONStructure()
https://www.purebasic.com/documentation ... cture.html

But your structure needs to fit the JSON$
by infratec
Mon Apr 15, 2024 7:14 am
Forum: Coding Questions
Topic: ftp, set file permissions
Replies: 4
Views: 227

Re: ftp, set file permissions

You can use my libcurl.pbi and use #CURLOPT_QUOTE with "chmod 644 file"

https://curl.se/libcurl/c/CURLOPT_QUOTE.html
by infratec
Sun Apr 14, 2024 9:58 pm
Forum: Coding Questions
Topic: Troubles with "SendMessage...#EM_LINESCROLL
Replies: 2
Views: 108

Re: Troubles with "SendMessage...#EM_LINESCROLL

I think there are relative values expected and not absolut ones. Debug "NumberVal: " + Str(numberVal) SendMessage_(GadgetID(Editor_Input), #EM_LINESCROLL, 0, numberVal - LastLine) LastLine = numberVal If you use a function, you should know how it works :wink: https://learn.microsoft.com/en...
by infratec
Sat Apr 13, 2024 9:42 pm
Forum: Coding Questions
Topic: Get data from opened website
Replies: 7
Views: 389

Re: Get data from opened website

Or with a regular expression: .*<hello>(.*)<\/.* If CreateRegularExpression(0, ".*<hello>(.*)<\/.*") If ExamineRegularExpression(0, "sjdfhjsf<hello>123</hello>") While NextRegularExpressionMatch(0) Debug RegularExpressionGroup(0, 1) Wend EndIf Else Debug RegularExpressionError() ...
by infratec
Sat Apr 13, 2024 9:34 pm
Forum: Coding Questions
Topic: Get data from opened website
Replies: 7
Views: 389

Re: Get data from opened website

Code: Select all

HTML$ = "sjdfhjsf<hello>123</hello>"
Pos1 = FindString(HTML$, "<hello>")
If Pos1
  Pos1 + 7
  Pos2 = FindString(HTML$, "<" , Pos1)
  If Pos2
    Value$ = Mid(HTML$, Pos1, Pos2 - Pos1)
    Debug Value$
  EndIf
EndIf
by infratec
Sat Apr 13, 2024 12:55 pm
Forum: Bugs - Documentation
Topic: Better example for CatchImage()
Replies: 0
Views: 90

Better example for CatchImage()

To make it directly runable: If OpenWindow(0, 0, 0, 148, 148, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If CatchImage(0, ?Geebee) ImageGadget(0, 10, 10, 0, 0, ImageID(0)) EndIf Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf DataSection GeeBee: Includ...
by infratec
Sat Apr 13, 2024 12:51 pm
Forum: Bugs - Documentation
Topic: Make it easier for users: example in ImageGadget()
Replies: 0
Views: 67

Make it easier for users: example in ImageGadget()

The example in the help for ImgageGadget ist not runable out of the box. That's not nice. This would be better: If OpenWindow(0, 0, 0, 286, 148, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If LoadImage(0, #PB_Compiler_Home + "Examples\Sources\Data\Geebee2.bmp&quo...
by infratec
Sat Apr 13, 2024 12:16 pm
Forum: Coding Questions
Topic: Deletefile() not working?
Replies: 4
Views: 220

Re: Deletefile() not working?

And you need to check the result of

Code: Select all

NextDatabaseRow(#db2)
like

Code: Select all

If NextDatabaseRow(#db2)
Because if your select returns no entry, you get into trouble.