|
Post by Roger Cabo on Jul 26, 2023 20:44:18 GMT 1
Hi, when I output the string: Debug " ' malöäü°" Then the string gets not correctly converted. The result is: "' malöäü°" All the other textboxes and richedit controls work fine.
Further the, Debug windows is limited to 1024 Lines. Is there no way to use a richedit textbox for debug? It's 25 times fast and optimized for large text blocks and can display also colored..
Is there any fix for this possible? Thank you ... I would create my own Dbg if it would possible with a richedit box as a gll. But I have no idea how to get this commands integrated to GB32 directly. Like: Deb.Clear, Deb.ForeColor, Deb.BackColor, in the same way.
|
|
webu
Full Member
Posts: 149
|
Post by webu on Jul 26, 2023 21:24:23 GMT 1
Can you make a screenshot? I don't have this problem.
|
|
|
Post by dragonjim on Jul 26, 2023 22:14:37 GMT 1
You can create your own Debug window and routines if you wish to use a RTF; this would certainly work for Debug and Trace and, using the Tron proc command, you can add more functionality.
At the moment, GB32 is restricted to the TextBox format and, to the best of my knowledge, there are no plans to change it.
|
|
|
Post by Roger Cabo on Jul 26, 2023 23:35:36 GMT 1
Found the bug.. this happen during copy and past out of the Debug window into a windows text editor and save. Wenn loading this text file, the content used ascii for any reason.. _____________________ But I found another issue in regular expression.
I like to delete all comments starting with a "/*" and ending with "*/" and all between.
Dim tn$ = "/*23424*//*24242*//* *//**//**//**//**//**//**//**//**//**/EndFunc/**//**//**//**/" reSub tn$, "\/\*.*?\*\/", "" // Wrong parameter MsgBox tn$
// the result should be "EndFunc" simply. // "\/" = "/" // "\*" = "*" // any Char = ".*" // any Count = "?" //<--- Wrong parameter // "\*" = "*" // "\/" = "/"
// reSub tn$, "\/\*.*\*\/", "" But this deletes the complete string // This works perfectly.
Dim re As Object Set re = CreateObject("VBScript.RegExp")
re.Global = True re.Pattern = "\/\*.*?\*\/"
tn$ = "/*23424*//*24242*//* *//**//**//**//**//**//**//**//**//**/EndFunc/**//**//**//**/" tn$ = re.Replace(tn$, "") MsgBox tn$
Could be possible GB32 works a bit different.. but I didn't got it to work. Anyway I think fixing this is a nightmare in GB32.
But I will use CreateObject("VBScript.RegExp") tn$ = "FunctionVar/*A+B(FunctionVarExtention(PI)){ELEMENT+adr%.Long}*/c____(a___, /*____s___*/____x____/*____+___)(*/)" Works extremely well
|
|
|
Post by Roger Cabo on Jul 27, 2023 20:55:33 GMT 1
Is there a GFA_ command that does a Test-Compile like SHIFT F5, without executing or compiling to an exe?
|
|
|
Post by (X) on Jul 27, 2023 21:24:12 GMT 1
Is there a GFA_ command that does a Test-Compile like SHIFT F5, without executing or compiling to an exe? From a GLL, you should be able to mimic the 'Shift-F5' key press using: SendKeys "{shift({f5})}"
or: SendKeys "{shift}{f5}{shift}"
Sub Gfa_App_S // Syntax check equivalent to Shift-F5 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Shift + F5 Compile only (Test). This performs a full compile to test whether ' all loops, subroutines, and conditional statements of the program are complete. ' It also collects all variables and checks their correct use. ' Debug "Syntax check equivalent to Shift-F5" 'SendKeys "{shift({f5})}" SendKeys "{shift}{f5}{shift}" EndSub
Though I see the debug feedback, I don't think this implements "Shift + F5" for some reason.
|
|
|
Post by (X) on Jul 28, 2023 14:15:12 GMT 1
As the saying goes:"There is more than one way to skin a cat."
This does work to execute a Syntax Check from a GLL file: SendKeys "{alt(ps)}"
It emulates holding the 'alt' key while pressing 'p' and 's' in succession, which is a way to execute the menu Project-> Syntax Check with an assigned hot-key combination of: Shift-F5.
This shows how many combinations I tried...
'################################################################################# ' ' DISCLAIMER: THIS CODE IS OFFERED AS IS FOR EDUCATIONAL PURPOSES. ' YOU ARE FREE TO USE, COPY AND DISTRIBUTE. ' THE USE OF THIS CODE IS AT YOUR OWN RISK. ' I ACCEPT NO LIABILITY NOR MAKE ANY CLAIM OF ' CORRECTNESS OR SUITABILITY IN PART OR IN WHOLE. ' '################################################################################# ' ' FILENAME GFA_APP_S__Syntax_Check.G32 ' ' DESCRIPTION Try to automate Syntax Check. ' ' AUTHOR (X) ' EMAIL xman.gb32@gmail.com ' WEBSITE https://gb32.proboards.com/ ' STARTED 2023-07-28 ' UPDATED <ISO date> ' '
Sub Gfa_App_S // Syntax check equivalent to Shift-F5 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Shift + F5 Compile only (Test). This performs a full compile to test whether ' all loops, subroutines, and conditional statements of the program are complete. ' It also collects all variables and checks their correct use. ' 'SendKeys "{shift(f5)}" // No effect 'SendKeys "{shift{f5}}" // SendKeys string error 'SendKeys "{shift}{f5}{shift}" 'SendKeys "{shift}{f5}{shift}", True // No effect °Gfa_CtrlN // Insert a new line above current °' SendKeys "' Syntax check Shift-F5...", True °DoEvents // (Needed to show the change) °Pause 30 'SendKeys "{shift}{f5}{shift}", True // Inserted $Exp statements??? 'SendKeys "{shift}{(f5)}{shift}", True // 'SendKeys "{shift{f5}}", True // SendKeys string error 'SendKeys "+{F5}", True // Access violation exception 'SendKeys "{shift}{F5}{shift}", True // Access violation exception 'SendKeys "{shift}({F5}){shift}", True // Access violation exception 'SendKeys "{shift({F5})}", True // Access violation exception 'SendKeys "{lshift({f5})}" // no effect SendKeys "{alt(ps)}" °DoEvents // (Needed to show the change) °Pause 30 'Debug "Syntax check equivalent to Shift-F5" EndSub It can be pared down to:
Sub Gfa_App_S // Syntax check equivalent to Shift-F5 SendKeys "{alt(ps)}" EndSub For some unknown reason, I was never able to emulate the Syntax Check using: 'Shift + F5'.
|
|
|
Post by Roger Cabo on Jul 29, 2023 0:19:39 GMT 1
Well done.. Great!
|
|