Posted: 13th Nov 2023 4:55
quick function to help avoid literal strings in bytecode (which are otherwise human readable; see attached .byc):
+ Code Snippet
Function MakeCHR(ThisString$)
	Result$ = "CHR(" + STR(ASC(LEFT(ThisString$,1))) + ")"
	For x = 2 to LEN(ThisString$)
		Result$ = Result$  + " + CHR(" + STR(ASC(MID(ThisString$,x,1))) + ")"
	Next x
EndFunction Result$

usage:
+ Code Snippet
// show all errors
SetErrorMode(2)

// set window properties
SetWindowTitle( "MakeCHR()" )
SetWindowSize( 640,360, 0 )
SetWindowAllowResize( 1 )

// set display properties
SetVirtualResolution( 640,360 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )

CenterWindow()

do
	ThisString$ = GetClipboardText()
	If GetPointerPressed() and ThisString$ <> ""
		CHRString$ = MakeCHR(ThisString$)
		SetClipboardText(CHRString$)
		SetWindowTitle("MakeCHR():" + CHR(10) + ThisString$)
	EndIf

	Print("Click to Convert to Clipboard:" + CHR(10) + ThisString$)

    Sync()
loop

Function MakeCHR(ThisString$)
	Result$ = "CHR(" + STR(ASC(LEFT(ThisString$,1))) + ")"
	For x = 2 to LEN(ThisString$)
		Result$ = Result$  + " + CHR(" + STR(ASC(MID(ThisString$,x,1))) + ")"
	Next x
EndFunction Result$

Function CenterWindow()
	X = GetMaxDeviceWidth()/2.0 - GetWindowWidth()/2.0
	Y = GetMaxDeviceHeight()/2.0 - GetWindowHeight()/2.0
	SetWindowPosition( X,Y)
EndFunction



credit Blendman; more HERE.
Posted: 16th Nov 2023 13:39
Nevermind, I saw Blendman's other post. His explanation made more sense. This is definitely useful for things like private game keys