Jump to content
Myicq

Figlet Tool for SciTE

Recommended Posts

Myicq

I personally like to make (large) headers in my code which makes it simpler for me to navigate quickly. There was the FigLet tool already, but it was not integrated into the editor.

I modified it a little and present here my first try of example script.

Features: [version 1.01]

  • Settings via ini file
  • Will ignore non-English characters and replace by user-defined
  • User-definable comment style when inserting
  • Auto-insert at cursor point in SciTE (thanks to Jon for help with this !)

My idea of the tool is to bind it to a key, to very quickly be able to insert banners, already commented out.

I would really appreaciate any comments on this. You are welcome to make / suggest additions + improvements.

Edit: attached zip.au3.

;~    #######                                    #######
;~    #        #   ####   #       ######  #####     #      ####    ####   #
;~    #        #  #    #  #       #         #       #     #    #  #    #  #
;~    #####    #  #       #       #####     #       #     #    #  #    #  #
;~    #        #  #  ###  #       #         #       #     #    #  #    #  #
;~    #        #  #    #  #       #         #       #     #    #  #    #  #
;~    #        #   ####   ######  ######    #       #      ####    ####   ######
;~
;~    #######                             #                            ###  #######   #####
;~    #         ####   #####             # #    #    #  #####   ####    #      #     #     #
;~    #        #    #  #    #           #   #   #    #    #    #    #   #      #           #
;~    #####    #    #  #    #          #     #  #    #    #    #    #   #      #      #####
;~    #        #    #  #####           #######  #    #    #    #    #   #      #           #
;~    #        #    #  #   #           #     #  #    #    #    #    #   #      #     #     #
;~    #         ####   #    #          #     #   ####     #     ####   ###     #      #####
;~
;~  _   _                   _                 __      _____  __
;~ | | | |                 (_)               /  |    |  _  |/  |
;~ | | | |  ___  _ __  ___  _   ___   _ __   `| |    | |/' |`| |
;~ | | | | / _ \| '__|/ __|| | / _ \ | '_ \   | |    |  /| | | |
;~ \ \_/ /|  __/| |   \__ \| || (_) || | | | _| |_ _ \ |_/ /_| |_
;~  \___/  \___||_|   |___/|_| \___/ |_| |_| \___/(_) \___/ \___/
;~
#include <Array.au3>
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <File.au3>
#include <GUIComboBox.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <Zip.au3>

Global $gInputText, $gComboFont, $gEditSignature, $gCurrentFont = "", $gSelFont, $gCommentStyle, $gUnknownReplace
Global $gFontData, $gFontMetaData[10], $gFontDir = @ScriptDir & "\fonts\"

_Main()

Exit

Func _Main()
    ; Create and show GUI
    GUICreate("AutoFiglet", 810, 426, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX))
    GUICtrlCreateLabel("Text line", 8, 8, 550, 16)
    GUICtrlSetResizing(-1, BitOR($GUI_DOCKHEIGHT, $GUI_DOCKTOP, $GUI_DOCKLEFT))
    $gInputText = GUICtrlCreateInput("", 8, 28, 550, 20)
    GUICtrlSetResizing(-1, BitOR($GUI_DOCKHEIGHT, $GUI_DOCKTOP, $GUI_DOCKLEFT))
    $gEditSignature = GUICtrlCreateEdit("", 8, 56, 794, 320, BitOR($ES_AUTOVSCROLL, $WS_HSCROLL, $ES_WANTRETURN))
    GUICtrlSetResizing(-1, BitOR($GUI_DOCKRIGHT, $GUI_DOCKLEFT, $GUI_DOCKTOP, $GUI_DOCKBOTTOM))
    GUICtrlSetFont(-1, 9, 400, 0, "Courier New")
    Local $btnGenerate = GUICtrlCreateButton("Generate", 680, 384, 122, 32, $BS_DEFPUSHBUTTON)
    GUICtrlSetResizing(-1, BitOR($GUI_DOCKRIGHT, $GUI_DOCKBOTTOM, $GUI_DOCKHEIGHT, $GUI_DOCKWIDTH))
    GUISetState(@SW_SHOW)

    ; setup selected font
    $gSelFont = IniRead(@ScriptDir & "\figlet.ini", "figlet", "font", "banner")
    ; does font exist ? No, set to "banner"
    If Not FileExists($gFontDir & "\" & $gSelFont & ".zip") Then
        $gSelFont = "banner"
    EndIf

    ; setup comment style
    $gCommentStyle = IniRead(@ScriptDir & "\figlet.ini", "figlet", "comment", ";" & @TAB)
    $gCommentStyle = StringReplace($gCommentStyle, "\t", @TAB)


    ; setup unknown replacement
    $gUnknownReplace = IniRead(@ScriptDir & "\figlet.ini", "figlet", "unknown", "space")
    $gUnknownReplace = StringReplace($gUnknownReplace, "space", " ")
    $gUnknownReplace = StringReplace($gUnknownReplace, "question", "?")
    $gUnknownReplace = StringReplace($gUnknownReplace, "none", "")

    ; initially load the font
    _LoadFont($gSelFont)

    ; WM_COMMAND will tell us when the text has changed
    GUIRegisterMsg($WM_COMMAND, "_WmCommand")

    Local $nMsg
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $btnGenerate
;~                 _SciTE_InsertText($figlet)
                $figlet = GUICtrlRead($gEditSignature)

                ; Comment out for AutoIT
                $figlet = StringRegExpReplace($figlet, "(?m)^.", $gCommentStyle)

                ; fix for insertion into SciTE
                ; thanks to Jos for help on this!!
                $figlet = StringReplace($figlet, @CRLF, "\r")
                _SciTE_InsertText($figlet)
                Exit
        EndSwitch
    WEnd

    ; Discard GUI
    GUIDelete()
EndFunc   ;==>_Main

Func _WmCommand($hWndGUI, $msgID, $wParam, $lParam)
    If $lParam = GUICtrlGetHandle($gInputText) Then
        If _WinAPI_HiWord($wParam) = $EN_CHANGE Then
;~             _Display(GUICtrlRead($gInputText), GUICtrlRead($gComboFont))
            _Display(GUICtrlRead($gInputText), $gCurrentFont)
        EndIf
    EndIf
EndFunc   ;==>_WmCommand

Func _Display($sText, $sFontName)
    Local $i, $j, $sChar, $sOutput = ""

    _LoadFont($sFontName)
    For $i = 1 To $gFontMetaData[2]
        For $j = 1 To StringLen($sText)
            $sChar = StringMid($sText, $j, 1)
            ; need to handle English (figlet compatible) chars only...
            If StringRegExp($sChar, "(?i)[a-z0-9[:punct:]\s]") Then
                $sOutput &= _GetCharacter($sChar, $i)
            Else
                ; handle replacement with nothing...
                if stringlen($gUnknownReplace) >0 then
                    $sOutput &= _GetCharacter($gUnknownReplace, $i)
                EndIf

            EndIf
        Next
        $sOutput &= @CRLF
    Next
    GUICtrlSetData($gEditSignature, $sOutput)
EndFunc   ;==>_Display

Func _LoadFont($sFontName)
    If $sFontName = $gCurrentFont Then Return

    Local $aTemp, $sTemp, $nUBound, $sFileLocation = $gFontDir & $sFontName & ".flf", $fTemp = False

    ; Try and unzip it first
    FileCopy($sFileLocation, @TempDir & "\" & $sFontName & ".zip")
    _Zip_UnzipAll(@TempDir & "\" & $sFontName & ".zip", @TempDir)
    If @error = 0 Then
        ; It unzipped OK so let's flag the temporary file
        $fTemp = True
        $sFileLocation = @TempDir & "\" & $sFontName & ".flf"
    EndIf
    FileDelete(@TempDir & "\" & $sFontName & ".zip")

    ; Read in the figlet font in to out array
    _FileReadToArray($sFileLocation, $gFontData)
    $aTemp = StringSplit($gFontData[1], " ", 2) ; Split the first line at spaces
    $nUBound = UBound($aTemp) ; Remember how many parameters we have
    $sTemp = $aTemp[0] ; This contains the signature and the hard blank character
    $gFontMetaData[0] = StringLeft($sTemp, StringLen($sTemp) - 1) ; Signature
    $gFontMetaData[1] = StringRight($sTemp, 1) ; Hard blank
    $gFontMetaData[2] = Number($aTemp[1]) ; Height of each letter
    ;$gFontMetaData[3] = Number($aTemp[2])
    ;$gFontMetaData[4] = Number($aTemp[3])
    ;$gFontMetaData[5] = Number($aTemp[4])
    $gFontMetaData[6] = Number($aTemp[5])
    ;If ($nUBound > 6) Then $gFontMetaData[7] = Number($aTemp[6])
    ;If ($nUBound > 7) Then $gFontMetaData[8] = Number($aTemp[7])
    ;If ($nUBound > 8) Then $gFontMetaData[9] = Number($aTemp[8])
    ;If ($gFontMetaData[0] <> "flf2a") Then Return SetError(1, 0, $sFontName & " is not a valid font")
    If $fTemp Then FileDelete($sFileLocation)
    $gCurrentFont = $sFontName
EndFunc   ;==>_LoadFont

Func _GetCharacter($sChar, $nLine)
    Local $nStart = $gFontMetaData[6] + ((Asc($sChar) - 32) * $gFontMetaData[2]), $sTemp
    $sTemp = $gFontData[$nStart + $nLine + 1]
    $sTemp = StringReplace($sTemp, StringRight($sTemp, 1), "")
    $sTemp = StringReplace($sTemp, $gFontMetaData[1], " ")
    Return $sTemp
EndFunc   ;==>_GetCharacter


; ========================================================================================
Func _SciTE_InsertText($sString)
    Return _SciTE_Send_Command(0, WinGetHandle("DirectorExtension"), "insert:" & $sString)
EndFunc   ;==>_SciTE_InsertText

Func _SciTE_Send_Command($hHandle, $hSciTE, $sString)
    Local $ilParam, $tData
    If StringStripWS($sString, 8) = "" Then
        Return SetError(2, 0, 0) ; String is blank.
    EndIf
    $sString = ":" & Dec(StringTrimLeft($hHandle, 2)) & ":" & $sString
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sString = ' & $sString & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
    $tData = DllStructCreate("char[" & StringLen($sString) + 1 & "]") ; wchar
    DllStructSetData($tData, 1, $sString)
    $ilParam = DllStructCreate("ptr;dword;ptr") ; ulong_ptr;dword;ptr
    DllStructSetData($ilParam, 1, 1) ; $ilParam, 1, 1
    DllStructSetData($ilParam, 2, DllStructGetSize($tData))
    DllStructSetData($ilParam, 3, DllStructGetPtr($tData))
    _SendMessage($hSciTE, $WM_COPYDATA, $hHandle, DllStructGetPtr($ilParam))
    Return Number(Not @error)
EndFunc   ;==>_SciTE_Send_Command
 

A ini-file for settings:

[figlet]
; name of font file without extension
; if not existing or not found, font is "banner"
font=banner

; default style of commenting
; use \t for tab
comment=;~\t

; value of unknown
; use  space | question | none
unknown=none
 

Zip.au3

Edited by Myicq
  • Like 2

I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites
mLipok

 

"L:Figlet_Tool_for_SciTe.au3"(33,10) : error: can't open include file <Zip.au3>.

#include <Zip.au3>

 

Please attach this file or do a link.

  • Like 1

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
mLipok

 

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "L:Figlet_Tool_for_SciTe.au3" /UserParams    

+>01:34:16 Starting AutoIt3Wrapper v.2.1.2.29 SciTE v.3.3.6.0 ;  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0415  Keyboard:00000415  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (3.3.9.5)  from:C:Program Files (x86)AutoIt3
+>01:34:17 AU3Check ended.rc:0
>Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3.exe "L:Figlet_Tool_for_SciTe.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
L:Figlet_Tool_for_SciTe.au3 (154) : ==> Subscript used with non-Array variable.:
$aTemp = StringSplit($gFontData[1], " ", 2)
$aTemp = StringSplit($gFontData^ ERROR
->01:34:17 AutoIt3.exe ended.rc:1
>Exit code: 1    Time: 0.648
 

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
wakillon

@mlipok

use this fonts.7z

Decompress it in your script dir.

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
mLipok

I do not know French but I understood enough

Service d'envoi de fichiers http://dl.free.fr

EDIT:

nothing happen

no one files download

Edited by mlipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
wakillon

I do not know French but I understood enough

Service d'envoi de fichiers http://dl.free.fr

EDIT:

nothing happen

no one files download

 

may be you're subject to some access restrictions...

Go to http://www.jave.de/figlet/fonts.html and get figletfonts40.zip

Decompress it an rename it to fonts


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
ricky

Hello,

thanks to share, but before download, in your first post, could you add an example before and after?

Regards

Share this post


Link to post
Share on other sites
mLipok
                                                                                                           
 #    #  ######  #####    ####   #          #####   ######    ##    #    #   ####    ####   #    #  #####  
 ##  ##  #       #    #  #    #  #          #    #  #        #  #   #    #  #    #  #    #  #    #  #    # 
 # ## #  #####   #    #  #       #          #####   #####   #    #  #    #  #       #    #  #    #  #    # 
 #    #  #       #####   #       #          #    #  #       ######  #    #  #       #    #  #    #  #####  
 #    #  #       #   #   #    #  #          #    #  #       #    #  #    #  #    #  #    #  #    #  #      
 #    #  ######  #    #   ####   #          #####   ######  #    #   ####    ####    ####    ####   #      
                                                                                                           
 
 
 

EDIT: second example:

  #          ##   
 ###           #  
  #             # 
      #####     # 
  #             # 
 ###           #  
  #          ##   
                  
Edited by mlipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
wakillon

#     #                  ###                                                                             
     #   #    ####   #    #  ###  #####   ######      #    #  ######  #        ####    ####   #    #  ###### 
      # #    #    #  #    #   #   #    #  #           #    #  #       #       #    #  #    #  ##  ##  #      
       #     #    #  #    #  #    #    #  #####       #    #  #####   #       #       #    #  # ## #  #####  
       #     #    #  #    #       #####   #           # ## #  #       #       #       #    #  #    #  #      
       #     #    #  #    #       #   #   #           ##  ##  #       #       #    #  #    #  #    #  #      
       #      ####    ####        #    #  ######      #    #  ######  ######   ####    ####   #    #  ######


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
wakillon

@Myicq

Can you add the possibility on your gui, for change the font ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
mLipok

I wonder why before, did gave me extra line spacing.

 #     #                                                                                                
 ##   ##  ######  #####    ####   #      #####   ######    ##    #    #   ####    ####   #    #  #####  
 # # # #  #       #    #  #    #  #      #    #  #        #  #   #    #  #    #  #    #  #    #  #    # 
 #  #  #  #####   #    #  #       #      #####   #####   #    #  #    #  #       #    #  #    #  #    # 
 #     #  #       #####   #       #      #    #  #       ######  #    #  #       #    #  #    #  #####  
 #     #  #       #   #   #    #  #      #    #  #       #    #  #    #  #    #  #    #  #    #  #      
 #     #  ######  #    #   ####   #      #####   ######  #    #   ####    ####    ####    ####   #      
                                                                                                        
 

EDIT:

and again

but when I "PASTE" text to forum all is OK

Edited by mlipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
mLipok
  • Will ignore non-English characters and replace by user-defined

Can you describe some more ?

for example   Polish char     Ć ć

 
  • User-definable comment style when inserting

Can you do a GUI (ie. combobox or something like that) ?

 

 

  • Auto-insert at cursor point in SciTE (thanks to Jon for help with this !)

Is it button "Generate" ? 

Why script end after using them ?


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
wakillon

-.                       .-.  _  .--.      .-.  .-.       _              .-. .-.      _  .-. 
     :                      .' `.:_;: .-'      : :  : :      :_;            .'.'.' `.    :_;.' `.
     `-.  .--.  .--.  .-..-.`. .'.-.: `; .-..-.: :  : :      .-. .--. ,-.,-.`-' `. .'    .-.`. .'
     .; :' '_.'' .; ; : :; : : : : :: :  : :; :: :_ : :_     : :`._-.': ,. :     : :     : : : : 
    .__.'`.__.'`.__,_;`.__.' :_; :_;:_;  `.__.'`.__;`.__;    :_;`.__.':_;:_;     :_;     :_; :_;

I have tried some other fonts but result is unreadable... :ermm:


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
wakillon

@mlipok

Try this modified version :

;~    #######                                    #######
;~    #        #   ####   #       ######  #####     #      ####    ####   #
;~    #        #  #    #  #       #         #       #     #    #  #    #  #
;~    #####    #  #       #       #####     #       #     #    #  #    #  #
;~    #        #  #  ###  #       #         #       #     #    #  #    #  #
;~    #        #  #    #  #       #         #       #     #    #  #    #  #
;~    #        #   ####   ######  ######    #       #      ####    ####   ######
;~
;~    #######                             #                            ###  #######   #####
;~    #         ####   #####             # #    #    #  #####   ####    #      #     #     #
;~    #        #    #  #    #           #   #   #    #    #    #    #   #      #           #
;~    #####    #    #  #    #          #     #  #    #    #    #    #   #      #      #####
;~    #        #    #  #####           #######  #    #    #    #    #   #      #           #
;~    #        #    #  #   #           #     #  #    #    #    #    #   #      #     #     #
;~    #         ####   #    #          #     #   ####     #     ####   ###     #      #####
;~
;~  _   _                   _                 __      _____  __
;~ | | | |                 (_)               /  |    |  _  |/  |
;~ | | | |  ___  _ __  ___  _   ___   _ __   `| |    | |/' |`| |
;~ | | | | / _ \| '__|/ __|| | / _ \ | '_ \   | |    |  /| | | |
;~ \ \_/ /|  __/| |   \__ \| || (_) || | | | _| |_ _ \ |_/ /_| |_
;~  \___/  \___||_|   |___/|_| \___/ |_| |_| \___/(_) \___/ \___/
;~

#Region    ;************ Includes ************
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#Include <ComboConstants.au3>
#include <EditConstants.au3>
#include <WinAPI.au3>
#Include <Array.au3>
#include <File.au3>
#include <Zip.au3>
#EndRegion ;************ Includes ************

Global $hGui, $gInputText, $idComboFonts, $gEditSignature, $gCurrentFont = "", $gSelFont, $gCommentStyle, $gUnknownReplace
Global $gFontData, $gFontMetaData[10], $gFontDir = @ScriptDir & "\fonts\"

; Create and show GUI
$hGui = GUICreate("AutoFiglet", 810, 426, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX))
GUICtrlCreateLabel("Text line", 8, 8, 550, 16)
GUICtrlSetResizing(-1, BitOR($GUI_DOCKHEIGHT, $GUI_DOCKTOP, $GUI_DOCKLEFT))
$gInputText = GUICtrlCreateInput("", 8, 28, 550, 20)
GUICtrlSetResizing(-1, BitOR($GUI_DOCKHEIGHT, $GUI_DOCKTOP, $GUI_DOCKLEFT))
$gEditSignature = GUICtrlCreateEdit("", 8, 56, 794, 320, BitOR($ES_AUTOVSCROLL, $WS_HSCROLL, $ES_WANTRETURN))
GUICtrlSetResizing(-1, BitOR($GUI_DOCKRIGHT, $GUI_DOCKLEFT, $GUI_DOCKTOP, $GUI_DOCKBOTTOM))
GUICtrlSetFont(-1, 9, 400, 0, "Courier New")
$aFontList = _FileListToArray ( $gFontDir, '*flf', 1 )
$sFontList = _ArrayToString ( $aFontList, '|', 1)
$sFontList = StringReplace ( $sFontList, '.flf', '' )
$idComboFonts = GUICtrlCreateCombo ( "banner", 20, 384, 100, 20 ) ; create first item
GUICtrlSetData(-1, $sFontList, "banner" ) ; add other item snd set a new default
Local $btnGenerate = GUICtrlCreateButton("Generate", 680, 384, 122, 32, $BS_DEFPUSHBUTTON)
GUICtrlSetResizing(-1, BitOR($GUI_DOCKRIGHT, $GUI_DOCKBOTTOM, $GUI_DOCKHEIGHT, $GUI_DOCKWIDTH))
GUISetState(@SW_SHOW)
; setup selected font
$gSelFont = IniRead(@ScriptDir & "\figlet.ini", "figlet", "font", "banner")
; does font exist ? No, set to "banner"
If Not FileExists($gFontDir & "\" & $gSelFont & ".zip") Then $gSelFont = 'fuzzy';"banner"
; setup comment style
$gCommentStyle = IniRead(@ScriptDir & "\figlet.ini", "figlet", "comment", ";" & @TAB)
$gCommentStyle = StringReplace($gCommentStyle, "\t", @TAB)
; setup unknown replacement
$gUnknownReplace = IniRead(@ScriptDir & "\figlet.ini", "figlet", "unknown", "space")
$gUnknownReplace = StringReplace($gUnknownReplace, "space", " ")
$gUnknownReplace = StringReplace($gUnknownReplace, "question", "?")
$gUnknownReplace = StringReplace($gUnknownReplace, "none", "")
; initially load the font
;~ _LoadFont($gSelFont)
; WM_COMMAND will tell us when the text has changed
GUIRegisterMsg($WM_COMMAND, "_WmCommand")
Local $nMsg

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $btnGenerate
            $figlet = GUICtrlRead($gEditSignature)
            ; Comment out for AutoIT
            $figlet = StringRegExpReplace($figlet, "(?m)^.", $gCommentStyle)
            ; fix for insertion into SciTE
            ; thanks to Jos for help on this!!
            $figlet = StringReplace($figlet, @CRLF, "\r")
            $sSaveFilePath = @TempDir & '\' & @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & '.au3'
            FileWrite ( $sSaveFilePath, '' )
            _SciTE_Send_Command ( $hGui, WinGetHandle ( 'DirectorExtension' ), 'open:' & StringReplace ( $sSaveFilePath, '\', '\\' ) )
            _SciTE_InsertText($figlet)
    EndSwitch
WEnd

; Discard GUI
GUIDelete()

Func _Display($sText, $sFontName)
    Local $i, $j, $sChar, $sOutput = ""
    _LoadFont ( $sFontName )
    For $i = 1 To $gFontMetaData[2]
        For $j = 1 To StringLen($sText)
            $sChar = StringMid($sText, $j, 1)
            ; need to handle English (figlet compatible) chars only...
            If StringRegExp($sChar, "(?i)[a-z0-9[:punct:]\s]") Then
                $sOutput &= _GetCharacter($sChar, $i)
            Else
                ; handle replacement with nothing...
                if stringlen($gUnknownReplace) >0 then
                    $sOutput &= _GetCharacter($gUnknownReplace, $i)
                EndIf
            EndIf
        Next
        $sOutput &= @CRLF
    Next
    GUICtrlSetData($gEditSignature, $sOutput)
EndFunc   ;==>_Display

Func _GetCharacter($sChar, $nLine)
    Local $nStart = $gFontMetaData[6] + ((Asc($sChar) - 32) * $gFontMetaData[2]), $sTemp
    $sTemp = $gFontData[$nStart + $nLine + 1]
    $sTemp = StringReplace($sTemp, StringRight($sTemp, 1), "")
    $sTemp = StringReplace($sTemp, $gFontMetaData[1], " ")
    Return $sTemp
EndFunc   ;==>_GetCharacter

Func _LoadFont($sFontName)
    If $sFontName = $gCurrentFont Then Return
    Local $aTemp, $sTemp, $nUBound, $sFileLocation = $gFontDir & $sFontName & ".flf", $fTemp = False
    ; Try and unzip it first
    FileCopy($sFileLocation, @TempDir & "\" & $sFontName & ".zip")
    _Zip_UnzipAll(@TempDir & "\" & $sFontName & ".zip", @TempDir)
    If @error = 0 Then
        ; It unzipped OK so let's flag the temporary file
        $fTemp = True
        $sFileLocation = @TempDir & "\" & $sFontName & ".flf"
    EndIf
    FileDelete(@TempDir & "\" & $sFontName & ".zip")
    ; Read in the figlet font in to out array
    _FileReadToArray($sFileLocation, $gFontData)
    $aTemp = StringSplit($gFontData[1], " ", 2) ; Split the first line at spaces
    $nUBound = UBound($aTemp) ; Remember how many parameters we have
    $sTemp = $aTemp[0] ; This contains the signature and the hard blank character
    $gFontMetaData[0] = StringLeft($sTemp, StringLen($sTemp) - 1) ; Signature
    $gFontMetaData[1] = StringRight($sTemp, 1) ; Hard blank
    $gFontMetaData[2] = Number($aTemp[1]) ; Height of each letter
    ;$gFontMetaData[3] = Number($aTemp[2])
    ;$gFontMetaData[4] = Number($aTemp[3])
    ;$gFontMetaData[5] = Number($aTemp[4])
    $gFontMetaData[6] = Number($aTemp[5])
    ;If ($nUBound > 6) Then $gFontMetaData[7] = Number($aTemp[6])
    ;If ($nUBound > 7) Then $gFontMetaData[8] = Number($aTemp[7])
    ;If ($nUBound > 8) Then $gFontMetaData[9] = Number($aTemp[8])
    ;If ($gFontMetaData[0] <> "flf2a") Then Return SetError(1, 0, $sFontName & " is not a valid font")
    If $fTemp Then FileDelete($sFileLocation)
    $gCurrentFont = $sFontName
EndFunc   ;==>_LoadFont

Func _SciTE_InsertText($sString)
    Return _SciTE_Send_Command(0, WinGetHandle("DirectorExtension"), "insert:" & $sString)
EndFunc   ;==>_SciTE_InsertText

Func _SciTE_Send_Command($hHandle, $hSciTE, $sString)
    Local $ilParam, $tData
    If StringStripWS($sString, 8) = "" Then
        Return SetError(2, 0, 0) ; String is blank.
    EndIf
    $sString = ":" & Dec(StringTrimLeft($hHandle, 2)) & ":" & $sString
    $tData = DllStructCreate("char[" & StringLen($sString) + 1 & "]") ; wchar
    DllStructSetData($tData, 1, $sString)
    $ilParam = DllStructCreate("ptr;dword;ptr") ; ulong_ptr;dword;ptr
    DllStructSetData($ilParam, 1, 1) ; $ilParam, 1, 1
    DllStructSetData($ilParam, 2, DllStructGetSize($tData))
    DllStructSetData($ilParam, 3, DllStructGetPtr($tData))
    _SendMessage($hSciTE, $WM_COPYDATA, $hHandle, DllStructGetPtr($ilParam))
    Return Number(Not @error)
EndFunc   ;==>_SciTE_Send_Command

Func _WmCommand ( $hWnd, $iMsg, $wParam, $lParam )
    Switch $hWnd
        Case $hGui
            Switch $lParam
                Case GUICtrlGetHandle($gInputText), GUICtrlGetHandle ( $idComboFonts )
                    Switch _WinAPI_HiWord($wParam)
                        Case $EN_CHANGE, $CBN_SELCHANGE
                            _Display(GUICtrlRead($gInputText), GUICtrlRead($idComboFonts))
                    EndSwitch
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>_WmCommand

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
mLipok

 

::::'######:::'#######:::'#######::'##::::::::::

:::'##... ##:'##.... ##:'##.... ##: ##::::::::::
::: ##:::..:: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::::::: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::::::: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::: ##: ##:::: ##: ##:::: ##: ##::::::::::
:::. ######::. #######::. #######:: ########::::
::::......::::.......::::.......:::........:::::
 
::::'######:::'#######:::'#######::'##::::::::::
:::'##... ##:'##.... ##:'##.... ##: ##::::::::::
::: ##:::..:: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::::::: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::::::: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::: ##: ##:::: ##: ##:::: ##: ##::::::::::
:::. ######::. #######::. #######:: ########::::
::::......::::.......::::.......:::........:::::
 
 
::::'######:::'#######:::'#######::'##::::::::::
:::'##... ##:'##.... ##:'##.... ##: ##::::::::::
::: ##:::..:: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::::::: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::::::: ##:::: ##: ##:::: ##: ##::::::::::
::: ##::: ##: ##:::: ##: ##:::: ##: ##::::::::::
:::. ######::. #######::. #######:: ########::::
::::......::::.......::::.......:::........:::::
Edited by mlipok

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
wakillon

,ad8888ba,   88                       88                                                 88  88  88                         88               88  
    d8"'    `"8b  88                       88                                                 88  ""  88                         ""    ,d         88  
    8'            88                       88                                                 88      88                               88         88  
    8             88  ,adPPYYba,   ,adPPYb,88      8b       d8   ,adPPYba,   88       88      88  88  88   ,d8    ,adPPYba,      88  MM88MMM      88  
    8      88888  88  ""     `Y8  a8"    `Y88      `8b     d8'  a8"     "8a  88       88      88  88  88 ,a8"    a8P_____88      88    88         88  
    8,        88  88  ,adPPPPP88  8b       88       `8b   d8'   8b       d8  88       88      88  88  8888[      8PP"""""""      88    88         ""  
    Y8a.    .a88  88  88,    ,88  "8a,   ,d88        `8b,d8'    "8a,   ,a8"  "8a,   ,a88      88  88  88`"Yba,   "8b,   ,aa      88    88,        aa  
     `"Y88888P"   88  `"8bbdP"Y8   `"8bbdP"Y8          Y88'      `"YbbdP"'    `"YbbdP'Y8      88  88  88   `Y8a   `"Ybbd8"'      88    "Y888      88  
                                                       d8'                                                                                            
                                                      d8'

^_^

  • Like 1

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
mLipok

I like this 


Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2018-03-17

Share this post


Link to post
Share on other sites
wakillon

___   ___    ________      ___ __ __    ________  ______   _________  ______   ______        __  __   ______     ______      __      
/__/\ /__/\  /_______/\    /__//_//_/\  /_______/\/_____/\ /________/\/_____/\ /_____/\      /_/\/_/\ /_____/\   /_____/\    /__/\    
\::\ \\  \ \ \__.::._\/    \::\| \| \ \ \__.::._\/\::::_\/_\__.::.__\/\::::_\/_\:::_ \ \     \:\ \:\ \\::::_\/_  \:::__\/    \.:\ \   
 \::\/_\ .\ \   \::\ \      \:.      \ \   \::\ \  \:\/___/\  \::\ \   \:\/___/\\:(_) ) )_    \:\ \:\ \\:\/___/\    /: /      \::\ \  
  \:: ___::\ \  _\::\ \__    \:.\-/\  \ \  _\::\ \__\_::._\:\  \::\ \   \::___\/_\: __ `\ \    \:\ \:\ \\::___\/_  /::/___     \__\/_ 
   \: \ \\::\ \/__\::\__/\    \. \  \  \ \/__\::\__/\ /____\:\  \::\ \   \:\____/\\ \ `\ \ \    \:\_\:\ \\:\____/\/_:/____/\     /__/\
    \__\/ \::\/\________\/     \__\/ \__\/\________\/ \_____\/   \__\/    \_____\/ \_\/ \_\/     \_____\/ \_____\/\_______\/     \__\/

:D


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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

  • Similar Content

    • FrancescoDiMuro
      By FrancescoDiMuro
      Good evening everyone
      I was trying to insert function header to the functions of my script, but, in the SciTE console, this appears:
      Function or struct definition not found, unable to insert header. @Jos Any suggestion?
      Thanks in advance.

      Best Regards.
    • cheeroke
      By cheeroke
      Hi I am not sure how to call it properly, but for those of you who use SciTE, when you typing built in function and about to pass parameters to it you can see popup with all the ones which can be passed.
      Question: how to create something like that for my own functions?
       
      Thanks
    • therks
      By therks
      Does SciTE have string or number ids for the recent file menu items?
      I was hoping to add shortcuts (using the user.shortcuts properties) to the most recent item, but the documentation doesn't list any id's for those items (unless I overlooked?).
      Also, did anyone else notice that the index listing for the SciTE doc doesn't work properly?
      It appears it's linking to this: mk:@MSITStore:C:\Program%20Files\AutoIt3\SciTE\Scite4AutoIt3.chm::/SciTEDocumentation.html
      When it should be this? mk:@MSITStore:C:\Program%20Files\AutoIt3\SciTE\Scite4AutoIt3.chm::/Scitedoc/SciTEDoc.html
    • BrewManNH
      By BrewManNH
      I was looking for a toolbar modification for SciTE and I was checking various versions of SciTE that were available on the internet. They all had some problems for how I wanted to use the editor, so I looked here to see if there were any toolbar modifications for Scite. I found one very old script by YogiBear (Volly) from 2006 that looked promising, though there were issues with it. I decided to see what I could do to modify this script, and make some improvements to it if possible. This script is the result of that work.

      It's not perfect and definitely could use some tweaking, but I thought that it had matured enough, and was mostly stable enough to release the updated version.

      Changelog:
      Version 2.0.1
      Minor update to remove all the old Obfuscator directives and replaced them with #Au3Stripper directives instead. I also corrected a minor bug that only showed up for me on one computer I tried this on, and caused the tool bar to crash for others as well.
      SciTE toolbar version 2.0
      Changed the settings values to use constants instead of 'magic numbers' The icons on the toolbar weren't lining up with the separator characters or with the toolbar GUI because they weren't set with the resize setting for the icons, only for the separators. Changed to using arrays for everything, it makes it a lot easier to loop through the controls Added a line to use an alternate path to the SciTE program, so you can start it using, for example, the portable version instead of installed version for those that don't install AutoIt and/or SciTE4AutoIt3. It will accept a commmand line parameter that points to the SciTE executable. Removed a lot of Global variables by moving the GUI creation and monitoring to the Main function and passing variables from it. I embedded the icon files into the script so that there isn't a separate download of the icon files used here. Saves download time and makes the package smaller. Modification of tools is easier because the icon names, tooltip text, and SciTE command codes are saved in the INI file upon first start up. These can be modified after the script has been run once, even after it's been compiled, by changing the ini file information, you can modify this script to automate it, or you can change it manually in any text editor. The icon files are now using, in just my opinion, better looking icons, after all it's been 7 years and icon files have matured. I have included a file with all of the constants that SciTE uses for its menu commands which comes from the SciTE source file "scite.h", so you can use this file to help you modify the commands that the toolbar works with, by figuring out what each of these values represent in SciTE. The core of the script is pretty much the same, I've just fixed a couple of issues that it had, tweaked a few things, added some new functionality and "prettied" it up a bit.

      If anyone has any suggestions as to improvements, bugs/bugfixes, etc. please let me know.

       
      scitetoolbar.zip
    • Aguilucho
      By Aguilucho
      Greetings to the AutoIt community.
      I hope that nobody considers my question insulting but I searched 'SciTEConfig.exe' and I did not find it anywhere;
      although it is mentioned, it seems like a myth, I can not see if it exists.
      On the other hand, I have downloaded the compressed archive (from ... autoit-script-editor/downloads) 'SciTEConfig_Source.zip'
      Does not contain any .exe either but does have a 'SciteConfig.au3' which, I suppose, has replaced the .exe because on the internet I only find it as malware.
      My problem is: My applications to unzip .zip archives, they can see what files SciTEConfig_Source.zip have but they can not unzip it: 'Unknown method' says WinRar.
          I have downloaded it again, in case it had been damaged but the result is always the same.

      My question is: Is the archive 'SciTEConfig_Source.zip' damaged or does it have any other method of compression?
      I need it to learn how to configure SciTE (lite).
      Thankful to the developers of AutoIt and to the community.
      Regards
       
×