Page 2 of 2
Re: Windows PureBasic IDE with latest additions
Posted: Sat Oct 22, 2022 10:35 am
by HeX0R
I guess I got it, and bad news is, it was indeed my fault...
https://github.com/fantaisie-software/p ... /197/files
ProjectManagement.pb 1748...1753.
Here I change the current FileList() Element, that block has to be surrounded by PushListPosition() and PopListPosition().
To recreate it:
Create a new project, go to Files tab and add a new file, click on "create project" and close the IDE
But the compiled IDE doesn't seem to freak-out, maybe only in Windows 11
=>
https://github.com/fantaisie-software/p ... c/pull/219
Re: Windows PureBasic IDE with latest additions
Posted: Sun Oct 23, 2022 11:28 am
by ChrisR
Thanks HeX0R for the quick Push(Pop)ListPosition(FileList()) fix.
However, with or without the fix, I do not reproduce the crash by following your indications.
Also tested with latest Windows_11_22H2 French_x64v1.iso updated to 22621.674 in a Virtual Machine.
I have updated PureBasic_IDE_Win_x64(x86)_2022-10-23.zip on the 1st post with your fix included.
Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 9:02 am
by HeX0R
Here is a video, that shows the effect and the procedure:
https://hex0rs.coderbu.de/Sonstiges/pb/ ... -58-13.mp4
Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 12:18 pm
by ChrisR
Thanks for the video.
I reproduce it in debug mode and your Push(Pop)ListPosition fixes it. Would be good to have a confirmation from Denis too.
I was surprised not to have the crash with the compiled exe.
Not really related to this correction, to avoid warnings in the log: [WARNING] SourceManagement.pb (Line: 1813) [WARNING] The specified file does not exist.
In SourceManagement.pb at line 1813, it would be nice to add a test on DiskFileSize:
Code: Select all
*ActiveSource\DiskFileSize = FileSize(*ActiveSource\Filename$)
If *ActiveSource\DiskFileSize
*ActiveSource\DiskChecksum = FileFingerprint(*ActiveSource\Filename$, #PB_Cipher_MD5)
EndIf
Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 12:49 pm
by Denis
ChrisR,
give me a link to the ide exe file (x86-64), otherwise I have to find where to go and how to compile, which I am not used to doing (surtout par flemme...)
Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 1:01 pm
by ChrisR
Salut Denis,
The links have been updated on the
1st post with HeX0R fix included.
Thanks for your feedback

Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 3:10 pm
by Denis
It seems to be OK x86/x64
If the bug comes back, I'll let you know.
Thank you HeX0R for your efforts.
Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 6:52 pm
by Caronte3D
Thanks! Now the x86 download nicely (without virus warnings)
Re: Windows PureBasic IDE with latest additions
Posted: Mon Oct 24, 2022 8:23 pm
by ChrisR
So surprising these antivirus
A PushListPosition and PopListPosition and the false alarm is gone.
They must have a Shifumi game algorithm to choose between positive or not. It's crazy how unreliable they are
On VirusTotal, there are 4 false alarms for the x86 version (minor AV) and 0 for the x64 version.
Re: Windows PureBasic IDE with latest additions
Posted: Thu Nov 03, 2022 10:18 am
by dibor
Hi.
Have download latest dev source.
While compiling on x64 Windows 10 machine I got error:
Error: in included file '.................................................\PureBasicIDE\CompilerFlags.pb'
Line 123 - Constant not found: #PB_Processor_Arm64.
What to do?
Thank U
Re: Windows PureBasic IDE with latest additions
Posted: Fri Nov 18, 2022 10:18 pm
by AZJIO
If you make a text replacement in the entire document, and 1000 replacements occur, then the cancellation must be performed 1000 times. If you click "Insert structure" into the code from the library of structures, then the cancellation is also performed one line at a time.
This code does the undo at a time.
Code: Select all
ScintillaSendMessage(SciGadget, SCI_BEGINUNDOACTION)
; multiple commands
ScintillaSendMessage(SciGadget, SCI_ENDUNDOACTION)
Re: Windows PureBasic IDE with latest additions
Posted: Sat Nov 19, 2022 12:16 am
by ChrisR
Hi AZJIO,
I'm not sure this is the best place in this thread for your request. This topic was just here to share the IDE with the latest improvements while waiting for the next PB version.
It would be nice indeed after a Replace All, that undo is done in one go.
It would be better in
Feature Requests and Wishlists
Re: Windows PureBasic IDE with latest additions
Posted: Thu Dec 08, 2022 8:20 am
by AZJIO
I managed to change and compile the IDE.
1. downloaded
here (button "<> Code" -> Download zip)
2. Searched for "*Viewe", found "StructureViewer.pb" - 32 kb. Find the #GADGET_StructureViewer_InsertStruct and #GADGET_StructureViewer_InsertCopy events.
3. Before the block with calls to the InsertCodeString() functions add SendEditorMessage(#SCI_BEGINUNDOACTION, 0, 0), and after the block add SendEditorMessage(#SCI_ENDUNDOACTION, 0, 0)
4. Check that there is no ProcedureReturn in the block between calls.
Compilation
1. In the file \purebasic-devel\PureBasicIDE\MakeWindows.cmd add "pause" to the end of the file to see if there were any errors.
2. Make a copy of the "PureBasic" folder and drag this folder onto the "MakeWindows.cmd" file. The path to the "PureBasic" folder should not contain spaces and, just in case, only Latin letters. The path to the "purebasic-devel" folder is also without spaces.
3. After compilation, PureBasic.exe should change in the folder, the date of this file has changed to the current date. I checked that the insertion of the structure and the cancellation were performed as I wanted - with one click.
Re: Windows PureBasic IDE with latest additions
Posted: Thu Dec 08, 2022 2:04 pm
by AZJIO
Line 194 in FindWindow.pb, replaced FindText(3) with
Code: Select all
SendEditorMessage(#SCI_BEGINUNDOACTION, 0, 0)
FindText(3)
SendEditorMessage(#SCI_ENDUNDOACTION, 0, 0)
Now after "Replace all" the cancellation is done with one click.
Download (x64)
Should I make a separate topic to separate the official release from homemade?
I noticed that the replacement is done by selecting text (line 3897 in ScintillaHighlighting.pb).
Code: Select all
SendEditorMessage(#SCI_SETSEL, Find\chrgText\cpMin, Find\chrgText\cpMax)
SendEditorMessage(#SCI_REPLACESEL, 0, *ReplaceString)
I used this option
Code: Select all
ScintillaSendMessage(#SciGadget, #SCI_SETTARGETRANGE, firstMatchPos + lengthStr, firstMatchPos)
If flag & #SCFIND_REGEXP
length2 = ScintillaSendMessage(#SciGadget, #SCI_REPLACETARGETRE, -1, *Replace)
Else
length2 = ScintillaSendMessage(#SciGadget, #SCI_REPLACETARGET, -1, *Replace)
EndIf
but you need to shift the search range for #SCI_SEARCHINTARGET
Code: Select all
ScintillaSendMessage(#SciGadget, #SCI_SETTARGETSTART, inSrt)
ScintillaSendMessage(#SciGadget, #SCI_SETTARGETEND, inEnd)
and by the way, this does not move the cursor position during text replacement.
Re: Windows PureBasic IDE with latest additions
Posted: Thu Dec 08, 2022 2:49 pm
by ChrisR
AZJIO wrote: Thu Dec 08, 2022 2:04 pm
Line 194 in FindWindow.pb, replaced FindText(3) with
Code: Select all
SendEditorMessage(#SCI_BEGINUNDOACTION, 0, 0)
FindText(3)
SendEditorMessage(#SCI_ENDUNDOACTION, 0, 0)
Now after "Replace all" the cancellation is done with one click.
Should I make a separate topic to separate the official release from homemade?
Good to have the undo/redo done in one Go, after a "Replace All", it works well, thanks

Maybe you can push a
Pull requests
Edit: I've added a Pull Request:
Replace All Undo/Redo #221