Jump to content
Sign in to follow this  
jaberwacky

Convert Helpfile To Wiki Text

Recommended Posts

jaberwacky

I am cooking up a script which turns a helpfile.txt into a wikitext document.

Here are the latest wiki pages.

StringRegExp

AutoItSetOption

ControlCommand

GUIRegisterMsg

StringSplit

ControlTreeView

GuiCreate

The way this works is to first set a directory to where the wiki documents will be saved.  Then set the path of the helpfile source.  Then run the script.  All of the helpfile functions will be converted and stored.  I have not gotten to the rest of the helpfile.  Haven't looked into it yet.

This lil script is nearing completion! 

Don't forget to change the paths in the script to suit your environment.

The goal is to make this read every helpfile file and wikify them all.  Then maybe even create the page over at the wiki?  If that's not against the rules?

Stream Functions.au3 is required and is included at the bottom of this post.

#AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 4 -w 6 -w 7 -d
#AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized=n
#AutoIt3Wrapper_Add_Constants=n

#include "Stream Functions.au3"

#include <StringConstants.au3>

#include <FileConstants.au3>

#include <String.au3>

#include <File.au3>

Global Const $table_row_seperator = "|-"

Global Const $column_header_begin = "! | "

main()

#region ; HelpFile Wikifier
Func main()
    #region ; Variables
    Local Const $table_begin = "{| class='wikitable'"
    Local Const $table_end   = "|}"
    
    Local Const $header = _
            "<!-- Autogenerated Wiki Page. -->"                                                                                  & @CRLF & _
            "<!-- Not meant to be user editable. -->"                                                                            & @CRLF & _
            "<!-- If there is an error here then that means that there is an error in the helpfile or in my script. -->"         & @CRLF & _
            "<!-- Report it to Trac with category 'Documentation' or to my post if it is my script that is in error. -->"        & @CRLF & _
            "<!-- See this post for more info: http://www.autoitscript.com/forum/topic/153680-convert-helpfile-to-wiki-text/-->" & @CRLF & _
            "<font face='Segoe UI, Courier New, Lucida Grande, Verdana, Helvetica, sans-serif'>"                                 & @CRLF

    Local $within_control_command_table = False
    Local $within_standard_table1       = False
    Local $within_param_table           = False
    Local $within_return_table          = False

    Local $within_related_section          = False
    Local $within_example_section          = False
    Local $within_syntax_section           = False
    Local $within_function_section         = False
    Local $within_description_section = False
    
    ; Edit these paths to suit your environment.
    Local Const $help_file_directory           = @ScriptDir & "\autoit-docs-v3.3.9.19-src\docs\autoit\english\txt2htm\"
    Local Const $help_file_functions_directory = $help_file_directory & "txtFunctions\"
    Local Const $examples_directory            = $help_file_directory & "examples\"

    ; This is the directory to which to save the wikified documents.
    Local Const $save_directory = @ScriptDir & "\Helpfile Wiki\"

    Local Const $files = FileListToArray($help_file_functions_directory)

    Local $file_path = '' ; $help_file_functions_directory & "GUICreate" & ".txt"

    Local $drive, $dir, $file_name, $ext

    Local $line = ''

    Local $help_file_wikified = ''
    #endregion

    For $file_path In $files ; comment this For loop out when testing single files
        _PathSplit($file_path, $drive, $dir, $file_name, $ext)

        ConsoleWrite("File: " & $save_directory & $file_name & ".txt" & @CRLF)
        
        $help_file_wikified = $header

        Do
            $line = file_stream_read_line($file_path)

            Switch @error
                Case 0
                    $line = StringReplace($line, @CRLF, '')

                    $line = replace_html_links_with_wiki_links2($line, $file_name)
                    
                    $line = replace_html_links_with_wiki_links1($line, $file_name)

                    #region ; Section States
                    Select
                        Case $line = "###Syntax###"
                            $within_syntax_section = True
                            ContinueLoop

                        Case $line = "###Function###"
                            $within_function_section = True
                            ContinueLoop

                        Case $line = "###Description###"
                            $within_description_section = True
                            ContinueLoop

                        Case $line = "###Related###"
                            $within_related_section = True
                            ContinueLoop

                        Case $line = "###Example###"
                            $within_example_section = True
                            $help_file_wikified &= wikify_section("Example")
                            ContinueLoop

                        Case $line = "###ReturnValue###"
                            $help_file_wikified &= wikify_section("Return Value")
                            ContinueLoop

                        Case $line = "###Parameters###"
                            $help_file_wikified &= wikify_section("Parameters")
                            ContinueLoop

                        Case $line = "###Remarks###"
                            $help_file_wikified &= wikify_section("Remarks")
                            ContinueLoop
                    EndSelect
                    #endregion

                    #region ; Sections
                    Switch $within_syntax_section
                        Case True
                            $within_syntax_section = False
                            $help_file_wikified &= "<font face='Courier New'><div id='Syntax' style='background-color:#FFFFAA;'>" & @CRLF & @CRLF & @CRLF & ':' & $line & @CRLF & @CRLF & @CRLF & "</div></font>" & @CRLF
                            ContinueLoop
                    EndSwitch

                    Switch $within_related_section
                        Case True
                            Switch $line = '' Or StringInStr($line, "None") Or StringInStr($line, "Many")
                                Case True
                                    $within_related_section = False

                                Case False
                                    $help_file_wikified &= wikify_section("Related")
                                    $help_file_wikified &= related_section($line, $within_related_section)
                            EndSwitch

                            ContinueLoop
                    EndSwitch

                    Switch $within_example_section
                        Case True
                            $within_example_section = False
                            $help_file_wikified &= get_autoit_example($examples_directory, $file_name)
                            ContinueLoop
                    EndSwitch

                    Switch $within_function_section
                        Case True
                            $within_function_section = False
                            $help_file_wikified &= StringReplace($line, $file_name, '')
                            ContinueLoop
                    EndSwitch

                    Switch $within_description_section
                        Case True
                            $within_description_section = False
                            $help_file_wikified &= "<font size='3' weight='normal'>" & $line & "</font>" & @CRLF
                            ContinueLoop
                    EndSwitch
                    #endregion

                    #region ; Table States
                    Select
                        Case $line = "@@StandardTable1@@"
                            $within_standard_table1 = True
                            $help_file_wikified &= $table_begin & @CRLF
                            ContinueLoop

                        Case $line = "@@ControlCommandTable@@"
                            $within_control_command_table = True
                            $help_file_wikified &= $table_begin & @CRLF
                            ContinueLoop

                        Case $line = "@@ReturnTable@@"
                            $within_return_table = True
                            $help_file_wikified &= $table_begin & @CRLF
                            ContinueLoop

                        Case $line = "@@ParamTable@@"
                            $within_param_table = True
                            $help_file_wikified &= $table_begin & @CRLF
                            ContinueLoop

                        Case $line = "@@End@@"
                            Select
                                Case $within_standard_table1
                                    $within_standard_table1 = False
                                    
                                Case $within_control_command_table
                                    $within_control_command_table = False
                                    
                                Case $within_return_table
                                    $within_return_table = False
                                    
                                Case $within_param_table
                                    $within_param_table = False
                            EndSelect
                            
                            $help_file_wikified &= $table_end & @CRLF

                            ; remove any trailing "|-"
                            $help_file_wikified = StringReplace($help_file_wikified, $table_row_seperator & @CRLF & $table_end, $table_end, 0, $STR_NOCASESENSEBASIC)

                            ContinueLoop
                    EndSelect
                    #endregion

                    #region ; Tables
                    Switch $within_standard_table1
                        Case True
                            $help_file_wikified &= standard_table1($line)
                            ContinueLoop
                    EndSwitch

                    Switch $within_control_command_table
                        Case True
                            $help_file_wikified &= control_command_table($line)
                            ContinueLoop
                    EndSwitch

                    Switch $within_return_table
                        Case True
                            $help_file_wikified &= return_table($line)
                            ContinueLoop
                    EndSwitch

                    Switch $within_param_table
                        Case True
                            $help_file_wikified &= param_table($line)
                            ContinueLoop
                    EndSwitch
                    #endregion

                    $help_file_wikified &= $line & @CRLF

                Case Else ; This is where to output to a file etc.
                    $help_file_wikified = StringRegExpReplace($help_file_wikified, "<[/]?strong>", "'''")

                    $help_file_wikified = StringRegExpReplace($help_file_wikified, "<[/]?b>", "'''")
                    
                    $help_file_wikified = StringReplace($help_file_wikified, "[optional]", "'''[optional]'''", 0, $STR_NOCASESENSEBASIC)

                    $help_file_wikified = StringRegExpReplace($help_file_wikified, "<[/]?i>", "''")

                    $help_file_wikified = StringRegExpReplace($help_file_wikified, "<[/]?br>", '')

                    ; replace " !!!" with '!'
                    Switch StringRegExp($help_file_wikified, "\h*!{2,}")
                        Case 1
                            $help_file_wikified = StringRegExpReplace($help_file_wikified, "\h*!{2,}", '!' & @CRLF)
                    EndSwitch

                    ; replace "!!! " with ''
                    Switch StringRegExp($help_file_wikified, "!{2,}\h*")
                        Case 1
                            $help_file_wikified = StringRegExpReplace($help_file_wikified, "!{2,}\h*", '')
                    EndSwitch

                    $help_file_wikified &= @CRLF & "</font>" & @CRLF & "__NOTOC__" & @CRLF & "__NOEDITSECTION__"

                    write_wikified_document_to_file($help_file_wikified, $save_directory & $file_name & ".txt")

                    ClipPut($help_file_wikified) ; for testing
                    
                    $help_file_wikified = ''

                    ExitLoop
            EndSwitch
        Until False
    Next
EndFunc

#region ; Section Functions
Func related_section(Const $line, ByRef $within_related_section)
    Switch StringInStr($line, "###")
        Case True
            $within_related_section = False
            Return $line & @CRLF

        Case False
            Switch StringInStr($line, ',')
                Case True
                    Local $tmp_line = ''

                    Local Const $related_array = StringSplit($line, ',', $STR_NOCOUNT)

                    For $related_function In $related_array
                        $tmp_line &= wikify_link($related_function) & ", "
                    Next

                    $within_related_section = False

                    ; trim trailing ", "
                    Return StringTrimRight($tmp_line, 2) & @CRLF

                Case Else
                    $within_related_section = False
                    Return wikify_link($line) & @CRLF
            EndSwitch
    EndSwitch
EndFunc
#endregion

#region ; Table Functions
Func standard_table1(Const $line)
    Local Static $column_line = True

    Local Static $column_count = 0

    Switch $column_line
        Case True
            Local Const $columm_headers = StringSplit($line, @TAB, $STR_NOCOUNT)

            Switch @error
                Case 0
                    Local $tmp_line = ''

                    For $header In $columm_headers
                        $tmp_line &= $column_header_begin & $header & @CRLF
                        $column_count += 1
                    Next

                    $column_line = False

                    Return $tmp_line & $table_row_seperator & @CRLF
            EndSwitch

        Case False
            Select
                Case $column_count >= 2
                    Local Const $tmp = StringSplit($line, @TAB, $STR_NOCOUNT)

                    Switch @error
                        Case 0
                            Local $tmp_line = "| "

                            For $i = 0 To $column_count - 2
                                $tmp_line &= $tmp[$i] & " || "
                            Next

                            Local Const $tmp_upbound = UBound($tmp) - 1

                            For $j = $column_count - 1 To $tmp_upbound
                                $tmp_line &= $tmp[$j] & ' '
                            Next

                            $tmp_line &= @CRLF & $table_row_seperator

                            Return $tmp_line & @CRLF
                    EndSwitch

                Case $column_count = 1
                    Local Const $expression = StringTrimRight($line, StringInStr($line, ' ', 0, 1))
                    Local Const $description = StringTrimLeft($line, StringInStr($line, @TAB, 0, 1))
                    Return "| " & $expression & " || " & $description & @CRLF & $table_row_seperator & @CRLF
            EndSelect
    EndSwitch
EndFunc

Func control_command_table(Const $line)
    Local Static $column_line = True

    Local Static $expression = ''

    Switch $column_line
        Case True
            Select
                Case StringInStr($line, "<b>Command, Option</b>")
                    Return $column_header_begin & "'''Command''', '''Option'''" & @CRLF

                Case StringInStr($line, "<b>Command, Option1, Option2</b>")
                    Return $column_header_begin & "'''Command''', '''Option1''', '''Option2'''" & @CRLF

                Case StringInStr($line, "<b>Return Value</b>")
                    $column_line = False
                    Return $column_header_begin & "'''Return Value'''" & @CRLF & $table_row_seperator & @CRLF
            EndSelect

        Case False
            Select
                Case StringLeft($line, 1) <> @TAB
                    $expression = wikify_italics($line)
                    Return ''

                Case StringLeft($line, 1) = @TAB
                    Local Const $description = StringStripWS($line, $STR_STRIPLEADING)
                    Return "| " & $expression & " || " & $description & @CRLF & $table_row_seperator & @CRLF
            EndSelect
    EndSwitch

    Return ''
EndFunc

Func return_table(Const $line)
    Local Static $column_line = True

    Switch $column_line
        Case True
            Select
                Case StringInStr($line, "Success:")
                    Return "| Success: || " & StringTrimLeft($line, 8) & @CRLF & $table_row_seperator & @CRLF

                Case StringInStr($line, "Failure:")
                    $column_line = False
                    Return "| Failure: || " & StringTrimLeft($line, 8) & @CRLF & $table_row_seperator & @CRLF

                Case StringInStr($line, "@error") And StringInStr($line, "Meaning")
                    $column_line = True ; Est morte. Requiescat in pace placidam.

                    Return    $column_header_begin & "@error:" & @CRLF & _
                                    $column_header_begin & "Meaning" & @CRLF & _
                                    $table_row_seperator & @CRLF
            EndSelect
    EndSwitch

    Local Const $description = StringSplit($line, @TAB, $STR_NOCOUNT)[1]

    Switch @error
        Case 0
            $column_line = True            
            Return $table_row_seperator & @CRLF & " | || " & $description & @CRLF
    EndSwitch

    Return ''
EndFunc

Func param_table(Const $line)
    Local Static $is_column_line = True
    
    Local Static $is_expression = False

    Local Static $last_expression = ''
    
    Local Static $expression = ''

    Switch Not $is_expression And $is_column_line
        Case True
            Select
                Case StringLeft($line, 3) = "<b>" Or StringLeft($line, 4) = @TAB & "<b>"
                    Return $column_header_begin & _StringBetween($line, "<b>", "</b>")[0] & @CRLF
            EndSelect
    EndSwitch

    $is_column_line = False
    
    Select
        Case StringLeft($line, 1) <> @TAB
            $is_expression = True
            $expression = no_wiki($line)
            Return ''

        Case StringLeft($line, 1) = @TAB
            $is_expression = False

            Local Const $description = StringStripWS(no_wiki($line), $STR_STRIPLEADING + $STR_STRIPTRAILING)
            
            Switch $expression = $last_expression
                Case True
                    Return @CRLF & $description & @CRLF
                    
                Case False
                    If $expression <> $last_expression Then $last_expression = $expression
                    Return "|-" & @CRLF & "| " & $expression & " || " & $description & @CRLF
            EndSwitch
    EndSelect

    Return ''
EndFunc
#endregion

#region ; Wikify Functions
Func replace_html_links_with_wiki_links1(Const $line, Const $file_name) ; herein lie ferocious dragons
    Local $tmp_line = $line
    
    Local Const $html_link_begin = "<a href="""

    Switch StringRegExp($tmp_line, $html_link_begin)
        Case True
            Local Const $html_link_end = """[\w\s=_""]*>"
            
            Local Const $html_links = _RegExpStringBetween($tmp_line, $html_link_begin, $html_link_end)
            
            Switch @error
                Case 0
                    Local $functions = ''
                    
                    For $link In $html_links
                        Select
                            Case StringRegExp($tmp_line, $html_link_begin & "../")
                                $link = "http://www.autoitscript.com/autoit3/docs/" & StringReplace($link, "../", '')
                                
                            Case StringRegExp($tmp_line, $html_link_begin & "..\\")
                                $link = "http://www.autoitscript.com/autoit3/docs/" & StringReplace($link, "..\", '')
                                $link = StringReplace($link, "\", '/')
                        EndSelect
                        
                        $functions = _StringBetween($tmp_line, """>", "</a>")
                        
                        Switch @error
                            Case 0
                                Local $wiki_link = ''
                                
                                For $function In $functions
                                    $function = StringReplace($function, "()", '', 0, $STR_NOCASESENSEBASIC)
                                    
                                    Select
                                        Case StringRegExp($tmp_line, $html_link_begin & $file_name & "(.htm)?\#[\w\s]*"">[\w\s]*</a>")
                                            $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & $file_name & "(.htm)?\#[\w\s]*"">[\w\s]*</a>", "'''" & $function & "'''")
                                            
                                        Case StringRegExp($tmp_line, $html_link_begin & "(../|..\\)[\w\s\/\\]*.htm"">[\w\s,&()]*[</a>]")
                                            Local Const $last_forward_slash = StringInStr($link, '/', 0, -1)
                                            Local Const $help_file_link = StringLower(StringLeft($link, $last_forward_slash)) & StringRight($link, StringLen($link) - $last_forward_slash)
                                            $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & "(../|..\\)[\w\s\/\\]*.htm"">[\w\s,&()/]*(</a>)", '[' & $help_file_link & ' ' & $function & ']')
                                            
                                        Case StringRegExp($tmp_line, $html_link_begin & $function & ".htm"">[\w\s]*")
                                            $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & $function & ".htm"">[\w\s()]+</a>", "[[" & $function & "]]")
                                            
                                        Case StringRegExp($tmp_line, $html_link_begin & $file_name & "\.htm"">")
                                            Switch $file_name
                                                Case $function Or $link
                                                    $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & $file_name & ".htm"">" & $function & "[()]+</a>", $function)
                                                Case Else
                                                    $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & $file_name & ".htm"">" & $function & "[()]+</a>", "[[" & $function & "]]")
                                            EndSwitch
                                            
                                        Case StringRegExp($tmp_line, $html_link_begin & $link & "[\w\s\=\_""]*>" & $function & "</a>")
                                            $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & $link & "[\w\s\=\_""]*>" & $function & "</a>", '[' & $link & ' ' & $function & ']')
                                            
                                        Case StringRegExp($tmp_line, $html_link_begin & $link & "[\w\s\=\_""]*>")
                                            $tmp_line = StringRegExpReplace($tmp_line, $html_link_begin & $link & "[\w\s\=\_""]*>" & $function & "</a>", "[" & $link & ' ' & $function & "]")
                                    EndSelect
                                Next
                        EndSwitch
                    Next
            EndSwitch
    EndSwitch

    Return $tmp_line
EndFunc

Func _RegExpStringBetween(Const $test, Const $start_pattern, Const $end_pattern)
    Local Const $start = StringRegExp($test, $start_pattern, 1)

    If @error Then Return SetError(1, 0, False)

    Local Const $end = StringRegExp($test, $end_pattern, 1)

    If @error Then Return SetError(2, 0, False)

    Local Const $string_between = _StringBetween($test, $start[0], $end[0])

    Switch @error
        Case 0
            Return $string_between
        Case 1
            Return SetError(3, 0, False)
    EndSwitch
EndFunc

Func replace_html_links_with_wiki_links2(Const $line, Const $file_name)
    Local $tmp_line = $line
    
    Local Const $html_link_begin = "<a name="""
    
    Local Const $html_link_end = "</a>"

    Switch StringRegExp($tmp_line, $html_link_begin & "[\w\s./]*"">[\w\s]*[()]?" & $html_link_end)
        Case True
            Return StringRegExpReplace($line, $html_link_begin & "[\w\s./]*"">[\w\s]*[()]?</a>", '')
    EndSwitch

    Return $line
EndFunc

Func no_wiki(Const $line)
    Local $nowiki = $line
    
    Select
        Case StringInStr($nowiki, '|')
            $nowiki = StringReplace($nowiki, '|', "<nowiki>|</nowiki>")
            ContinueCase
            
        Case StringInStr($nowiki, '[[:')
            $nowiki = StringReplace($nowiki, '[[:', "<nowiki>[[</nowiki>:")
            ContinueCase
            
        Case StringInStr($nowiki, ':]]')
            $nowiki = StringReplace($nowiki, ':]]', ":<nowiki>]]</nowiki>")
    EndSelect
    
    Return $nowiki
EndFunc

Func wikify_section(Const $section_name)
    Return @CRLF & "===<font size=4><div id='Section' style='color:#DB7100;'>" & $section_name & "</div></font>===" & @CRLF
EndFunc

Func wikify_italics(Const $line)
    Local Const $replace = StringReplace($line, "<i>", "''")
    Return StringReplace($replace, "</i>", "''")
EndFunc

Func wikify_link($function, Const $url = '')
    $function = StringReplace($function, "()", '', 0, $STR_NOCASESENSEBASIC)

    Switch $url <> ''
        Case True
            Switch StringInStr($url, "http://")
                Case True
                    Return "[" & StringStripWS($url, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) & ' ' & StringStripWS($function, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) & "]"
            EndSwitch
    EndSwitch

    Return "[[" & StringStripWS($function, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) & "]]"
EndFunc
#endregion

Func write_wikified_document_to_file(Const $help_file, Const $directory)
    Local Const $file_write = FileOpen($directory, $FO_OVERWRITE + $FO_CREATEPATH)

    Switch @error
        Case 0
            FileWrite($file_write, $help_file)

            Switch @error
                Case False
                    FileClose($file_write)
                    Return True

                Case True
                    Return SetError(2, 0, False)
            EndSwitch

        Case True
            Return SetError(1, 0, False)
    EndSwitch
EndFunc

Func get_autoit_example(Const $examples_directory, Const $file_name)
    Local $example_count = 1

    Local $file_array[1] = [$examples_directory & $file_name & ".au3"]

    Do
        Switch FileExists($examples_directory & $file_name & '[' &($example_count + 1) & "].au3")
            Case 1
                ReDim $file_array[$example_count + 1]
                $file_array[$example_count] = $examples_directory & $file_name & '[' &($example_count + 1) & "].au3"
                $example_count += 1

            Case 0
                ExitLoop
        EndSwitch
    Until False

    Local Const $autoit_highlight_begin = "<syntaxhighlight lang='autoit'>"

    Local Const $autoit_highlight_end = "</syntaxhighlight>"

    Local $example_file_read = ''

    Local $autoit_example = ''
    
    Switch $example_count
        Case 1
            $example_file_read = FileOpen($file_array[0], $FO_READ)
            $autoit_example &= $autoit_highlight_begin & @CRLF & FileRead($example_file_read) & $autoit_highlight_end
            FileClose($example_file_read)
            
        Case Else
            For $i = 0 To $example_count - 1
                $example_file_read = FileOpen($file_array[$i], $FO_READ)
                $autoit_example &= @CRLF & "<font style='color:#000080;'>'''Example " & $i + 1 & "'''" & @CRLF & $autoit_highlight_begin & @CRLF & FileRead($example_file_read) & $autoit_highlight_end
                FileClose($example_file_read)
            Next
    EndSwitch    

    Return $autoit_example
EndFunc

Func FileListToArray($sFilePath)
    ; Author ........: Michael Michta
    ; Modified.......: guinness - Added optional parameter to return the full path.
    ;                  jaberwocky6669 - To not return a count in [0] amongst other things.

    ; Ensure a single trailing backslash
    $sFilePath = StringRegExpReplace($sFilePath, "[\\/]+$", '') & '\'

    ; Check if the directory exists
    If Not FileExists($sFilePath) Then Return SetError(1, 0, 0)

    Local Const $sFilter = "*.txt"

    If StringRegExp($sFilter, "[\\/:><\|]|(?s)^\s*$") Then Return SetError(2, 0, 0)

    Local Const $hSearch = FileFindFirstFile($sFilePath & $sFilter)

    If @error Then Return SetError(4, 0, 0)

    Local Const $sFullPath = $sFilePath

    Local $sFileList = ''

    Local $sFileName = ''

    Do
        $sFileName = FileFindNextFile($hSearch)

        If @error Then ExitLoop

        If @extended = 2 Then ContinueLoop

        $sFileList &= '|' & $sFullPath & $sFileName
    Until False

    FileClose($hSearch)

    If $sFileList = '' Then Return SetError(4, 0, 0)

    Return StringSplit(StringTrimLeft($sFileList, 1), '|', $STR_NOCOUNT)
EndFunc
#endregion

Stream Functions.au3

#AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 6 -w 7 -d

#include-once

#include <File.au3>

#region ; String Stream

Global Const $string_stream_close = -2
Global Const $string_stream_eos = -1
Global Const $string_stream_delim_not_found = -1

; Internal
Global Const $string_stream_ready = -3

Func string_stream_read_line(Const $string)
    Local Static $string_array = StringSplit($string, @LF)

    Local Static $element = 0

    Switch $string
        Case $string_stream_close
            $string_array = $string_stream_ready
            $element = 0
            Return True
    EndSwitch

    Select
        Case $string_array = $string_stream_ready
            $string_array = StringSplit($string, @LF)

            $element = 0

            ContinueCase

        Case Not @error
            $element += 1

            Switch $element > $string_array[0]
                Case True
                    $string_array = $string_stream_ready
                    $element = 0
                    Return SetError($string_stream_eos, 0, False)
            EndSwitch

            Return $string_array[$element]

        Case $string_stream_delim_not_found
            $string_array = $string_stream_ready
            $element = 0
            Return SetError($string_stream_delim_not_found, 0, False)
    EndSelect
EndFunc

Func string_stream_read_char(Const $string)
    Local Static $string_array = StringSpLit($string, '')

    Local Static $element = 0

    Switch $string
        Case $string_stream_close
            $string_array = $string_stream_ready
            $element = 0
            Return True
    EndSwitch

    Select
        Case $string_array = $string_stream_ready
            $string_array = StringSplit($string, '')

            $element = 0

            ContinueCase

        Case Not @error
            $element += 1

            Switch $element > $string_array[0]
                Case True
                    $string_array = $string_stream_ready
                    $element = 0
                    Return SetError($string_stream_eos, 0, False)
            EndSwitch

            Return $string_array[$element]

        Case $string_stream_delim_not_found
            $string_array = $string_stream_ready
            $element = 0
            Return SetError($string_stream_delim_not_found, 0, False)
    EndSelect
EndFunc

#endregion

#region ; File Stream

Global Const $file_stream_close = -2
Global Const $file_stream_eof = -1
Global Const $file_stream_other_error = 1

; Internal
Global Const $file_stream_ready = -3
Global Const $file_stream_open_error = -1

Func file_stream_read_line(Const $path)
  Local Static $file_open = FileOpen($path, $FO_READ)

    Switch $path
        Case $file_stream_close
      FileClose($file_open)
      $file_open = $file_stream_ready
      Return True
    EndSwitch

  Select
        Case $file_open = $file_stream_open_error
            $file_open = $file_stream_ready
            Return SetError(2, 1, False)

        Case $file_open = $file_stream_ready
      $file_open = FileOpen($path, $FO_READ)

      Switch $file_open
                Case $file_stream_open_error
                    $file_open = $file_stream_ready
          Return SetError(2, 2, False)
      EndSwitch

      ContinueCase

    Case $file_open >= 0
      Local Const $file_line = FileReadLine($file_open)

      Switch @error
        Case 0
          Return $file_line

        Case $file_stream_eof
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_eof, 0, False)

        Case $file_stream_other_error
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_other_error, 0, False)
            EndSwitch
  EndSelect
EndFunc

Func file_stream_read_char(Const $path)
  Local Static $file_open = FileOpen($path, $FO_READ)

    Switch $path
        Case $file_stream_close
      FileClose($file_open)
      $file_open = $file_stream_ready
      Return True
    EndSwitch

  Select
        Case $file_open = $file_stream_open_error
            $file_open = $file_stream_ready
            Return SetError(2, 1, False)

    Case $file_open = $file_stream_ready
      $file_open = FileOpen($path, $FO_READ)

      Switch $file_open
                Case $file_stream_open_error
                    $file_open = $file_stream_ready
          Return SetError(2, 2, False)
      EndSwitch

      ContinueCase

    Case $file_open >= 0
      Local Const $file_line = FileRead($file_open, 1)

      Switch @error
        Case 0
          Return $file_line

        Case $file_stream_eof
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_eof, 0, False)

        Case $file_stream_other_error
          $file_open = $file_stream_ready
          Return SetError($file_stream_other_error, 0, False)
      EndSwitch
  EndSelect
EndFunc

Func file_stream_overwrite_line(Const $line, Const $path)
  Local Static $file_open = FileOpen($path, $FO_OVERWRITE)

    Switch $path
        Case $file_stream_close
      FileClose($file_open)
      $file_open = $file_stream_ready
      Return True
    EndSwitch

  Select
        Case $file_open = $file_stream_open_error
            $file_open = $file_stream_ready
            Return SetError(2, 1, False)

    Case $file_open = $file_stream_ready
      $file_open = FileOpen($path, $FO_READ)

      Switch $file_open
        Case $file_stream_open_error
          Return SetError(2, 2, False)
      EndSwitch

      ContinueCase

    Case $file_open >= 0
      Local Const $file_line = FileWriteLine($file_open, $line)

      Switch @error
        Case 0
          Return $file_line

        Case $file_stream_eof
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_eof, 0, False)

        Case $file_stream_other_error
          $file_open = $file_stream_ready
          Return SetError($file_stream_other_error, 0, False)
      EndSwitch
  EndSelect
EndFunc

Func file_stream_overwrite_char(Const $char, Const $path)
  Local Static $file_open = FileOpen($path, $FO_OVERWRITE)

    Switch $path
        Case $file_stream_close
      FileClose($file_open)
      $file_open = $file_stream_ready
      Return True
    EndSwitch

  Select
        Case $file_open = $file_stream_open_error
            $file_open = $file_stream_ready
            Return SetError(2, 1, False)

    Case $file_open = $file_stream_ready
      $file_open = FileOpen($path, $FO_READ)

      Switch $file_open
        Case $file_stream_open_error
          $file_open = $file_stream_ready
          Return SetError(2, 2, False)
      EndSwitch

      ContinueCase

    Case $file_open >= 0
      Local Const $file_line = FileWrite($file_open, $char)

      Switch @error
        Case 0
          Return $file_line

        Case $file_stream_eof
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_eof, 0, False)

        Case $file_stream_other_error
          $file_open = $file_stream_ready
          Return SetError($file_stream_other_error, 0, False)
      EndSwitch
  EndSelect
EndFunc

Func file_stream_append_line(Const $line, Const $path)
  Local Static $file_open = FileOpen($path, $FO_APPEND)

    Switch $path
        Case $file_stream_close
      FileClose($file_open)
      $file_open = $file_stream_ready
      Return True
    EndSwitch

  Select
        Case $file_open = $file_stream_open_error
            $file_open = $file_stream_ready
            Return SetError(2, 1, False)

    Case $file_open = $file_stream_ready
      $file_open = FileOpen($path, $FO_READ)

      Switch $file_open
        Case $file_stream_open_error
          $file_open = $file_stream_ready
          Return SetError(2, 2, False)
      EndSwitch

      ContinueCase

    Case $file_open >= 0
      Local Const $file_line = FileWriteLine($file_open, $line)

      Switch @error
        Case 0
          Return $file_line

        Case $file_stream_eof
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_eof, 0, False)

        Case $file_stream_other_error
          $file_open = $file_stream_ready
          Return SetError($file_stream_other_error, 0, False)
      EndSwitch
  EndSelect
EndFunc

Func file_stream_append_char(Const $char, Const $path)
  Local Static $file_open = FileOpen($path, $FO_APPEND)

    Switch $path
        Case $file_stream_close
      FileClose($file_open)
      $file_open = $file_stream_ready
      Return True
    EndSwitch

  Select
        Case $file_open = $file_stream_open_error
            $file_open = $file_stream_ready
            Return SetError(2, 1, False)

    Case $file_open = $file_stream_ready
      $file_open = FileOpen($path, $FO_READ)

      Switch $file_open
        Case $file_stream_open_error
          $file_open = $file_stream_ready
          Return SetError(2, 2, False)
      EndSwitch

      ContinueCase

    Case $file_open >= 0
      Local Const $file_line = FileWrite($file_open, $char)

      Switch @error
        Case 0
          Return $file_line

        Case $file_stream_eof
          FileClose($file_open)
          $file_open = $file_stream_ready
          Return SetError($file_stream_eof, 0, False)

        Case $file_stream_other_error
          $file_open = $file_stream_ready
          Return SetError($file_stream_other_error, 0, False)
      EndSwitch
  EndSelect
EndFunc

#endregion
Edited by jaberwocky6669

Share this post


Link to post
Share on other sites
guinness

That is pretty neat. I like it.


UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
jaberwacky

I believe there was an effort to bring the helpfile over to the wiki; but. the helpfile is so large and subject to change that it just didn't really get off the ground

Anyways, updated to work better.

Share this post


Link to post
Share on other sites
James

I believe there was an effort to bring the helpfile over to the wiki; but. the helpfile is so large and subject to change that it just didn't really get off the ground

The source of the help file is text based which then gets built into HTML. I guess we'd probably look to do the same thing (from text to Wiki) rather than using the output, in case the HTML output for the wiki is corrupt.

Share this post


Link to post
Share on other sites
guinness

Actually, I dunno if it's possible. I don't think Jon can just drop a converted directory to a wiki folder and expect it to work. I could be wrong, but I'm not familar with the backend of a wiki, I guess it's not like a directory of html files per wiki entry?

Edited by guinness

UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
jaberwacky

Latest update: as far as I can tell this pretty much does the job.  I have however been awake for twenty hours.  In the op are a list of wiki pages with the latest examples.

Share this post


Link to post
Share on other sites
jaberwacky

Ok, latest update will make wikified documents out of all of the functions.  Just go through the script and set the paths to your environment.  It's pretty self explanatory.  I need to go to bed.

Edited by jaberwocky6669

Share this post


Link to post
Share on other sites
guinness

Cool. I have some suggestions but we can look at those at a later date.


UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
guinness

My suggestion was going to be not to highlight the parameters, do you remember the topic Jos created about adding this to the help file?


UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
guinness

Yeah better, as it's pseudo code. Thanks.


UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
robertcollier4

Usually having the same content in two different locations is a recipe for future disaster in terms of inconsistency and confusion - especially for something important such as documentation where small technical details change over time and where small technical details can break programs.

I don't think that the help file should be in two separate locations. Either "autoitscript.com/autoit3/docs/" or "autoitscript.com/wiki/" but not both.

http://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm

http://www.autoitscript.com/wiki/AutoItSetOption

Also I'm not really a fan of the MediaWiki layout. The left sidebar is a huge waste of space and is hardly ever used. Left sidebar's should contain Table of Contents, not "Toolbox" elements (which could rather be put in a dropdown menu on the top right". A left sidebar should contain a navigational tree with a hierarchy of the pages - otherwise it should be removed.

Edited by robertcollier4

Share this post


Link to post
Share on other sites
guinness

Don't worry, this is just a proof of concept and is actually food for though in terms of maybe moving the help file to the wiki. Though there are other issues the Dev team and myself would need to discuss, like do we want everyone having rights to edit the help files? Maybe not.


UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
jaberwacky

Yeah, I'm just doing this because I saw that there was an effort to mirror the helpfile at the wiki.  It never really made it for some reason or another.  So, this is here to 1) provide me with some learning experience 2) to occupy my time 3) becuase if the idea of mirroring the helpfile is accepted then I hope this script can assist in that effort.

Share this post


Link to post
Share on other sites
guinness

Forgot to mention that I am using the latest beta heplfile.

I could tell, as I re-wrote StringSplit() a week ago.

UDF List:

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

Updated: 22/04/2018

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×