Author Topic: QE_with_colours' evolution  (Read 860 times)

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
QE_with_colours' evolution
« on: February 19, 2020, 03:51:37 AM »
Hi all!

Following JJ's 2012 ideas it's possible to improve amateurs experience with QE using just a little of colors. Very rustic but I think useful.

..., but OP wants something completely different: automatic syntax highlighting à la Iczelion.

I can't wait to see what OP can do  :biggrin:


In order to achieve that, you need the QE plugin interface, i.e. write a DLL that does the highlighting using the hRichEdit in-process. Quite a different story.

I know, it's a challenge  :wink2:. But RadAsm and many others make that very well (I think).

- here most recent version:
« Last Edit: March 20, 2020, 09:17:12 AM by HSE »

jj2007

  • Member
  • *****
  • Posts: 10258
  • Assembler is fun ;-)
    • MasmBasic
Re: QE_with_colours' evolution
« Reply #1 on: February 19, 2020, 06:43:48 AM »
I've extracted it to \Masm32\plugins\stream1.dll - how do you activate it?

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #2 on: February 19, 2020, 07:38:05 AM »
Edit menus.ini in masm32 directory and were you want write:
Code: [Select]
stream1, {e}\plugins\stream1.dll
or create a new category:
Code: [Select]
[MyCategory]
fantasyname, {e}\plugins\stream1.dll

Open a new instance of QE and open an assembly file (.asm or .inc), after that in the menu you execute the plugin.

jj2007

  • Member
  • *****
  • Posts: 10258
  • Assembler is fun ;-)
    • MasmBasic
Re: QE_with_colours' evolution
« Reply #3 on: February 19, 2020, 08:44:18 AM »
Works like a charm :thumbsup:

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #4 on: February 19, 2020, 09:00:26 AM »
Thanks JJ for testing  :thumbsup:

Ravi Kiran

  • Regular Member
  • *
  • Posts: 15
  • Computers are fun
Re: QE_with_colours' evolution
« Reply #5 on: February 19, 2020, 03:44:44 PM »
Works like a charm :thumbsup:
it's working sir.

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #6 on: February 20, 2020, 12:22:37 AM »
it's working sir.

That it's the previous version. Version here also process strings, just because strings can contain semicolons.

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #7 on: February 20, 2020, 09:48:40 AM »
Corrected remotion of spaces after quotation, and now brackets, etc (easy to modify if you don't like that). Files updated in first post.

daydreamer

  • Member
  • *****
  • Posts: 1215
  • I also want a stargate
Re: QE_with_colours' evolution
« Reply #8 on: February 20, 2020, 02:54:00 PM »
great  :thumbsup:
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D
I love assembly,because its legal to write
princess:lea eax,luke
:)

jj2007

  • Member
  • *****
  • Posts: 10258
  • Assembler is fun ;-)
    • MasmBasic
Re: QE_with_colours' evolution
« Reply #9 on: February 20, 2020, 07:55:19 PM »
It works fine :thumbsup:

Now your next step will be to harmonise it with [Colours] in OllyDbg.ini :badgrin:

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #10 on: February 21, 2020, 06:07:21 AM »
Thanks  :thumbsup:

Now your next step will be to harmonise it with [Colours] in OllyDbg.ini :badgrin:

qEditor don't need a plugin to do that  :biggrin:

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #11 on: March 03, 2020, 04:34:23 AM »
Hi!!

Here I added the Iczelion procedure.

..., but OP wants something completely different: automatic syntax highlighting à la Iczelion.

That work perfectly until you close the MessageBox.

I'm still not very succefull taking Richedit's Font and creating the GDI font :biggrin:
But work for me because plugin is builded with my qEditor's settings: fixedsys, height =12, weight= 500.

Location of wordfile.txt must be qEditor's location.




jj2007

  • Member
  • *****
  • Posts: 10258
  • Assembler is fun ;-)
    • MasmBasic
Re: QE_with_colours' evolution
« Reply #12 on: March 03, 2020, 10:47:41 AM »
Works fine with a 640k source :thumbsup:

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #13 on: March 04, 2020, 04:47:44 AM »
Thanks JJ!

The theoretical size of the file is around 800 Kb (asuming RTF = plain text * 3). But can be increased changing memory allocated:
Code: [Select]
  invoke SysAllocStringByteLen, NULL, 2500000 <-- memory for plain text file
  mov hReo$, eax

  invoke SysAllocStringByteLen, NULL, 2500000 <-- memory for RTF
  mov hRes$, eax

There are some glitchs perhaps because RTF is not well formed, but most likely because QE is optimized for plain text  :biggrin:

That make interesting to use only Iczelion procedure, wich surprisingly work fine just subclassing Richedit.

Of course look better RTF  :biggrin: and not interfere with most QE functions. Perhaps both plugins could be of interest.

HSE

  • Member
  • *****
  • Posts: 1304
  • <AMD>< 7-32>
Re: QE_with_colours' evolution
« Reply #14 on: March 18, 2020, 01:59:05 AM »
There was some problem forming RTF, solved now.

The process can detect "comment" now. It's maked in a very nice spaghetti style  :biggrin:, still not using  Hutch's Finite State Machines.

Updated in first post.