Search found 2401 matches

by ricardo
Wed Feb 28, 2024 7:17 pm
Forum: Coding Questions
Topic: Control WebViewGadget with javascript?
Replies: 0
Views: 296

Control WebViewGadget with javascript?

Hi,

I just read that there is a new webgadget, great!!

The WeGadget is the same? Or whats the difference with WebViewGadget?

Its possible to send/receive javascript like it was on the old webgadget?
by ricardo
Mon Jan 01, 2024 7:29 am
Forum: Tricks 'n' Tips
Topic: Using Gemini Pro AI with PB (free)
Replies: 2
Views: 589

Re: Using Gemini Pro AI with PB (free)

Updated: You can add temperature, MaxOutputTokens, etc. Procedure.s SendPrompt(sPrompt.s) sUrl.s = "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY" NewMap Header$() Header$("content-type") = "application/json" sBody.s...
by ricardo
Sat Dec 30, 2023 9:10 pm
Forum: Tricks 'n' Tips
Topic: Using Gemini Pro AI with PB (free)
Replies: 2
Views: 589

Using Gemini Pro AI with PB (free)

Hi, I shared in the past something very similar using openai, the difference is that its possible to use Gemini Pro for free (max 60 time per minute i think, but that is good enough= and its very easy to get the api key. Just go to https://makersuite.google.com/app/apikey and easily create you free ...
by ricardo
Sat Nov 25, 2023 3:05 am
Forum: Coding Questions
Topic: Calling a PB procedure from JavaScript?
Replies: 25
Views: 8731

Re: Calling a PB procedure from JavaScript?

I alteady find how to do it.
by ricardo
Sat Nov 18, 2023 3:34 pm
Forum: Tricks 'n' Tips
Topic: WYSIWYG HTML editor (Windows)
Replies: 14
Views: 2079

Re: WYSIWYG HTML editor (Windows)

Hi, Very nice !! One question, can you add that we can trigger some purebasic from some event (click a button oper example)? Thanks ricardo. Can you clarify what you mean? It's possible to trigger PB code from HTML using the CreateExternalDispatch / ScriptRaiseEventCallback method, but I think you ...
by ricardo
Fri Nov 17, 2023 5:26 am
Forum: Coding Questions
Topic: Calling a PB procedure from JavaScript?
Replies: 25
Views: 8731

Re: Calling a PB procedure from JavaScript?

Hi,

I tried to run this on PB 5.7x and 6.x and its does not compile, shows some error.

Does anybody has some code that can call raise events that compiles using 5.7x?

Thanks in advance
by ricardo
Fri Nov 17, 2023 3:42 am
Forum: Tricks 'n' Tips
Topic: WYSIWYG HTML editor (Windows)
Replies: 14
Views: 2079

Re: WYSIWYG HTML editor (Windows)

Hi,

Very nice !!

One question, can you add that we can trigger some purebasic from some event (click a button oper example)?
by ricardo
Wed Nov 15, 2023 4:51 pm
Forum: Tricks 'n' Tips
Topic: Openai (ChatGPT) from PB
Replies: 20
Views: 2388

Re: Openai (ChatGPT) from PB

Here is the code for generate images. Procedure.s SendPrompt(sPrompt.s) sUrl.s = "https://api.openai.com/v1/images/generations" NewMap Header$() Header$("content-type") = "application/json" Header$("Authorization") = "Bearer YOURAPIKEY " nMaxTokens.l...
by ricardo
Wed Nov 15, 2023 4:07 pm
Forum: Tricks 'n' Tips
Topic: Openai (ChatGPT) from PB
Replies: 20
Views: 2388

Re: Openai (ChatGPT) from PB

Hi, I tried it... How long does it take to get an answer ? It very very slow... more than 10 minutes !! Can we get the answer letter by letter like in chatgpt instead of the whole long one ? } Now you can connect using sModel.s = "gpt-3.5-turbo-1106" That is fast. You receive a JSON with ...
by ricardo
Wed Nov 15, 2023 7:45 am
Forum: Coding Questions
Topic: ScrollAreaGadget Repaint ImageGadget?
Replies: 11
Views: 1067

Re: ScrollAreaGadget Repaint ImageGadget?

Well, since in France they started playing soccer very few years ago, maybe weeks ha ha or at least, they were not known, maybe they have a distorted opinion. The opinion that anyone who watches the World Cup coldly should remember goalkeeper Martínez as a great goalkeeper. His achievements in stopp...
by ricardo
Tue Nov 14, 2023 9:08 pm
Forum: Coding Questions
Topic: ScrollAreaGadget Repaint ImageGadget?
Replies: 11
Views: 1067

Re: ScrollAreaGadget Repaint ImageGadget?

If a create dinamically images on ther scroll area, flickering comes back :(
by ricardo
Tue Nov 14, 2023 8:54 pm
Forum: Coding Questions
Topic: ScrollAreaGadget Repaint ImageGadget?
Replies: 11
Views: 1067

Re: ScrollAreaGadget Repaint ImageGadget?

SendMessage_(GadgetID(#ScrollArea), #WM_SETREDRAW, #True, 0) RedrawWindow_(GadgetID(#ScrollArea), #Null, #Null, #RDW_INVALIDATE | #RDW_ERASE | #RDW_ALLCHILDREN | #RDW_UPDATENOW) Great man !! This works for the flicker as far as i tried. Thanks so much. --------------------- About you other comments...
by ricardo
Tue Nov 14, 2023 6:15 pm
Forum: Coding Questions
Topic: ScrollAreaGadget Repaint ImageGadget?
Replies: 11
Views: 1067

Re: ScrollAreaGadget Repaint ImageGadget?

Im not sure about this ! SetWindowLongPtr_(GadgetID(#ScrollArea), #GWL_STYLE, GetWindowLongPtr_(GadgetID(#ScrollArea), #GWL_STYLE) | #WS_CLIPCHILDREN) I tried to run it inad get a prompt about ilegal assembler error. Then is used SetWindowLongPtr_(GadgetID(#ScrollArea), #GWL_STYLE, GetWindowLongPtr_...
by ricardo
Tue Nov 14, 2023 5:11 pm
Forum: Coding Questions
Topic: ScrollAreaGadget Repaint ImageGadget?
Replies: 11
Views: 1067

Re: ScrollAreaGadget Repaint ImageGadget?

Okay, I'm not going to lose 2 times, but without Messi's gold magic feet, it's going to be very hard for you in 2026, so enjoy it now :wink: A big respect to him, he deserved to have a World Cup on his palmares. For your trouble, it's difficult without a source to know what might be suitable. If yo...
by ricardo
Tue Nov 14, 2023 1:43 am
Forum: Coding Questions
Topic: ScrollAreaGadget Repaint ImageGadget?
Replies: 11
Views: 1067

Re: ScrollAreaGadget Repaint ImageGadget?

ChrisR wrote: Tue Nov 14, 2023 12:39 am
ricardo wrote: Tue Nov 14, 2023 12:19 am ARGENTINA WORLD CHAMPION
I won't answer because Leo Messi and his gang beat France in final, Na :lol:
Then you will loose again with Argentina !! :)