Conversation
only a few thingss left for me to do - Filedrop (unless ninju wants to do that) - Adding some more stuff to make imports easier and more diagnostic - GUI Finalisation - Finding a place in misc for the gui button - RC commands to export and load presets.
Noobyguy775
left a comment
There was a problem hiding this comment.
TODO:
- adjust the config option for every setting, just using
configTypes - change status to use UpdateInt and the corresponding
ImportPreset()function as a SendMessage
mmm other things that im forgetting
submacros/natro_macro.ahk
Outdated
| @@ -1,4 +1,4 @@ | |||
| /* | |||
| /* | |||
There was a problem hiding this comment.
usually not a good sign that either the encoding or eol has changed
There was a problem hiding this comment.
Resolved in my commit (vscode did it automatically, i assume it was likely eol sequence)
|
|
||
| nm_importConfig() { | ||
| global | ||
| global config := Map() |
There was a problem hiding this comment.
if it's going to be a global might as well have it in a lib file tbh. (or with the rest of the super-globals)
submacros/natro_macro.ahk
Outdated
| } | ||
|
|
||
| PackAll(presetname) { | ||
| global |
There was a problem hiding this comment.
if you're using assume-global (which you shouldn't be in functions like this!), you need to mark the variables in these functions as locals, such as fileData, existingFiles, filepath, fs
There was a problem hiding this comment.
You can do this at the start of the function but it's probably easier to do it while defining the functions, e.g.
local fileData := Map()
submacros/natro_macro.ahk
Outdated
| return fileData | ||
| } | ||
|
|
||
| SavePreset(presetname, presetContent) { |
There was a problem hiding this comment.
I rewrote this function as we dont really need to know all of the preset files just to save one of them
submacros/natro_macro.ahk
Outdated
| } | ||
| } | ||
|
|
||
| SavePreset(presetname, JSON.stringify(settings)) |
There was a problem hiding this comment.
read the comment above from my changes
There was a problem hiding this comment.
"Im gonna let you do the rest of the work, but it should be as easy as iterating through nm_ReadIni and doing Map.Delete() for any blacklisted names"
| PresetCont := FileRead("settings\presets\" preset ".nm") | ||
| try parsed := JSON.parse(PresetCont) | ||
| catch as e { | ||
| msgbox e.Message |
There was a problem hiding this comment.
this isnt how we would want to handle it in the release but i think u know that
submacros/natro_macro.ahk
Outdated
| } | ||
|
|
||
| UnpackAll(preset) { | ||
| global |
There was a problem hiding this comment.
this doesnt need to be a global function at all
when you say use update int, do you mean to update it and check it in ImportPreset in the main file to avoid using wparam? |
Sorry, I think i overlooked the code. An UpdateInt wouldn't work here (we want it to be a sendmessage for now, since you'll need to call a function) But a more elegant way is to use |
changed approach to use a_index instead of file pos in dir (way fuckin smarter jesuss) also just rewrote every command and left a todo command for later if thats wanted
I want to switch branches rn, but i cant overwrite my stash.
nm_preset stuff