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

Thanks Myicq to share this funny tool !  :thumbsup:


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

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

: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

    • Jos
      By Jos
      7/8/2018: Uploaded a new SciTe4AutoIt3.exe v18.708.1148.0 installer.
      It has been over a year since the last update of the full SciTE4AutoIt3 installer whch mainly had to do with the fact that Neil was moving toward v4 of SciTE and I wanted to wait for a stable version.
      Any help with testing this version before general release is appreciated.
      Also any feedback is welcome in caseI missed something or suggestions for improvement before releasing.
      ==> SciTE4AutoIt3 v18.708.1148.0
      Enjoy,
      Jos

      Addition/Changes/Fixes in the current installer:
      -------------------------------------------------------------------------------------------------- 8-7-2018 *** Merged the SciTE v 4.1.0 by Neil Hodgson with our own version of SciTE. (Jos)     This is a major change from the previous version so ensure you update all files including LUA or else you will get errors!     - SciLexer au3: Fixed issues with nested CommentBlocks not always showing the correct color.     - SciLexer au3: Change any line starting with # and no recognised keyword to be shown with the Pre-Processor in stead of default.     - Changed Shortcut for AU3INFO to Ctrl+Shift+F6.     - Moved the session restore logic for (save.session.advanced=1)into SciTE in stead of LoadSession.lua as that was clearing the recent files list of the last session       when opening a file by double cliking it. This is fixed with this change.       Default remains 0 so when a file is double clicked the last session isn't restored unless you add this to SciTEuser.properties:       "save.session.advanced=1"     - updated Tools.lua replacing [s%] with [ /t] to avoid empty lines being stripped by those functions. (Thanks Enyby) *** Updated AutoIt3Wrapper v18.708.1148.0 (Jos)     - 17.224.935.1 Added /autoit3dir to au3stripper commandline, when provided to AutoIt3Wrapper., to ensure the included files are for the correct AutoIt3 directory     - 17.224.935.2 Added directives:          #AutoIt3Wrapper_Res_CompanyName=          ;Company field          #AutoIt3Wrapper_Res_LegalTrademarks=      ;Trademark field     - 17.224.935.5 Fixed Versioning when files contain backets ->  ()     - 17.224.935.6 Added support for :          #AutoIt3Wrapper_Au3stripper_Stop_OnError=        ;(Y/N) Continue/Stop on Warnings.(Default=N)     - 17.224.935.7 added INI support for:           [Other]            Au3Stripper_Stop_OnError=n     - 17.224.935.10 Minor changes in console messages     - 17.224.935.11 Modifications from JPM:         - add #AutpIt3Wrapper_Res_Cursor_Add         - "clean" a little bit AutoIt3Wrapper.au3 *** Updated Au3Stripper v18.708.1148.0 (Jos)     - 17.224.935.1 Fixed crash when an include file contains longer record than 4096 characters.     - 17.224.935.2 Changed /rsln to replace @ScriptLineNumber in the Master script with "XXX/YYY". XXX is the master script linenumber, YYY is the Merged script linenumber.     - 17.224.935.3 Fixed issue detecting #cs #ce when a space was missing after the directive.     - 17.224.935.4 Changed Close/Open logic for Tracelog to (hopefully) avoid the hardcrash.     - 17.224.935.5 improved speed avoiding rereading include files to determine the max rec len.     - 17.224.935.6 improved speed by re-coding the check for long records.     - 17.224.935.7 Made sure the returncode is the highest from all iterations in stead of the last iteration.     - 17.224.935.8 fix for reported bug: https://www.autoitscript.com/trac/autoit/ticket/3623#comment:4     - 17.224.935.9 added support for #autoit3wrapper_autoit3dir     - 17.224.935.10 Fixed support for #autoit3wrapper_autoit3dir when followed by linecomment                     Stop processing when include file isn't found.     - 18.624.1847.1 strip the leading and trailing double quotes from the autoit3dir directive to avoid an error when they are specified.     - 18.624.1847.2 Fixed Hardcrash in the Include logic     - 18.624.1847.3 Fixed Hardcrash in Func stripping logic by enlarging the base table size     - 18.702.1556.1 Fixed regression bug with the Translate option.     - 18.703.1808.2 Fixed regression bug with the Stripping FUNC logic for the first found FUNC. *** Updated SciTEConfig v18.708.1148.0 (Jos)     - 17.224.935.1 No updates *** Updated Tidy v18.708.1148.0 (Jos)     - 17.224.935.1 Added option  to copy comments from #CS to #CE. Default is to copy the comments.                    Added Tidy Parameters:  /Skip_CE_Comment or /scec will skip this copy action                    Added INI option:                      * * *  Add comment to #CE/#CommentEnd and make it the same as the #CS/CommentStart Comments.                      ce_comment=1     - 17.224.935.2 Fix issue with Copy comments on comment start - end     - 17.224.935.4 Fix another issue with Copy comments on comment start - end -------------------------------------------------------------------------------------------------- ==> ScitillaHistory page containing all SciTE-Scintilla updates.
      ==> Visit the SciTE4AutoIt3 Download page for the latest versions
      ==> Check the online documentation for an overview of all extra's you get with this installer.
    • sumanth1980
      By sumanth1980
      Here i am wrote a simple lines to install basic applications but when i clicked on one application/program to install it was working fine but when i cancel the program in the middle to install another program it was not working. I am not an expert in this but i want a solution for this ... Can any one help me on this....
      ORG-1.au3
    • 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
×