Jump to content

Generate Help Files For Your Programs...


The Ape
 Share

Recommended Posts

  • 3 weeks later...
  • 2 years later...

Add these lines to the top of the script

#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>

and replace _PreLoop() function with the function below:

Func _PreLoop()
    ;;;;;;;;;;;;;;;;;;set tags
    _FileReadToArray(@ScriptDir & "\Files\tags.txt", $GetTags)
    _FileReadToArray(@ScriptDir & "\Files\custom.txt", $GetCusTags)

    If IsArray($GetTags) Then
        $i = 1
        Do
            If Not $GetTags[$i] = "" Then GUICtrlSetData($TagList, $GetTags[$i] & @CRLF & "|")
            $i += 1
        Until $i = $GetTags[0] + 1
    EndIf
    If IsArray($GetCusTags) Then
        $i = 1
        Do
            If Not $GetCusTags[$i] = "" Then GUICtrlSetData($TagList, $GetCusTags[$i] & @CRLF & "|")
            $i += 1
        Until $i = $GetCusTags[0] + 1
    EndIf
    _GUICtrlComboBox_SetCurSel($TagList, 0)
    ;;;;;;;;;;;;;;;;;;set faves
    $IniCat = IniReadSection($GetIni, "Fave")
    If @error = 1 Then
        ;;;;
    Else
        $i = 1
        Do
            If FileExists($IniCat[$i][0]) Then
                $MediaSplit = _PathSplit($IniCat[$i][0], $szDrive, $szDir, $szFName, $szExt)
                $File = $MediaSplit[3] & $MediaSplit[4]
                GUICtrlSetData($Fave, $File, 0)
            Else
                IniDelete($GetIni, "Fave", $IniCat[$i][0])
            EndIf
            $i += 1
        Until $i = $IniCat[0][0] + 1

    EndIf
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;set font
    $GetFont = IniRead($GetIni, "Com", "Font", 0)
    If @error Then
        ;;;;
    Else
        $font = StringSplit($GetFont, "-")
        If @error Then
            ;;;;
        Else
            GUICtrlSetFont($ContentEdit, $font[1], $font[2], $font[3], $font[4])
            If @error Then
                ;;;;
            Else
                GUICtrlSetColor($ContentEdit, $font[5])
                If @error Then
                    ;;;;
                EndIf
            EndIf
        EndIf
    EndIf
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Set Projects
    $GetProj = IniRead($GetIni, "Com", "Project", "Dir")
    If $GetProj = "" Or FileExists(@ScriptDir & "\Files\Projects\" & $GetProj) = 0 Then
        $ProPath = "Dir"
    Else
        $ProPath = $GetProj
    EndIf
    DirCreate(@ScriptDir & "\Files\Projects\" & $ProPath & "\Bin")
    $GetCat = _FileListToArray(@ScriptDir & "\Files\Projects\", "*", 2)
    If @error = 4 Then
        ;;;;
    Else
        $i = 1
        Do
            GUICtrlSetData($Project, $GetCat[$i], 0)
            $i += 1
        Until $i = $GetCat[0] + 1
    EndIf
    _GUICtrlListBox_SelectString($Project, $ProPath)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WinActivate($GUI)
    _Populate()
    Sleep(250)
    GUISetState(@SW_SHOW, $GUI)
EndFunc ;==>_PreLoop

It should run without any error message but I did not test all the buttons etc.!

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...