Oxygen Basic

Programming => Example Code => User Interface => Topic started by: Aurel on June 11, 2012, 11:09:44 AM

Title: Sci Test
Post by: Aurel on June 11, 2012, 11:09:44 AM
F
Title: Re: Sci Test
Post by: kryton9 on June 11, 2012, 11:52:06 AM
Looks nice Aurel, but I get an error with the awin.h that I have.
Title: Re: Sci Test
Post by: kryton9 on June 11, 2012, 01:53:33 PM
Ok it compiled and ran this time Aurel. Here is what I see.
Title: Re: Sci Test
Post by: kryton9 on June 11, 2012, 09:51:16 PM
Yes it resizes just fine Aurel. Very smoothly.  Except it doesn't load anything into the scintilla box. I just get one ' 
I click the second icon and browse and load your code for this program.
Title: Re: Sci Test
Post by: kryton9 on June 12, 2012, 04:30:51 PM
I got the light blue color background Aurel, but when I load a file, it doesn't show up as it does in your screenshot.
Title: Re: Sci Test
Post by: kryton9 on June 12, 2012, 10:09:17 PM
I have a perfect match. I am running windows 7 64bit, perhaps that is it or the language difference. Remember, I always had garbage at the end of my OxyEdit files when I opened them. I don't other than that what could be. It will just show 1 character if that when I load a file.
Title: Re: Sci Test
Post by: kryton9 on June 13, 2012, 07:24:11 AM
Don't worry about it Aurel. The new icons look really nice. I have line numbers now in the edit window, but again the file doesn't load. As long as it works for you now in development that is what matters.
Title: Re: Sci Test
Post by: Charles Pegge on June 13, 2012, 12:24:21 PM
Hi Aurel,

The file loads successfully into string tx, but does not seem to load into your Scintilla edit box.

Charles
Title: Re: Sci Test
Post by: Charles Pegge on June 13, 2012, 01:05:51 PM
Good!

That's fixed it :)

Replace WM_SETTEXT

SendMessage hsci,SCI_SETTEXT,0,strptr(tx)
Title: Re: Sci Test
Post by: kryton9 on June 13, 2012, 04:50:06 PM
Working nicely now with those fixes guys :)
Title: Re: Sci Test
Post by: Charles Pegge on June 14, 2012, 12:35:01 PM

Here is a complete Scintilla header. May be useful to you, Aurel.
Title: Re: Sci Test
Post by: Charles Pegge on July 18, 2012, 09:04:56 PM
Thanks Aurel.

If you want to add o2-compiler and DOS-shell functions, these are demonstrated in my minimalist Oxide.o2bas + inc/OxideUtil.inc.

Charles
Title: Re: Sci Test
Post by: Charles Pegge on December 04, 2012, 09:30:36 PM
Hi Aurel,

I checked with the In-progress version of Oxygen (1 December) and the second button works fine.

See below. Make sure that the new Oxygen.dll is in your Oxygen root directory.

X
Title: Re: Sci Test
Post by: Aurel on January 19, 2013, 11:31:29 AM
From now...if you double-click selected listbox item ,caret jump to target line
Title: Re: Sci Test
Post by: Aurel on February 09, 2013, 03:26:09 PM
In attachment is updated version of AsciEdit.(just replace exe).
And of course editor must be in same folder (root) where is gxo2 compiler.
I also tested new examples from last inProgress version and it looks that work fine  :)
of course still is problem if you dont have oxygen.dll in same folder whre is your opened example.
Compiler will tell you that is missing, so just copy oxygen.dll into that folder
and your example will work out of box... ;)
Title: Re: Sci Test
Post by: Frankolinox on February 14, 2013, 03:08:10 AM
hi aurel, a) do you made any progress on your editor? :-) you've removed your attachement...

best regards, frank
Title: Re: Sci Test
Post by: Frankolinox on February 25, 2013, 01:21:12 AM
finally I have fixed my main problem with saving file of your SciEdit example :-)

Code: [Select]
Function FileDialogSave(Dir As String, filter , Title , long Hwnd, Flags, defext) As String
Dim ofn As OPENFILENAME
Dim filename[255] As zstring
INT retval

ofn.lStructSize = 76
ofn.hwndOwner = hWnd
ofn.hInstance = GetModuleHandle(0)
ofn.lpstrFilter = ?filter
ofn.lpstrCustomFilter= NULL
ofn.nMaxCustFilter = 0
ofn.nFilterIndex = 2
ofn.lpstrFile = @filename 'zstring buffer
ofn.nMaxFile = 255
ofn.lpstrFileTitle = NULL
ofn.nMaxFileTitle = 0
ofn.lpstrInitialDir = ?dir
ofn.lpstrTitle = ?title
'ofn.Flags = OFN_EXPLORER Or OFN_FILEMUSTEXIST Or OFN_HIDEREADONLY
If flags = 0 then ofn.Flags = OFN_EXPLORER Or OFN_FILEMUSTEXIST Or OFN_HIDEREADONLY
If flags = 1 then ofn.Flags = OFN_EXPLORER Or OFN_OVERWRITEPROMPT Or OFN_HIDEREADONLY
ofn.nFileOffset = 0
ofn.nFileExtension = 0
ofn.lpstrDefExt = ?defext
ofn.lCustData = 0
ofn.lpfnHook = 0
ofn.lpTemplateName = NULL

' Execute the dialog box
'retval = GetOpenFileName(ofn)
retval = GetSaveFileName(ofn)
Return filename

End Function

I am using two functions for loading and saving file in oxygen and I can now "execute" the file or if I want only the textfile in sci editor. that was the simplest way for me, as I have had some problems too with the flags. thanks for you good sci editor aurel as a good starting point for more expandings.

I am happy that's working here fine and my editor makes some good progresses too.

best regards, frank
Title: Re: Sci Test
Post by: Peter on May 15, 2013, 11:48:51 AM
Why is your name RUBEN now ?
Title: Re: Sci Test
Post by: Peter on June 25, 2013, 04:05:00 AM
Code: [Select]
PS.Why this forum only allow 20000 characters
It was JRS who has limited this code lines.
He cannot read more than 19999 code lines. Is an old guy, forgive him.   ;D
Title: Re: Sci Test
Post by: kryton9 on July 08, 2013, 11:26:34 AM
Aurel this is what I get. I think the zips are missing files. You will see what is in my folder and what I get when I run in the screenshot.
I had to bring RTL32.inc from another folder to get it to compile.

X
Title: Re: Sci Test
Post by: kryton9 on July 09, 2013, 11:02:02 AM
Very nice Aurel. Thanks for the new zip.
Title: Re: Sci Test
Post by: JRS on September 12, 2013, 11:35:14 AM
Nice!

It has that bed & breakfast kind of feeling rather than staying at the typical Holiday Inn.

 
Title: Re: Sci Test
Post by: Frankolinox on September 14, 2013, 01:06:15 AM
aurel, can you send your last SciEditor? thanks, frank
Title: Re: Sci Test
Post by: Charles Pegge on September 14, 2013, 03:25:45 AM
Aurel's project is in the ProjectsB/Scintilla folder.

You will need to change the filepath spec for gxo2 compiling.
Title: Re: Sci Test
Post by: Aurel on March 25, 2017, 01:10:44 PM
quick rebuild of Ascio2 called Aurel Edit


.
Title: Re: Sci Test
Post by: Aurel on March 25, 2017, 04:45:26 PM
it looks that now Find(Next) work properly  :D

.
Title: Re: Sci Test
Post by: Aurel on March 26, 2017, 10:56:29 AM
i have playing with listbox colors today and i get this ugly  ;D
orange color ...



.
Title: Re: Sci Test
Post by: Aurel on March 26, 2017, 03:00:21 PM
..and more ,some changes and additions
i hope that i will add few themes (colors) in editor
and finish Find/Replace box  ;)


.
Title: Re: Sci Test
Post by: Arnold on March 27, 2017, 12:02:46 AM
Hi Aurel,

you missed to upload some missing additional images. Using the images of \projectsB\Scintilla is not sufficient. No toolbar is displayed. Maybe you can provide the rest of the bmp files too?

Roland
Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 12:10:32 AM
Ahh yes  ...
sorry i will do that right now.
Ok in attachment is zip with all files ,
Find work trough source by clicking button,Replace & ReplaceAll  not work yet but i hope that will.  :D
Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 02:14:02 AM
Small additions:
two theme added in OptionWindow
so ou can now open Option- clicking toolbar button
and then click on theme button:
Clear Sea - soft blue
Soft Desert - like desert sand
updated code in attachment:
any suggestion ??????
Title: Re: Sci Test
Post by: Arnold on March 27, 2017, 02:58:33 AM
Hi Aurel,

I am sorry about this, but when I tried to download your zip file I was blocked and got a warning about a trojan virus: Win32RmnDrp. I am not sure if this is a false positive or if this is something more serious. I never got such warnings until now when I tried to download zip files so I wanted to let you know.

Roland
Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 03:11:52 AM
ahh viruses...
who know what is this ...
i will post newzip and codes
some additions too...
Zip is now without AurelEdit.exe
so you can compile itself, awinh is also there
 :D
Title: Re: Sci Test
Post by: Arnold on March 27, 2017, 03:45:38 AM
I do not understand this. As I got the same warning again I sent your last zip file to Virustotal and there are 49 warnings from 59. This is indeed a lot of warnings and I do not dare to open the file.

Roland

.
Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 04:00:02 AM
This is a crap..
Inside zip is just sources ,manifest and scilexer, toolbar image and AELogo image
so what kind of  virus is there  >:(.
I can check zip with Linux to see if is there any hidden file but i doubt.
I can post each thing separately? is that ok?
Title: Re: Sci Test
Post by: Arnold on March 27, 2017, 06:55:14 AM
Hi Aurel,

I am a little bit helpless. As I was not sure I downloaded the O2HEdit.zip file too and compared in properties the two data of the size with my original file. (53958/57344 bytes). Then I sent the file to Virustotal and got 3 warnings of 59 (BKAV, Invincea and Rising). But these are the scanners which also complain about the O2HEdit.exe file.

Maybe you have downloaded the O2Hedit.zip file too and could compare the sizes? If you send the zip file to Virustotal.com, let it check agein  and get more than the 3 warnings then something in your system would have changed the file. Otherwise I can not understand this strange result for OxygenEditor.zip.

Roland
Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 08:35:16 AM
Hi Arnold
I really dont know what is this all about .
When i tried to open VirusTotal.com my browser complain about that site
because of security reasons( Kmeleon)  :o

anyway you may go to my forum and from topic  AurelEdit  copy/paste code to
your editor then compile.
I think that is the most secure way ..right'

Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 10:46:12 AM
Hi Arnold
do you find sources and compile it on your computer?
Title: Re: Sci Test
Post by: Charles Pegge on March 27, 2017, 02:24:13 PM

Hi Aurel and Roland,

AurelEdit works fine on my Windows 10 system, with o2 #43 (still testing!). It compiles from script when RTL32.inc is commented out.

Windows 10 blocks all binaries of uncertain origin but it can be unblocked from within the properties panel. No alarms from Windows Defender.

But I notice that this awinh.inc is not compatible with the prior version of AsciEdit, included in ProjectsA\Scintilla\.  Is this editor a replacement?
Title: Re: Sci Test
Post by: Aurel on March 27, 2017, 03:12:56 PM
Hi Charles
Quote
Is this editor a replacement?
well ..i can say yes...so you can add it in projects/Scintilla
awinh.inc really need more cleaning             
i already have semi-cleaned version without bind and some old stuf
also i must test all included functions once more   :D
thanks for testing on win10 !
Title: Re: Sci Test
Post by: Arnold on March 28, 2017, 02:18:27 AM
Hi Aurel,

yesterday I was prevented so I could not proceed until this morning.
Hopefully you understand that I want to be helpful.
I used Linux this morning and downloaded your zip files again, extracted them and checked the files with Virustotal. I had to unlock scripting for this site, I think you can do this with the Kmeleon browser too.

Your SciLexer.dll is infected. I noticed that someone else already checked the file about 20 hours ago and I got the same results (52 of 60). Scilexer.dll of OxygenBasic is ok. (0 of 60).

As this trojan virus is dangerous you should check your system. And I mean this honestly: I do not want to harm you.

Roland
Title: Re: Sci Test
Post by: Aurel on March 28, 2017, 06:24:50 AM
Hi Roland
I remove all scilexers from my computer than download fresh from softpedia
so you can try now?

.
Title: Re: Sci Test
Post by: Arnold on March 28, 2017, 06:46:19 AM
Hi Aurel,

this time everything worked fine. Also Scilexer.dll resulted in 0 of 61 at Virustotal.com
Please do not forget to remove the other two zip files.
I noticed that I do not need the .dll file explicitly in the OxygenEditor folder. It seems that Aureledit.o2bas can find the dll directly in OxygenBasic's directory? (in my case it is c:\OxygenBasic)

Roland
Title: Re: Sci Test
Post by: Aurel on March 28, 2017, 10:12:02 AM
Hi Arnold
Quote
Please do not forget to remove the other two zip files.
OK..removed  ;)
So you say that worked fine ..OK!
i hope that function Find work for you?
..also as Option box when you can select color of editor control and left
listbox( function-subroutine box) is that work too?
Title: Re: Sci Test
Post by: Charles Pegge on March 28, 2017, 12:09:36 PM
My system removed the corrupted SciLexer automatically, and I didnt even notice! It wont paste another copy either, so I cannot submit one for VirusTotal, or anywhere else.

It automatically located the clean SciLexer in OxygenBasic's main folder.

Title: Re: Sci Test
Post by: Arnold on March 28, 2017, 12:11:59 PM
Hi Aurel,

I had not yet much time to test AurelEdit. But I now realized that I will need the Scilexer.dll in the OxygenEditor directory if I create an executable. I use the statement: Include "$/inc/RTL32.inc" for this as I use the Oxygenbasic folder for access.

The option for changing theme and colors work quite nice. Find and Replace does not work so good. I have to override Enter word ... , then click into the text of the loaded file then the Find button in the dialog, then the cursor will move to the place of the text. Replace / Replace all does not work at all for me. I would suggest to leave the edit fields blank and add labels in front of them.
Compile and run does also not work for me.
But I must first explore the code of AurelEdit.o2bas and awinh.inc. Maybe I do some things wrong.

Roland
Title: Re: Sci Test
Post by: Arnold on March 28, 2017, 12:56:07 PM
Hi Charles,

as long as I could use MS Security Essentials with my Vista notebook I was able to use the option for notification because I wanted to know if something would be changed. I do not know if this is possible with Defender of Windows 10 as I do not work with the system very much at the moment.
Now that I use Avast (in it's stricted level) I get delays all the time because of checking all kind of files or running new compiled exe files. But in the meantime I am used to this behaviour and my scanner has calmed down a little bit too.

Roland
Title: Re: Sci Test
Post by: Aurel on March 28, 2017, 01:20:46 PM
Arnold
It looks to me that nothing work for you what is little bit strange.
Ok ..the way how Find work is normal way i have see in many other editors and that is OK.
Replace and ReplaceAll are not implemented yet..ok?
toollbar buttons Compile & Run and his functions work for me
IF AurelEdit.exe is in same folder where is gxo2 then compile,and that is why you cannot compile
IF is not there.
Also maybe command argument is wrong ...is "-c"  or " -c" or "-c" what is proper  ???
Of course better option will be to save compiler (gxo2) path in config file ONCE and then
you can place AurelEdit anywhere on your computer.

For AV i use small tool called SpyDefense  from EverestLab.
Title: Re: Sci Test
Post by: Aurel on March 28, 2017, 01:45:55 PM
Ok
compile argument in ShellExecute function is "-c"
another option with path not work and i again don't have answer  ::)
so just replace function doCompile with this code:

Code: [Select]
SUB doCompile
char ln[256]
string fn=""
SendMessage edit1,WM_GETTEXT,256,strptr ln
fn = Trim(ln)
'print "FN:" + sfilename
IF fn = ""
MsgBox "File Not Open!","Error::File"
Return
End If
int sRet
autosave()
'(sys hwnd, string lpOperation, lpFile, lpParameters, lpDirectory, sys nShowCmd) as sys
'ShellExecute(0,"open",cdPath,fName,"" , 5) "-s console "
sRet = ShellExecute 0,"open","gxo2.exe","-c"+ fname,"",5   '...this work ?
'sRet = ShellExecute 0,"open","gxo2.exe","-c" & chr(34) & fName & chr(34),"",5 'this combination not work and i am not sure why?

Arnold i have try your editor but i not try to compile but i will right now :D