Page 1 of 2
Changing Locations CEAs-Enable Disable setting
Posted: 18 Dec 2020 20:47
by klownboy
Hi Don, I rather like the idea of the change location CEAs -BeforeBrowse, AfterBrowse and AfterPaint, but I'm thinking it might be a good idea if users were able to enable / disable this feature on the fly. I realize it doesn't create much overhead, if any, but then again if for example we accomplished all are work that may require XY looking at location changes, why not be able to disable it, immediately and on the fly. Sure we could disable it with a SC setkey, but that requires a restart. Would it be possible to have a SC "setting" item for the Changing Locations - browse CEAs - that would allow users to enable or disable all 3 CEAs together at one time (i.e., setting "CEA_ChangingLocations", [value (1|0|r)] ). In affect this would change the value of the 3 location change browse CEAs from "script" to "none" or via versa (i.e., from "1" to "0" or visa versa in the ini file). Thanks.
Re: Changing Locations CEAs-Enable Disable setting
Posted: 18 Dec 2020 21:13
by highend
I haven't noticed any slowdowns (and I'm even invoking git by one of my CEA changing location scripts) yet but the option to en- / disable them on the fly would be a good addition, so:
+1
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 10:20
by admin
What I already planned is a checkbox in front of each CEA, so you can turn it off without losing your Action setting. But for your use case that would mean 3 ticks. Probably would not make you much happier... ?
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 10:31
by highend
Just invent a new
config() script command that lets us change all settings on the fly without opening the config window

Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 10:34
by admin
hihi

Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 11:01
by highend
That would be the next big thing after you've added Help - List All Commands... (configuration wise).
Even preconfiguring a new instance would be a piece of cake with this and you could forget about
viewtopic.php?f=5&t=22499

Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 11:08
by admin
Can't you script this?

Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 11:28
by highend
No, I can't. The current state of settings can be only be get by savesettings 1, "<some temp .ini file>" and a getkey() or getsection() reading from that temp .ini file.
But you can't apply these settings without saving them to the original .ini and the necessity to restart XY afterwards to reread it...
The easiest way to provide scripting support for changing options on the fly would be:
Check the last modified date of XYplorer.ini on startup
Monitor the last modified date while running and if it changes, live reload the file and apply it's settings (without the necessity to restart XY)
Otherwise: No chance...
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 11:44
by admin
Well, it won't happen I'm afraid. It would be an extreme burden to make and to maintain.
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 12:28
by klownboy
admin wrote: ↑14 Jan 2021 11:44
Well, it won't happen I'm afraid. It would be an extreme burden to make and to maintain.
All I wanted was a SC "setting" command that would turn off/existing
all location related CEAs (e.g., setting CEA_ChangingLocations, '0'). I don't care or need to turn individual change location types off. I thought SC setting would be the way to go. As highend mentioned anyway you do this currently requires a restart which is never much good for a smooth work flow.
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 17:00
by admin
Okay, next beta:
Code: Select all
+ Custom Event Actions: Now you can temporarily turn off all "Changing
Locations" CEAs for this session (= not remembered across sessions).
tweak("SkipBrowseEvents", ""); //toggle
tweak("SkipBrowseEvents", 1); //set
tweak("SkipBrowseEvents", 0); //unset
echo tweak("SkipBrowseEvents"); //get
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 19:28
by klownboy
Re: Changing Locations CEAs-Enable Disable setting
Posted: 14 Jan 2021 19:41
by admin
I'd say tweak() is a semi-tweak. It's a non-documented scripting command.

Re: Changing Locations CEAs-Enable Disable setting
Posted: 09 Feb 2021 21:25
by klownboy
Don, I'm really liking and getting some use out of the new tweak("SkipBrowseEvents", 0/1). Is there any chance you could make a "p" permanent option flag for that tweak. In other words it would be exactly like changing the value in Configuration > CEA > Changing locations > the "Action" dropdown from "None" to "Script" or visa versa. Of course the tweak wouldn't affect any script if entered. It would be identical to the changing the value in Configuration manually which does take affect immediately and does not require a save (no changes is indicated on the toolbar Save button). Thanks.
Re: Changing Locations CEAs-Enable Disable setting
Posted: 10 Feb 2021 12:03
by admin
Well, I just could save it between sessions. Is that what you mean?