Oxygen Basic
Programming => Example Code => User Interface => Topic started by: Aurel on June 11, 2012, 11:09:44 AM
-
F
-
Looks nice Aurel, but I get an error with the awin.h that I have.
-
Ok it compiled and ran this time Aurel. Here is what I see.
-
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.
-
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.
-
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.
-
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.
-
Hi Aurel,
The file loads successfully into string tx, but does not seem to load into your Scintilla edit box.
Charles
-
Good!
That's fixed it :)
Replace WM_SETTEXT
SendMessage hsci,SCI_SETTEXT,0,strptr(tx)
-
Working nicely now with those fixes guys :)
-
Here is a complete Scintilla header. May be useful to you, Aurel.
-
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
-
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
-
From now...if you double-click selected listbox item ,caret jump to target line
-
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... ;)
-
hi aurel, a) do you made any progress on your editor? :-) you've removed your attachement...
best regards, frank
-
finally I have fixed my main problem with saving file of your SciEdit example :-)
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
-
Why is your name RUBEN now ?
-
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
-
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
-
Very nice Aurel. Thanks for the new zip.
-
Nice!
It has that bed & breakfast kind of feeling rather than staying at the typical Holiday Inn.
-
aurel, can you send your last SciEditor? thanks, frank
-
Aurel's project is in the ProjectsB/Scintilla folder.
You will need to change the filepath spec for gxo2 compiling.
-
quick rebuild of Ascio2 called Aurel Edit
.
-
it looks that now Find(Next) work properly :D
.
-
i have playing with listbox colors today and i get this ugly ;D
orange color ...
.
-
..and more ,some changes and additions
i hope that i will add few themes (colors) in editor
and finish Find/Replace box ;)
.
-
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
-
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
-
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 ??????
-
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
-
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
-
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
.
-
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?
-
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
-
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'
-
Hi Arnold
do you find sources and compile it on your computer?
-
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?
-
Hi Charles
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 !
-
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
-
Hi Roland
I remove all scilexers from my computer than download fresh from softpedia
so you can try now?
.
-
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
-
Hi Arnold
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?
-
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.
-
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
-
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
-
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.
-
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:
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