276
PublicDomainVic / INIalaContro.ahk - AutoHotkey script to generate Launcher.ini
« on: April 17, 2022, 06:40 PM »
Surprise release! (Not even I knew it would be finished today )
INIalaContro.ahk file attached.
Code: Autohotkey [Select]
- ; INIalaContro.ahk
- ; Made for: Contro
- ; Thread: https://www.donationcoder.com/forum/index.php?topic=52258.0
- ;
- ; Author: publicdomainvic
- ; License: CC0 1.0 Universal - Public Domain Dedication
- ; Website: https://publicdomain.is
- ; Get folder
- FileSelectFolder, Folder
- ; Open Launcher.ini for write
- file := FileOpen(Folder . "\\Launcher.ini", "w `n")
- ; Write header
- file.WriteLine("[General]")
- file.WriteLine("numRows=25")
- file.WriteLine("numCols=9")
- file.WriteLine("[Titles]")
- ; Set paths array
- pathArray := Array()
- ; Loop files and folders
- {
- ; Split the path
- ; Process lnk and url
- Switch A_LoopFileExt
- {
- Case "lnk":
- pathArray.Push(OutTarget)
- Case "url":
- pathArray.Push(ExtractedURL)
- }
- }
- ; Print paths
- file.WriteLine("[Paths]")
- ; Loop paths array for write
- for index, element in pathArray
- {
- file.WriteLine("Path" . index . "=" . element)
- }
- ; Close the file
- file.Close()
- ; Advise user
- MsgBox Launcher.ini created!
INIalaContro.ahk file attached.