Re: Aurel Edit v04

Started by Zlatko Vid, December 07, 2021, 05:11:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zlatko Vid

if someone is interested
here is source code ....
'/////////////////////////////////////////////////////////////////////
' >>> open file dialog and search for gxo2.exe compiler >>>
'/////////////////////////////////////////////////////////////////////
SUB doFindCompiler

string dir="",filter,title
string sep=chr(0)
filter = "All files "+sep+"*.*"+sep+"Oxygen Basic Compiler "+sep+"*.exe"
title="Find compiler gxo2"
compilerName = FileDialog(dir,filter,title,0,0,"exe")
'print "Compiler path..." + crlf + compilerName
'save compiler path to editor config
SendMessage editOpt,WM_SETTEXT, 0, byval strptr(compilerName)
SaveConfig()
END SUB
'/////////////////////////////////////////////////////////////////////
'////  SAVE EDITOR CONFIGURATION - aka save theme
'//////////////////////////////////////////////////////////////////////

SUB SaveConfig

string sConfig , dest, compilerPath
char   cdBuff[256], cdO2Buff[256]
GetCurrentDir 256, strptr cdBuff
'get current dir for gxo2 compiler
GetCurrentDir 256, strptr cdO2Buff
compilerPath = compilerName
'print compilerPath
if cdPath32 <> compilerPath
   MsgBox "Compiler Path Changed! " + crlf + "OK","AurelEdit:Config"
end if


sConfig = "~theme" + "[" + str(theme) + "]" + crlf +
          "~compiler" + "[" + compilerPath  + "]"

   dest = cdBuff + "\AurelEditConf.cfg"
   putfile dest, sConfig
   MsgBox "Theme saved >>>" + crlf + "OK","AurelEdit:Config"
  Return

END SUB

'/////////////////////////////////////////////////////////////////////

SUB LoadConfig

string sConfig , dest,cp,cpname,th
char   cdBuff[256]
GetCurrentDir 256, strptr cdBuff
'print cdBuff   'show current folder
'sConfig = "~theme" + "[" + str(theme) + "]"   ' res ->  ~theme[1]

   dest = cdBuff + "\AurelEditConf.cfg"
'get config file...
sConfig = getfile dest
'get theme text...
th = mid(sConfig,1,9)
print "THEME:" + th

IF sConfig = ""
   MsgBox "Configuration file is EMPTY" + crlf +
          "create new file by opening Option Window!" , "AurelEdit:Config"
   Return
END IF

IF th = "~theme[1]"
theme = 1 : SetTheme1(): ControlFont (LBox, 16,8, 0, "Courier New")
ControlFont( LBox2, 18, 9, 0, "Courier New" )
END IF
   
IF th = "~theme[2]"
    theme = 2 : SetTheme2(): ControlFont (LBox, 16,8, 0, "Courier New")
    ControlFont( LBox2, 18, 9, 0, "Courier New" )
END IF

IF th = "~theme[3]"
     theme = 3 : SetTheme3(): ControlFont( LBox, 16,8, 0, "Courier New")
     ControlFont( LBox2, 18, 9, 0, "Courier New"): UpdateWindow(LBox2)
END IF

IF th = "~theme[4]"
     theme = 4 : SetTheme4(): ControlFont( LBox, 16,8, 0, "Courier New")
     ControlFont( LBox2, 18, 9, 0, "Courier New"): UpdateWindow(LBox2)
END IF

'load compiler path
'cdPath = compilerPath
cp = mid(sConfig,11,10)
'print " show ~COMPILER:" + cp + crlf + mid(sConfig,21,len(sConfig))
cpName = mid(sConfig,21,len(sConfig))
compilerName = mid(cpName, 2 , len(cpName)-2)
'print "CP_NAME:" + compilerName
cdPath32 = compilerName

Zlatko Vid

#1
Yes
after some changes i forget to set directory/folder char buffer to global scope
and now work.

first
run editor
click on Option toolbar button and set Theme
click on [ o2 ] button and in file dialog navigate to folder where you located gxo2.exe
click an icon and open
then confirm message boxes
and your compiler path is set ..i hope properly

turn off or close editor then check is your selected them used !
all best ..i hope that now should work

Zlatko Vid

#2
Ok

This zip file ..unpack , it is without compiler gxo2.exe
and is without AurelEditConf.cfg file

1. Run AEdit04.exe

2. Click toolbar button Options and select theme you wish.

3. Click [ o2 ] button to set compiler path...you will see Open File form
navigate to folder where is gxo2.exe and when you find it click that file then Open

4.Confirm message boxes  and you will see message Theme and Compilerpath saved to new
AurelEditConf.cfg file created in same folder where is AEdit04.exe

that is all...

ps. u can use gxo2.exe from previous zip it is for version 043 of OxygenBasic  but editor
you can use with new versions too, just don't forget to replace older rtl32.inc or rtl64.inc with latest versions

Zlatko Vid

#3
expanded menu
add aedit chm help

Zlatko Vid

#4
In attachment is (i think ...) Aurel Edit
better than ever.

////////////////////////////////////////////////////
///                                                         ///
///  AUREL EDIT v 0.4                            ///
///                                                         ///
///  by Aurel 12.12.2021                       ///
///                                                         ///
////////////////////////////////////////////////////

Compiled with Oxygen Basic version A043.
You can use latest version from github to and test it.
Complete source code included.
This version use awinh037.inc
Scintilla control version v 3.1.0.0
***SOURCE CODE CLOOSED***

Zlatko Vid

sorry Nicola your video not work
i use AllShow player for all video files but this one not work.
My suggestion to you if you wish to make video use some Video capturing program
i use OBS or BandiCam or similar ...
maybe i need to make a video

Zlatko Vid

I know what is not clear to you

you can save program in any folder you want
but you cannot execute it if in this folder is not oxgyen.dll
this is called JIT Just In Time compilation

opposite of that is :
save you program in your favorite folder
add rtl32.inc or rtl64.inc in that folder and compile to standalone exe
so in that folder you don't need to have oxygen.dll

BUT don't forget to add
$ filename "myProgramName.exe"
include "rtl32.inc"

and that is

Zlatko Vid

Still same crap...
gxo2 as himself have only 1/72 on VirusTotal
but compiled program with my awinh037.inc show this

QuoteBkav    malicious       20211231
Cynet   malicious       20220101
Symantec        malicious       20211231
APEX    malicious       20220101
Avira   malicious       20211231
AhnLab-V3       malicious       20220101
VBA32   malicious       20211231
Cylance         malicious       20220101
Rising  malicious       20211231
MaxSecure       malicious       20211231
BitDefenderTheta        malicious       202112

anyone can confirm this ?
i know that is FALSE positives but i don't have a clue why   :-[


Zlatko Vid

I still have problems with that
how properly store line position
i have used ordinary INT array curPos[64]
indexbase 0 so from 0 to 63
same as i uzse for tabs and file names but i constantly get just 1 line

i need to rethink, any ideas maybe?

Zlatko Vid

As i said in post about SED editor i hope that i fix scintilla focus
and first testing work well