Sign in to follow this  
Followers 0

My Notepad

20 posts in this topic

Posted (edited)

My Notepad v0.4 (En, Ru)

 

9dc5b539cf9d.png

Black theme

8eb8b6e4cd74.gif

 

My_Notepad.7z (560kb sources + EXE)

 

I wanted to make an example for the help file. But I could not stop, and made more complicated.

Edited by AZJIO
MikahS likes this

Share this post


Link to post
Share on other sites



Posted (edited)

The menu item 'Cancel' is normally called 'Undo' in the English version of the Edit menu..

Edited by czardas

Share this post


Link to post
Share on other sites

Posted

czardas,

Fixed

 

Updated

Added "drag-and-drop"

Added "modification flag"

Added "GUISetAccelerators"

mesale0077 likes this

Share this post


Link to post
Share on other sites

Posted

I look forward to seeing what you add next. :) I have a similar project. I keep reminding myself I need to finish it.

Share this post


Link to post
Share on other sites

Posted

@AZJIO i found it very good this notepad in Autoit.

Share this post


Link to post
Share on other sites

Posted

Closing the application with an unsaved file will display a message box in Russian.

Share this post


Link to post
Share on other sites

Posted (edited)

Nice script

Is there any reason why you change the keyboard to English (409)? If I comment out lines 298-302, I don't see the script misbehaving and I have my own keyboard layout.

Is there any chance to allow overwrite mode (by toggling the insert key), so that the editor behaves like Scite or Notepad++? (by default this is not possible with GUICtrlCreateEdit)

Edited by GreenCan

Share this post


Link to post
Share on other sites

Posted (edited)

@GreenCan

Is there any reason why you change the keyboard to English (409)? If I comment out lines 298-302, I don't see the script misbehaving and I have my own keyboard layout.

 

By default, when the system boots I have included Russian keyboard layout. This causes a problem hot key assignment. I can assign a keyboard shortcut Ctrl +1, but I can not assign Ctrl + A, because the numbers in any keyboard layout are the numbers. At experiments of @MrCreatoR found out the cause of the problem. Before purpose of hotkeys it is necessary to switch over in English keyboard layout. I improved his idea that restored keyboard layout which has to be when system boots because I expect to start entering text in Russian. Possibly it is a problem only for Russian layout of the keyboard.

Is there any chance to allow overwrite mode (by toggling the insert key), so that the editor behaves like Notepad++? (by default this is not possible with GUICtrlCreateEdit)

I don't understand.

@guinness

Fixed.

There is another problem. When searching for text, you can change the input field and the text in the editor. I must track these changes. This is not done.

Edited by AZJIO

Share this post


Link to post
Share on other sites

Posted

@guinness

Fixed.

Thanks.

Share this post


Link to post
Share on other sites

Posted

Azjio,

By default, when the system boots I have included Russian keyboard layout. This causes a problem hot key assignment. I can assign a keyboard shortcut Ctrl +1, but I can not assign Ctrl + A, because the numbers in any keyboard layout are the numbers. At experiments of @MrCreatoR found out the cause of the problem. Before purpose of hotkeys it is necessary to switch over in English keyboard layout. I improved his idea that restored keyboard layout which has to be when system boots because I expect to start entering text in Russian. Possibly it is a problem only for Russian layout of the keyboard.

I can confirm that all shortcut keys as defined as Acceleration Keys do function on my PC with Belgian keyboard

I would recommend to set _WinAPI_LoadKeyboardLayoutEx as an optional keyboard defined in the ini file.

I found another bug with shortcut F5, F5 erases the complete content of what is currently in the editor, that cannot be wanted, right? I expect the date to be inserted at cursor position.

I don't understand.

Well, very simple, open your My_Notepad and start typing, go back with your cursor to the previous word, type again, you are in insert mode, the cursor is a vertical bar.  Now press the Insert button, your cursor doesn't change and you are still in insert mode.

Now, go to Scite and do the same, when you press the Insert button, the cursor changes to underscore (_) in you can type over (erase) the existing text

GreenCan

Share this post


Link to post
Share on other sites

Posted (edited)

GreenCan

(by default this is not possible with GUICtrlCreateEdit)

You answered your own question. I do not use this mode even in Notepad++.

F5

I will correct, it almost a typo.      ", 1)"

Fixed

 

There is another problem. When searching for text, you can change the input field and the text in the editor. I must track these changes. This is not done

I was mistaken. I wanted to correct, but the problem isn't present.

Edited by AZJIO

Share this post


Link to post
Share on other sites

Posted (edited)

You answered your own question. I do not use this mode even in Notepad++.

Yes, but your answer is too simple ;). It must be possible with GUIRegisterMsg. All good editors have this feature. I'll see if I can solve this.

Something else, would you evaluate to put a status bar with some info like cursor position (see example), file size, etc?

; 1. Add below $hEdit = GUICtrlGetHandle(-1)
GUICtrlSetResizing ( $iEdit, $GUI_DOCKBOTTOM + $GUI_DOCKTOP )

; 2. ==> insert just before GUISetState(@SW_SHOW, $hGui)
#region status bar
Local $aPartRightSide[3] = [100, 140, 300]
Global $StatusBar = _GUICtrlStatusBar_Create($hGui, $aPartRightSide, "", -1, $SBARS_SIZEGRIP)
_GUICtrlStatusBar_SetText($StatusBar, "INS" , 0)
_GUICtrlStatusBar_SetText($StatusBar, "" , 1)
_GUICtrlStatusBar_SetText($StatusBar, "Ln: " & ControlCommand($hGUI, "", $hEdit, "GetCurrentLine", "") & " " & "Col: " &ControlCommand($hGUI, "", $hEdit, "GetCurrentCol", ""), 2)
#endregion status bar


; 3. Add 
GUIRegisterMsg($WM_SIZE, "MY_STATUSBAR") 

; 4. Add (and Declare Global $aLocation)
        Case Else
            $aLocation = _GUICtrlEdit_GetSel($iEdit) ; cursor location
            If $iKeep_Pos <> $aLocation[1] Then
                _GUICtrlStatusBar_SetText($StatusBar, "Ln: " & ControlCommand($hGUI, "", $hEdit, "GetCurrentLine", "") & " " & "Col: " &ControlCommand($hGUI, "", $hEdit, "GetCurrentCol", ""), 2)
                $iKeep_Pos = $aLocation[1]
            EndIf

; 5. Add
Func MY_STATUSBAR($hWnd, $iMsg, $iwParam, $ilParam)
    ; dock bottom
    _GUICtrlStatusBar_Resize($StatusBar)
    Return $GUI_RUNDEFMSG
EndFunc   ;==>MY_STATUSBAR
Edited by GreenCan

Share this post


Link to post
Share on other sites

Posted

GreenCan

I do not want to display information in the status bar after typing each letter. Maybe I'm not ready to do that now. I think it's wasteful. Given that the AutoIt3 spends to 10 times greater than in C/C++.

I wanted to add a search with regular expressions.

Share this post


Link to post
Share on other sites

Posted

Fine for me

Share this post


Link to post
Share on other sites

Posted

Nice work AZJIO

Just a little remark : when saving, txt extension is not added.

Share this post


Link to post
Share on other sites

Posted (edited)

wakillon

Just a little remark : when saving, txt extension is not added

It was so conceived. But I was wrong. Fixed.

Update

Added "Search in selected"
Added "Duplicate"

Added search using regular expressions

Added displaying information (Ctrl+Space)

Edited by AZJIO

Share this post


Link to post
Share on other sites

Posted

wakillon

It was so conceived. But I was wrong. Fixed.

 

Thanks.

Share this post


Link to post
Share on other sites

Posted

wakillon

It was so conceived. But I was wrong. Fixed.

Azjio,

The fix is not good.  If I want to give another extension (for example 'test.au3'), the file is saved as 'test.au3.txt'

'save as' should only add the .txt extension if there is no extension.

Share this post


Link to post
Share on other sites

Posted (edited)

GreenCan,

the file is saved as 'test.au3.txt'

 

So won't be. Check the before to post on the forum.

------------------

Fixed: "Duplicate". If the file empty, adds a line.

Added: "+ Tab", "- Tab"

------------------

Added: "Remove the spaces"

Added: "Delete duplicate lines"

>WM_DROPFILES

Edited by AZJIO

Share this post


Link to post
Share on other sites

Posted

Update

Added: "Recent files"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0