read and import setting

Features wanted...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

read and import setting

Post by yusef88 »

let's say, we have some customized settings stored in external text file like that:

Code: Select all

[Settings] 
key=value
key=value

[FileAssoc]
1=xxxxxx
2=xxxxxx
can we make XY read those keys and import them into current XYplorer.ini in a simple method
without the need to modify each key individually using the command 'setkey'?

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: read and import setting

Post by highend »

No, how should XY know which settings these are?^^
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: read and import setting

Post by yusef88 »

by making some comparisons: match the section name and its subkey with the equivalent in xyplorer.ini
It's just an idea. and thanks for your reply

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: read and import setting

Post by highend »

And how do you think "make some comparisons" would work? By looping over them^^
One of my scripts helped you out? Please donate via Paypal

VeeGee

Re: read and import setting

Post by VeeGee »

This would actually be a pretty cool idea. Upon startup, XY could check if the standardized file name exists, e.g. XYCustom.ini, parse it and override any settings. Much simpler than editing the full INI file.

Similar idea to how Vivaldi (browser) handles custom CSS files. You drop them in a folder, tell Vivaldi where to look and then it loads your CSS modifications after it load its' own.

eil
Posts: 1864
Joined: 13 Jan 2011 19:44

Re: read and import setting

Post by eil »

I'd say this is possible, but can't call it simple way, and result will just copy desired key+values in INI, so one will have to restart XY to get migrated settings working. If the plan was to virtually "add setting" over existing ones, without modifying main INI, then it's not possible for now.
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 14925
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: read and import setting

Post by highend »

The whole thing can't be done currently (without being implemented in XY itself) without either:
- An external tool that merges the .ini before XY gets started (which would be easy enough)
- Starting XY twice (one time with a script that imports the settings, starting to tray and another instance afterwards that loads normally). Makes no sense because of pure startup time
Similar idea to how Vivaldi (browser) handles custom CSS files. You drop them in a folder, tell Vivaldi where to look and then it loads your CSS modifications after it load its' own.
Yeah, in the way like patched toolbar icons work, a standard folder in <xydata> and XY reads files (alphabetically) from it to apply their .ini settings. Last match wins...
One of my scripts helped you out? Please donate via Paypal

Post Reply