Search found 411 matches

by Sicro
Mon Aug 16, 2021 6:30 pm
Forum: Announcement
Topic: PureBasic 6.00 Alpha 4 released !
Replies: 196
Views: 42166

Re: PureBasic 6.00 Alpha 3 released !

@pdwyer It is mentioned in the PB help under General Syntax Rules : Others [...] - Return values of commands are always Integer if no other type is specified in the Syntax line of the command description. But I agree with you that the return type should rather be mentioned in the function descripti...
by Sicro
Sun Aug 01, 2021 6:50 am
Forum: Coding Questions
Topic: Virtual Keyboard
Replies: 8
Views: 1728

Re: Virtual Keyboard

Glad to hear it. Then I know why it didn't work with the other module and can fix it.
by Sicro
Fri Jul 30, 2021 1:41 pm
Forum: Coding Questions
Topic: Virtual Keyboard
Replies: 8
Views: 1728

Re: Virtual Keyboard

Try this code: IncludeFile "Path to PB-CodeArchiv-Rebirth/Keyboard_Mouse/SendKeys[Win].pbi" OpenWindow(0, 0, 0, 300,200, "Virtual Keyboard") ButtonGadget(10, 15, 55, 50, 30,"Test") SetWindowLong_(WindowID(0), #GWL_EXSTYLE, GetWindowLong_(WindowID(0), #GWL_EXSTYLE) | #WS...
by Sicro
Thu Jun 03, 2021 10:13 pm
Forum: Off Topic
Topic: UserScript • PB-SyntaxHighlighting for codes in the forum
Replies: 61
Views: 32173

Re: UserScript • PB-SyntaxHighlighting for codes in the forum

@ChrisR: In my case, that helps:

Code: Select all

// ==UserScript==
// @run-at document-idle
See: https://violentmonkey.github.io/api/metadata-block/#run-at
by Sicro
Mon May 10, 2021 12:38 pm
Forum: Coding Questions
Topic: Virtual Keyboard
Replies: 8
Views: 1728

Re: Virtual Keyboard

But I think that I can't solve the problem with that software. The clicked key must go to the application that has the focus at the moment of the click. The trick now is to create a virtual keyboard window that doesn't steal focus from other windows. Here is a code that creates a virtual keyboard w...
by Sicro
Sun May 09, 2021 6:59 pm
Forum: Coding Questions
Topic: Virtual Keyboard
Replies: 8
Views: 1728

Re: Virtual Keyboard

Have a look at my post signature:
PB-CodeArchiv-Rebirth/Keyboard_Mouse/SimulateKeyboardMouseInputs.pbi
by Sicro
Sun May 09, 2021 12:17 pm
Forum: Coding Questions
Topic: #constant=?label results in A constant can't be composed by a variable or a function error
Replies: 9
Views: 680

Re: #constant=?label results in A constant can't be composed by a variable or a function error

you cannot know the ram location of the label. Do not worry about this, even after a long time : your label address will never change, because it is an virtual address. Debug ?text DataSection text: Data$ "Text example" EndDataSection Output on my Linux: 4483176 Output on my virtualized W...
by Sicro
Sun May 09, 2021 11:02 am
Forum: Off Topic
Topic: UserScript • PB-SyntaxHighlighting for codes in the forum
Replies: 61
Views: 32173

Re: UserScript • PB-SyntaxHighlighting for codes in the forum

CustomKeyword should be empty and not contain any native keywords, otherwise some native keywords will be recognized as custom keywords: // (Cmnt)|( Constant )|( String )|( CustomKeyword )|( Keyword )|( Structure )|( Function )|( ASM )|( Pointer )|( Number )|( Module )|( Label )|( Operator )|( Sepa...
by Sicro
Sat May 01, 2021 12:41 pm
Forum: Feature Requests and Wishlists
Topic: Wish to the list: PBEditor Character table also in unicode
Replies: 6
Views: 1237

Re: Wish to the list: PBEditor Character table also in unicode

@Sicro: PureBasic says it uses UCS-2 internally but I think that is a bit fiddly. I think the truth is that all of its string functions like Mid() , LSet() and so on simply operate on codepoints as if they were all two bytes long. Many functions that utilize strings actually make use of UTF-16. UTF...
by Sicro
Sat May 01, 2021 11:10 am
Forum: Feature Requests and Wishlists
Topic: Allow underscore as separator for number literals
Replies: 36
Views: 5859

Re: Allow underscore as separator for number literals

Say they copied this (cut-down) StackOverflow code; are they really going to sit there and insert underscores in every blue number because they prefer underscores? Yes, the adopted code snippet is mostly edited anyway, because of different code style, adding comments etc. In addition, it's a task y...
by Sicro
Mon Apr 26, 2021 5:57 pm
Forum: Coding Questions
Topic: Run throug a list of strings by memory address only
Replies: 10
Views: 861

Re: Run throug a list of strings by memory address only

Can I run throug a list of strings if I know the memory address only? Structure test int1.i int2.i int3.i int4.i int5.i List text.s() int6.i int7.i int8.i EndStructure Define test.test AddElement(test\text()) test\text() = "str1" AddElement(test\text()) test\text() = "str2" AddE...
by Sicro
Sun Apr 25, 2021 5:59 pm
Forum: Feature Requests and Wishlists
Topic: Wish to the list: PBEditor Character table also in unicode
Replies: 6
Views: 1237

Re: Wish to the list: PBEditor Character table also in unicode

PureBasic uses UCS-2 (2 bytes per character) and is therefore limited to the character codes from 0 to 65,535 ( see PB help ). But even with this limitation the filling of the list takes some seconds (I tested it with the source code of the PureBasic IDE). Maybe it would be better if not all charact...
by Sicro
Mon Apr 19, 2021 5:20 pm
Forum: Feature Requests and Wishlists
Topic: is it possible to Speed up stringfield()?
Replies: 8
Views: 1123

Re: is it possible to Speed up stringfield()?

deathmx wrote: Mon Apr 19, 2021 3:26 pm Hopefully, I am not requesting something most people care little about lol.
No, look here: String length should be stored for string variables
by Sicro
Sun Apr 18, 2021 10:54 am
Forum: Off Topic
Topic: UserScript • PB-SyntaxHighlighting for codes in the forum
Replies: 61
Views: 32173

Re: UserScript • PB-SyntaxHighlighting for codes in the forum

Here you can change the font family: Yes, I am aware of that. It's more complicated than that. :wink: I used your code which reads the settings from the purebasic.prefs file and generates appropriate script settings. PBSH_Highlight['EditorFontName'] = 'Source Code Pro'; PBSH_Highlight['EditorFontSi...
by Sicro
Sat Apr 17, 2021 9:33 am
Forum: Off Topic
Topic: UserScript • PB-SyntaxHighlighting for codes in the forum
Replies: 61
Views: 32173

Re: UserScript • PB-SyntaxHighlighting for codes in the forum

Thank you @STARGÅTE for the new version. I use Violentmonkey and there I had to additionally specify the namespace so that your script is accepted by this tool, for example: // ==UserScript== // @namespace STARGÅTE // @name Pure Basic Syntax Highlighting What I still miss is that no monospace font i...