Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

My Notepad


  • Please log in to reply
19 replies to this topic

#1 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 24 June 2013 - 01:36 AM

My Notepad v0.4 (En, Ru)
 
lsz5L6qW.png
Black theme
V9jfAFjV.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, 12 November 2014 - 04:26 PM.

  • MikahS likes this







#2 czardas

czardas

  • MVPs
  • 7,184 posts

Posted 24 June 2013 - 03:04 AM

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


Edited by czardas, 24 June 2013 - 03:08 AM.


#3 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 24 June 2013 - 05:29 PM

czardas,

Fixed

 

 

 

Updated

Added "drag-and-drop"

Added "modification flag"

Added "GUISetAccelerators"


  • mesale0077 likes this

#4 czardas

czardas

  • MVPs
  • 7,184 posts

Posted 24 June 2013 - 06:35 PM

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



#5 Belini

Belini

    Always seeking knowledge

  • Active Members
  • PipPipPipPipPipPip
  • 414 posts

Posted 24 June 2013 - 07:19 PM

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



#6 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,660 posts

Posted 24 June 2013 - 07:20 PM

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


Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 26/09/2014


#7 GreenCan

GreenCan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 332 posts

Posted 25 June 2013 - 09:43 AM

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, 25 June 2013 - 10:06 AM.


#8 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 25 June 2013 - 10:26 AM

@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, 25 June 2013 - 12:50 PM.


#9 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,660 posts

Posted 25 June 2013 - 10:27 AM

@guinness
Fixed.

Thanks.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 26/09/2014


#10 GreenCan

GreenCan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 332 posts

Posted 25 June 2013 - 11:22 AM

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



#11 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 25 June 2013 - 01:42 PM

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, 25 June 2013 - 02:32 PM.


#12 GreenCan

GreenCan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 332 posts

Posted 25 June 2013 - 02:47 PM

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?

AutoIt         
; 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, 25 June 2013 - 02:50 PM.


#13 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 25 June 2013 - 03:11 PM

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.



#14 GreenCan

GreenCan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 332 posts

Posted 25 June 2013 - 03:29 PM

Fine for me



#15 wakillon

wakillon

    Tiny Tools Coder

  • Active Members
  • PipPipPipPipPipPip
  • 2,935 posts

Posted 25 June 2013 - 05:18 PM

Nice work AZJIO

 

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


       AutoIt Version : 3.3.12.0 / Beta 3.3.13.19 SciTE 3.4.1 OS:WIN7/WIN8.1 CPU:X64 OS:X64


#16 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 25 June 2013 - 09:40 PM

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, 26 June 2013 - 04:22 AM.


#17 wakillon

wakillon

    Tiny Tools Coder

  • Active Members
  • PipPipPipPipPipPip
  • 2,935 posts

Posted 26 June 2013 - 06:15 AM

wakillon

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

 

Thanks.


       AutoIt Version : 3.3.12.0 / Beta 3.3.13.19 SciTE 3.4.1 OS:WIN7/WIN8.1 CPU:X64 OS:X64


#18 GreenCan

GreenCan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 332 posts

Posted 26 June 2013 - 10:53 AM

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.



#19 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 26 June 2013 - 02:41 PM

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, 04 July 2013 - 03:14 AM.


#20 AZJIO

AZJIO

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,608 posts

Posted 04 July 2013 - 03:15 AM

Update
Added: "Recent files"




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users