Search found 1246 matches

by Kiffi
Tue Apr 23, 2024 12:55 pm
Forum: Coding Questions
Topic: Droopy lib and Purebasic 6.11 beta 1
Replies: 3
Views: 86

Re: Droopy lib and Purebasic 6.11 beta 1

I believe that the chances of your question being answered will increase if you write where the droopylib can be found.
by Kiffi
Mon Apr 22, 2024 11:19 pm
Forum: Bugs - Windows
Topic: HTML code streamed into WebGadget cannot run external JavaScript
Replies: 1
Views: 71

Re: HTML code streamed into WebGadget cannot run external JavaScript

I suspect that this does not work for security reasons. If you use a WebView gadget with the #PB_WebView_Debug flag, the console will say "Not allowed to load local resource"
by Kiffi
Mon Apr 22, 2024 7:45 pm
Forum: Tricks 'n' Tips
Topic: Monaco Editor hosted by PureBasic
Replies: 3
Views: 197

Monaco Editor hosted by PureBasic

Here is an example of how to host the powerful Monaco Editor in PureBasic: EnableExplicit Enumeration #Window #btnLoad #btnSave #WebViewGadget EndEnumeration Procedure.s GetMonacoEditor() ProcedureReturn ~"<!doctype html><html lang='en'>\n" + ~"<head>\n" + ~" <meta charset='...
by Kiffi
Sat Apr 20, 2024 1:01 am
Forum: Coding Questions
Topic: Webview and Javascript
Replies: 5
Views: 401

Re: Webview and Javascript

Here is an example that uses the code from the Quick Start Guide : OpenWindow(0, #PB_Ignore, #PB_Ignore, 1000, 800, "Leaflet", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) WebViewGadget(0, 0, 0, 1000, 800, #PB_WebView_Debug) Procedure.s GetHtml() ProcedureReturn ~"<!DOCTYPE html...
by Kiffi
Sun Apr 14, 2024 1:12 am
Forum: Coding Questions
Topic: Can't fetch a specific webpage.
Replies: 12
Views: 563

Re: Can't fetch a specific webpage.

Works here without any problems (Win 10 pro, PB V6.10)
by Kiffi
Sat Apr 13, 2024 2:10 am
Forum: Coding Questions
Topic: adddate() add 1 day, increases month by 3?
Replies: 2
Views: 166

Re: adddate() add 1 day, increases month by 3?

You have swapped the AddDate() parameters
AddDate()-Help wrote:
Syntax: Date = AddDate(Date, Type, Value)
AddDate( test, 1, #PB_Date_Day ) -> AddDate( test, #PB_Date_Day, 1 )
by Kiffi
Sun Apr 07, 2024 1:07 am
Forum: Coding Questions
Topic: What variable type is "?" for CatchImage?
Replies: 7
Views: 343

Re: What variable type is "?" for CatchImage?

CatchImage() wrote:
Note: The "?" is a pointer to a label.
by Kiffi
Tue Apr 02, 2024 4:48 pm
Forum: Coding Questions
Topic: Dual Support PB604 and PB610 Identification
Replies: 14
Views: 839

Re: Dual Support PB604 and PB610 Identification

Michael Vogel wrote: Tue Apr 02, 2024 4:44 pmBrute short version... :lol:

Code: Select all

a=(#PB_Compiler_Processor-1)/2
Debug Mid("ARMX",(~a&2)<<1,3) + Str(32<<Bool(a%3))
:shock:
by Kiffi
Wed Mar 27, 2024 9:01 am
Forum: Coding Questions
Topic: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Replies: 9
Views: 331

Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)

Tranquil wrote: Wed Mar 27, 2024 8:59 amThe code you posted works fine for me in both cases:
-> Connected to VPN: Shows internal IPv4 (Using PulseSecure as VPN Client)
-> not Connected to VPN: Shows IPv4 of my network
same here.

// Edit: Sorry, I missed the Linux part. :oops:
by Kiffi
Mon Mar 25, 2024 10:17 pm
Forum: Coding Questions
Topic: Using JQuery with WebViewExecuteScript possible?
Replies: 3
Views: 212

Re: Using JQuery with WebViewExecuteScript possible?

Now I'm waiting until the DOM content is completely loaded and send a message back to my PB instance. here's an example to wait until jQuery is ready: Enumeration #Window #WebViewGadget EndEnumeration Procedure jQueryIsReady(JsonParameters$) WebViewExecuteScript(#WebViewGadget, "$('#testDiv')....
by Kiffi
Mon Mar 25, 2024 2:51 pm
Forum: Coding Questions
Topic: Using JQuery with WebViewExecuteScript possible?
Replies: 3
Views: 212

Re: Using JQuery with WebViewExecuteScript possible?

Perhaps you have not taken into account that jQuery needs a little time before it is ready for use? Enumeration #Window #WebViewGadget #Button EndEnumeration Procedure ButtonGadgetEvent() WebViewExecuteScript(#WebViewGadget, "$('#testDiv').addClass('blueBackground')") EndProcedure HTML.s =...
by Kiffi
Sat Mar 23, 2024 12:12 am
Forum: Tricks 'n' Tips
Topic: Edge WebGadget - Set BrowserArguments, UserDataFolder (Windows)
Replies: 4
Views: 503

Re: Edge WebGadget - Set BrowserArguments, UserDataFolder (Windows)

breeze4me wrote: Fri Mar 22, 2024 5:10 pmSetting the arguments (optional switches) at a WebGadget launch is simple, as they can be specified via a single environment variable.
Very cool! Thanks! Image
by Kiffi
Tue Mar 19, 2024 11:24 am
Forum: Coding Questions
Topic: i need a simple routine to convert unix-time to date-time
Replies: 3
Views: 180

Re: i need a simple routine to convert unix-time to date-time

Code: Select all

UnixTime = 1394928000

Debug FormatDate("%dd.%mm.%yyyy %hh:%ii", UnixTime)

BTW: It's the 16 march 2014 0 hours and 0 minutes
by Kiffi
Thu Mar 14, 2024 7:18 pm
Forum: Windows
Topic: Refresh/Reload a web page
Replies: 7
Views: 268

Re: Refresh/Reload a web page

IdeasVacuum wrote: Thu Mar 14, 2024 6:43 pmYes, if by new one you mean PB6.04 LTS.
No, I mean the WebGadget that is delivered with version 6.10. If you add the #PB_Web_Edge flag there, WebView2 is used (under Windows). This is pretty much the most modern browser engine you can use.