Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; jetzt > patchname ist in zweiter column und zweiini! > lösen später > alles aus EINER ini section rauslesen, auch den patch!
#SingleInstance force
Gui, Add, ListView, x26 y32 w290 h540 gmylist AltSubmit , Progs ;AltSubmit
Gui, Add, Button, x216 y582 w100 h30 gdelete , Delete
Gui, Add, Button, x106 y582 w100 h30 gadd , Add
Gui, Show, x1000 y100 h635 w347, MyBar 0.1a
IniRead, content, settings.ini, Progs
Loop, parse, content, `n ;shows sections
{
[color=#FF0000] sect := A_LoopField
SplitPath, sect, name, dir, ext, name_no_ext, drive ;fetch all info
LV_Add("", name_no_ext)[/color]
}
return
add:
FileSelectFile, file, 3, , open a file,
if file =
return
else
SplitPath, file, name, dir, ext, name_no_ext, drive ;fetch all info
LV_Add("", name_no_ext)
[color=#00BF40] IniWrite, %file%, settings.ini, Progs, %name_no_ext%[/color]
return
delete:
if ! selectedrow
return
selectedrow := LV_GetNext(0)
LV_Delete(selectedrow)
[color=#FF0000]IniDelete, settings.ini, Progs,[/color]
return
mylist:
selectedrow := LV_GetNext(0)
if ! selectedrow
return
if A_GuiEvent = DoubleClick
{
LV_GetText(filedir, A_EventInfo, 1)
run, %filedir%
}
return
GuiClose:
ExitApp
so i can create an ini like this: [Progs]
Desert=C:\Users\Public\Pictures\Sample Pictures\Desert.jpg
and i can also read the names! but i'm failing in run the variable keysaction and cannot delete them
thank you