Say I want to toggle on some Command ID via a custom button, so I edited its On left click:
#401; #403; #405; #406; #407; #408; #413; #415
Now, each time I press this button, each Command ID is toggled On or Off depending of its current state.
Each time I press that button I want to toggle *all* the Command IDs either all On or all Off.
How can I check the current state of a Command ID that is a toggle?
thanx
--
fabio vitale
How to check for the state of a Command ID toggle?
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to check for the state of a Command ID toggle?
There are only a few #commands where the sc get() can retrieve the current state. None of the ones you're using...
There is not much to do apart from bringing all your #commands in a consistent state (e.g. all off). You're lost if you switch one of them to a different state and then use your button again.
There is not much to do apart from bringing all your #commands in a consistent state (e.g. all off). You're lost if you switch one of them to a different state and then use your button again.
One of my scripts helped you out? Please donate via Paypal
-
fabvit2
- Posts: 42
- Joined: 05 Sep 2014 11:01
Re: How to check for the state of a Command ID toggle?
Anyway if I use a permanent variable I can get in a situation where one of the toggle Command ID was modified outside my script (i.e. from menu Tools -> Customize Lists)...
So I need something to toggle them either *all* On or *all* Off
--
fabio vitale
So I need something to toggle them either *all* On or *all* Off
--
fabio vitale
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to check for the state of a Command ID toggle?
There is probably only one way to do what you want:
In your script, save settings first, read out
<xydata>\Panes\1\t\pane.ini
and evtl.
<xydata>\Panes\2\t\pane.ini
find out, how "Style=<number>"
in all sections is build (or at least how your #commands influence it),
deduct your settings from and and depending on the value,
toggle different ones.
Should I say, have fun?
In your script, save settings first, read out
<xydata>\Panes\1\t\pane.ini
and evtl.
<xydata>\Panes\2\t\pane.ini
find out, how "Style=<number>"
in all sections is build (or at least how your #commands influence it),
deduct your settings from and and depending on the value,
toggle different ones.
Should I say, have fun?
One of my scripts helped you out? Please donate via Paypal
-
bdeshi
- Posts: 4256
- Joined: 12 Mar 2014 17:27
- Location: Asteroid B-612
- Contact:
Re: How to check for the state of a Command ID toggle?
and then reload the tabsets.highend wrote:find out, how "Style=<number>"
in all sections is build (or at least how your #commands influence it),
deduct your settings from and and depending on the value,
toggle different ones.
edit: btw,
for this step, this pane.ini breakdown might help. Fair warning: this might've become obsolete.find out, how "Style=<number>"
in all sections is build (or at least how your #commands influence it),
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
fabvit2
- Posts: 42
- Joined: 05 Sep 2014 11:01
Re: How to check for the state of a Command ID toggle?
> Should I say, have fun?
I'll avoid to modify any value through the menu ;-)))
I'll avoid to modify any value through the menu ;-)))
XYplorer Beta Club