Sign in to follow this  
Followers 0
Shides

TxTediTor

12 posts in this topic

#1 ·  Posted (edited)

Hi to all, i have finish to pragram TxTediTor...

i have translate the include "GuiEdit" in "GuiEdit(itamod)" this for italian version, now is only in italian, but tomorrow i want upload the english version if I have time to do it...

This is the first version:

TxTediTor.rar

Script:(if you want run TxTediTor with script place "GuiEdit(itamod).au3" in Include directory)

CODE
#include <GuiConstants.au3>

#include <File.au3>

#include <GuiEdit(itamod).au3>

#include <String.au3>

#include <Date.au3>

#NoTrayIcon

Dim $filesave, $fileopen = "", $SAVEEN, $SAVE, $FILEISOPEN = 0

Global $Sec, $Min, $Hour, $Time

$finestra = GuiCreate("TxTediTor", 500, 350, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Edit_1 = GuiCtrlCreateEdit("", 0, 0, 500, 330)

$menu = GUICtrlCreateMenu ("File")

$nuovo = guictrlcreatemenuitem ("&Nuovo", $menu)

$apri = guictrlcreatemenuitem ("Apri", $menu)

$salva = guictrlcreatemenuitem ("&Salva con nome", $menu)

GUICtrlCreateMenuitem ("", $menu)

$stampa = guictrlcreatemenuitem ("Stampa...", $menu)

GUICtrlCreateMenuitem ("", $menu)

$esci = guictrlcreatemenuitem ("&Esci", $menu)

$modifica = GUICtrlCreateMenu ("Modifica")

$indietro = GUICtrlCreateMenuitem ("Annulla", $modifica)

GUICtrlCreateMenuitem ("", $modifica)

$trova = GUICtrlCreateMenuitem ("Trova e sostituisci", $modifica)

GUICtrlCreateMenuitem ("", $modifica)

$data = GUICtrlCreateMenuitem ("Aggiungi Data", $modifica)

$ora = GUICtrlCreateMenuitem ("Aggiungi Ora", $modifica)

$opzioni = guictrlcreatemenu ("Opzioni")

$font = guictrlcreatemenuitem ("Carattere", $opzioni)

$colore = guictrlcreatemenu ("Colore sfondo", $opzioni)

$bianco = guictrlcreatemenuitem ("Predefinito", $colore)

GUICtrlCreateMenuitem ("", $colore)

$nero = guictrlcreatemenuitem ("Nero", $colore)

$rosso = guictrlcreatemenuitem ("Rosso", $colore)

$blu = guictrlcreatemenuitem ("Blu", $colore)

$about = guictrlcreatemenu ("About")

$info = guictrlcreatemenuitem ("Info", $about)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

If _GUICtrlEditCanUndo ($Edit_1) Then

$SAVEYESORNO = MsgBox(35, "TxTediTor", "Il testo nel file è stato cambiato, vuoi salvare?")

If $SAVEYESORNO = 6 And $FILEISOPEN = 0 Then

Save()

Exit

EndIf

If $SAVEYESORNO = 6 And $FILEISOPEN = 1 Then

FileDelete($aprifile)

FileWrite($aprifile, GUICtrlRead($Edit_1, $font))

Exit

EndIf

If $SAVEYESORNO = 7 Then

ExitLoop

Exit

EndIf

If $SAVEYESORNO = 2 Then Sleep(1)

EndIf

If Not _GUICtrlEditCanUndo ($Edit_1) Then Exit

case $msg = $nuovo

If _GUICtrlEditCanUndo ($Edit_1) Then

$SAVEYESORNO = MsgBox(35, "TxTediTor - Salva", "Sono state apportate delle modifiche al documento, vuoi salvare?")

If $SAVEYESORNO = 6 And $FILEISOPEN = 0 Then

Save()

EndIf

If $SAVEYESORNO = 6 And $FILEISOPEN = 1 Then

FileDelete($aprifile)

FileWrite($aprifile, GUICtrlRead($Edit_1))

EndIf

If $SAVEYESORNO = 7 Then GUICtrlSetData($Edit_1, "")

If $SAVEYESORNO = 2 Then Sleep(1)

EndIf

If Not _GUICtrlEditCanUndo ($EDIT_1) Then GUICtrlSetData($Edit_1, "")

$FILEISOPEN = 0

case $msg = $apri

$aprifile = FileOpenDialog ("Apri", "", "Documenti di testo (*.txt)")

$testo = FileRead($aprifile, FileGetSize($aprifile))

GUICtrlSetData($Edit_1, $testo)

$aprifile = 1

case $msg = $salva

$salvafile = FileSaveDialog ("Salva", "", "Documenti di testo (*.txt)","" ,".txt")

FileWrite($salvafile, GUICtrlRead ($Edit_1, $font))

case $msg = $esci

If _GUICtrlEditCanUndo ($Edit_1) Then

$SAVEYESORNO = MsgBox(35, "TxTediTor", "Il testo nel file è stato cambiato, vuoi salvare?")

If $SAVEYESORNO = 6 And $FILEISOPEN = 0 Then

Save()

Exit

EndIf

If $SAVEYESORNO = 6 And $FILEISOPEN = 1 Then

FileDelete($aprifile)

FileWrite($aprifile, GUICtrlRead($Edit_1))

Exit

EndIf

If $SAVEYESORNO = 7 Then ExitLoop

If $SAVEYESORNO = 2 Then

Sleep(1)

EndIf

EndIf

If Not _GUICtrlEditCanUndo ($Edit_1) Then Exit

Case $msg = $font

$FONT3 = _ChooseFont (IniRead(@ScriptDir & "\ini.ini", "font", "font", "Courier New"), IniRead(@ScriptDir & "\ini.ini", "font", "size", "12"))

If @error Then

;;;

Else

GUICtrlSetFont($EDIT_1, $FONT3[3], $FONT3[4], $FONT3[1], $FONT3[2])

IniWrite(@ScriptDir & "\ini.ini", "font", "font", $FONT3[2])

IniWrite(@ScriptDir & "\ini.ini", "font", "size", $FONT3[3])

IniWrite(@ScriptDir & "\ini.ini", "font", "weight", $FONT3[4])

IniWrite(@ScriptDir & "\ini.ini", "font", "attrib", $FONT3[1])

EndIf

Case $msg = $indietro

_GUICtrlEditUndo ($Edit_1)

Case $msg = $stampa

$msgboxstampa = MsgBox(35, "TxTediTor", "Vuoi stampare questa pagina?")

Select

Case $msgboxstampa = 6;Yes

_FileCreate(@TempDir & "\print.txt")

FileWrite(@TempDir & "\print.txt", GUICtrlRead($Edit_1))

$filestampa = @TempDir & "\print.txt"

_FilePrint ($filestampa)

FileDelete($filestampa)

Case $msgboxstampa = 7;No

;;;;

Case Else

;;;

EndSelect

Case $msg = $trova

_GUICtrlEditFind ($finestra, $Edit_1,"","")

Case $msg = $data

$giorni = _DateAdd( 'd',0, _NowCalcDate())

$divisore = StringSplit($giorni, '/')

$finito = $divisore[3] & '/' & _GetMonth($divisore[2]) & '/' & $divisore[1]

guictrlsetdata ($Edit_1, guictrlread($Edit_1) & '' & $finito)

Case $msg = $ora

$StartTicks = _TimeToTicks(@HOUR,@MIN,@SEC)

$EndTicks = $StartTicks + 0 * 60 * 1000

_TicksToTime($EndTicks,$Hour,$Min,$Sec)

$finito2 = $Hour & ":" & $Min & ":" & $Sec

guictrlsetdata ($Edit_1, guictrlread($Edit_1) & '' & $finito2)

Case $msg = $nero

GUICtrlSetBkColor ($Edit_1, "0x000000")

GUICtrlSetColor($Edit_1, 0x00FF00)

Case $msg = $rosso

GUICtrlSetBkColor ($Edit_1, "0xff0216")

GUICtrlSetColor($Edit_1, 0xffffff)

Case $msg = $blu

GUICtrlSetBkColor($Edit_1, "0x98adff")

GUICtrlSetColor($Edit_1, 0xffffff)

Case $msg = $bianco

GuictrlsetbkColor ($Edit_1, 0xffffff)

GUICtrlSetColor($Edit_1, 0x000000)

Case $msg = $info

ShellExecute("Misc\info.exe")

EndSelect

WEnd

func save()

$salvafile = FileSaveDialog ("Salva", "", "Documenti di testo (*.txt)","" ,".txt")

FileWrite($salvafile, GUICtrlRead ($Edit_1, $font))

EndFunc

Func _GetMonth($nMonth)

Local $aMonth = StringSplit('01,02,03,04,05,06,07,08,09,10,11,12', ',')

Return $aMonth[$nMonth]

EndFunc

ENGLISH VERSION!!!!!

Now TxTediTor is in English!!!

Download new link

Edited by Shides

I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]

Share this post


Link to post
Share on other sites



Bello! :shocked:

complimenti :(


Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key

Share this post


Link to post
Share on other sites

Thank's

cyber u are italian?

sei italiano?


I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]

Share this post


Link to post
Share on other sites

yes :shocked:

si :(


Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Open a file, so the 'Active Directory' changes, and then click About. It will crash, because you give a partial path to run, which is prefixed with the active directory..

By the way, I didn't understand shit about it.. lol.

Edited by Manadar

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Strange to me works

EDIT: But u talk about italian or english version?

Edited by Shides

I'm a Italian a AutoIterMy scriptTxTediTor -->TxTediTor is a simple program similar notepad[center]Please vote me with five star ;)Antonio Caragliano for Nokia Nseries[/center]

Share this post


Link to post
Share on other sites

for the English link, the link gets redirected to the homepage, and I dont know how to speak nor read Italian but i found the search bar and searched "Txteditor" and nothing came up. Maybe try filefront/megaupload or something?

~Nikolai

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Strange to me works

EDIT: But u talk about italian or english version?

You may not have noticed, but when I posted you didn't have an English version yet..

Ok, here are steps to reproduce bugs:

Bug 1.

  • Open or save a file that is NOT in the executable directory.
  • Click about. >> ERROR!
Bug 2.
  • Write some stuff down..
  • Click open, and then click cancel. Your text is now gone..
By the way, you don't have to make 2 seperate executables. You can integrate one in the other by using command lines. Edited by Manadar

Share this post


Link to post
Share on other sites

now it's ok

thanks

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