So, I'm stuck with my script.. Basically you enter name for example banana press "+" to add it to the list which will be stored in settings.ini after that when you press start it will open notepad and print out your list. And delete simply clears settings.ini. I haven't been able to figure out how to get multiple items in the list, the old one is always replaced. And also how to print the settings.ini into the list box when I run the script first time.
settings.ini
I was thinking of being able to click and delete one entry from the list instead of clearing it all.. once I get multiple entries on the list even working..
This has been evolving while I've learned new stuff so I'm pretty sure things could be done differently.. in a better way. Help and tips appreciated!
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> $IniFile = "Settings.ini" $Form1 = GUICreate("Test", 203, 363, 239, 175) $Input = GUICtrlCreateInput("Enter Name Here", 16, 16, 129, 24) GUICtrlSetFont(-1, 11, 400, 0, "Arial") $Add = GUICtrlCreateButton("+", 160, 16, 25, 25, $WS_GROUP) $List = GUICtrlCreateList("", 16, 56, 169, 253) $Delete = GUICtrlCreateButton("Delete", 16, 328, 81, 25, $WS_GROUP) $Start = GUICtrlCreateButton("Start", 112, 328, 73, 25, $WS_GROUP) GUISetState(@SW_SHOW) while 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit case $Add IniWrite($IniFile, "Names", "item", GUICtrlRead($Input)) $List = GUICtrlCreateList("", 16, 56, 169, 253) GUICtrlSetData(-1, GUICtrlRead($Input), "") Case $Delete IniDelete ("Settings.ini", "Names", "item") Case $Start $ReadList = IniRead($IniFile, "Names", "item", "ERROR") Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send ("This is the list: ") Send ($ReadList) EndSwitch WEnd
settings.ini
[ code='text' ] ( Popup )
[Names] item=Banana
I was thinking of being able to click and delete one entry from the list instead of clearing it all.. once I get multiple entries on the list even working..
This has been evolving while I've learned new stuff so I'm pretty sure things could be done differently.. in a better way. Help and tips appreciated!