Page 2 of 2
Re: First custom event
Posted: Tue Mar 10, 2026 9:58 pm
by Drone
Piero wrote: Tue Mar 10, 2026 1:05 am
coco2 wrote: Mon Mar 09, 2026 8:03 pm I'm trying to read the PureBasic help and I couldn't figure out what it meant
…but never forget the
PDF help…
How to Install the PureBasic Search Bookmarklet
Create a new Bookmark in your browser’s Bookmarks Bar
Right-click it on Bookmarks Bar and edit the details:
Name: Search PB
URL/Location: Copy and paste the code below entirely:
Code: Select all
javascript:(function(){
var selected = document.getSelection().toString().trim();
if (selected === "") {
selected = prompt("No text selected.\nWhat would you like to search for on PureBasic sites?", "");
}
if (selected !== null && selected !== "") {
window.open('https://www.google.com/search?q=site:purebasic.fr OR site:purebasic.com/documentation ' + encodeURIComponent(selected));
}
})();
How to Use It
Highlight (select) any command or keyword(s) (like
PB_Event_FirstCustomValue or
thread mk-soft) on any webpage.
Click the
Search PB bookmark in your toolbar; a new tab will open with Google results restricted to the PureBasic forums and official documentation.
Note: If you don’t highlight anything, a pop-up box will appear asking you to type your search term(s) manually.
Thank you. Works great.
Re: First custom event
Posted: Tue Mar 10, 2026 10:06 pm
by coco2
Which browser did it work for you? In Firefox it just tries to search for the code.
Re: First custom event
Posted: Tue Mar 10, 2026 10:32 pm
by Drone
coco2 wrote: Tue Mar 10, 2026 10:06 pm
Which browser did it work for you? In Firefox it just tries to search for the code.
Hi
I use Firefox.
I did exactly as told :
1) How to Install the PureBasic Search Bookmarklet
2) How to Use It
and got a new tab that open with Google results
restricted to the PureBasic forums and official documentation.
Did you paste all of the javascript correctly ? ...and in the right place : URL/Location ?
Re: First custom event
Posted: Tue Mar 10, 2026 10:45 pm
by coco2
That's weird, it worked the second time I tried it
Re: First custom event
Posted: Wed Mar 11, 2026 5:18 pm
by Olli
About javaScript, you have a totally free, complete and pedagogic school
here.
However, you are discussing out of topic, out of language also. If it is a game to waste the time of others, think the life stops the game to you, without forcoming. Think also there will be other persons will read this subject from the title.
@coco2
Did you read the source code described two times, and using custom event in the simplest way, for only one event ?
Did you see the two couple of functions for that ?
manual set / manual get
PostEvent() -->
EventType()
automatical set on / automatical set off
BindEvent() -->
UnbindEvent()