Page 1 of 2

Feature request: application start/exit-time script

Posted: 27 Jun 2015 20:34
by bdeshi
Hey Don, I think someone had asked for this before, but please could you add this? Look, I even made a changelog entry that explains everything!

Code: Select all

v15.40.0*** - 2015-0*-** **:**
  +++ Introducing Startup/Exit scripts: scripts that run at XY startup and exit.
      Create two scripts as <xypath>\_Initialize.xys and <xypath>\_Terminate.xys.
      The first one will be executed right after XY is started and the second one
      just before quitting.
      This way, you can stop (ab)using shortcuts and commandline arguments to run
      XYplorer with certain commands. Just add them straight to _Initialize.xys.
      Notes:
      - Hold SHIFT while XYplorer is starting to skip loading the Startup script,
        similarly, hold SHIFT and quit XYplorer to skip loading the Exit script.
      - New instances started with /fresh commandline option or via SC ::fresh or
        ::freshhere do not load these scripts.
    + Configuration | Startup & Exit: Added option "Load Startup/Exit scripts".
      Factory default is off.
    + Added new command: File | Exit Without Loading Exit script.
    + SC exit enhanced: Added new mode 'x', for to startup/exit scripts.
      Syntax: exit [mode]
        mode:
              x  = skip loading startup/exit scripts.
      example:
              :: exit 'xn'; //exit with saving, without loading exit script
              :: exit 'xr'; //restart, without loading either exit/start script
    + Added new commandline option /noinitscript to start XY without loading the
     startup script.
now you tell me, isn't that just asking to be added to XY? almost all prowertools have init scripts!

Re: Feature request: application start/exit-time script

Posted: 27 Jun 2015 21:44
by Stef123
SammaySarkar wrote: Look, I even made a changelog entry that explains everything!
Hehe :titter: - quite a good idea, actually :tup: can be used as a basis for the real thing that follows later :biggrin:

Re: Feature request: application start/exit-time script

Posted: 27 Jun 2015 21:52
by SkyFrontier
Unnoficial website and help typos:
- New instances started with /fresh commandline option or via SC ::fresh or
::freshhere DO not load these scripts.

:biggrin:

Re: Feature request: application start/exit-time script

Posted: 28 Jun 2015 00:22
by Marco

Code: Select all

Hold SHIFT while XYplorer is starting to skip loading the Startup script
How can you pass a modifier key when double-clicking an executable? I don't think it's possible.

Re: Feature request: application start/exit-time script

Posted: 28 Jun 2015 06:28
by bdeshi
open XYplorer, and then hold SHIFT, till it's started. Since the script runs after XYplorer has started completely (gained all senses), it can check to see if SHIFT is pressed. Besides It's still just a idea, the job of making it a foolproof complete feature is in Don's hands! :kidding:


@TypoFrontier: typo done fixed! :P

Re: Feature request: application start/exit-time script

Posted: 29 Jun 2015 04:36
by ksarnelli
I like this idea...a lot! Maybe even have a way to mark an existing script to become the startup or exit script.

Re: Feature request: application start/exit-time script

Posted: 29 Jun 2015 17:40
by TheQwerty

Code: Select all

. . .
<xypath>\_Initialize.xys and <xypath>\_Terminate.xys.
. . .
Why <xypath>?

Either the scripts should be in <xyscripts> or they should be configuration options.
Possibly with support for also specifying them within Admin.ini.

Re: Feature request: application start/exit-time script

Posted: 29 Jun 2015 19:50
by bdeshi
my idea of giving the impression that these scripts are VIP. Also to prevent tampering somewhat. Not a critical rule though.

Re: Feature request: application start/exit-time script

Posted: 29 Aug 2015 06:04
by bdeshi
bumpling

Re: Feature request: application start/exit-time script

Posted: 29 Aug 2015 17:14
by admin
Yeah, maybe not even that bad. ;) I especially like the ready-made change log. That's the way to go, guys! :tup:

Small question: Should this script be loaded before or after the one passed via command line (if any)?

Please bumple again after 15.70 is out.

Re: Feature request: application start/exit-time script

Posted: 29 Aug 2015 18:39
by bdeshi
Running /script= first sounds right. Since there will be a cmdline switch to block these scripts, it makes sense if all cmd args are processed first.

Gleefully awaiting to remind of yet another super feature! :tup:

edited.

Re: Feature request: application start/exit-time script

Posted: 08 Sep 2015 11:15
by PeterH
Wish in general: :tup: :tup: :tup:

But: scripts may depend on Perm Variables set by Init Script - so I would first start Init Script, then /script=
(There might be an XY-var to query for existence/name of a /script= in Init Script.)

Re: Feature request: application start/exit-time script

Posted: 08 Sep 2015 11:28
by PeterH

Code: Select all

    + Configuration | Startup & Exit: Added option "Load Startup/Exit scripts".
      Factory default is off.
Isn't it better then to define the name of the script, instead of just a flag? In this case no name says "No Init Script", and I could specify e.g. system\init.xys (or whatever) to request it's name and also (sub-)location.
(I already have a \system directory in <xyscripts> :roll: )

Re: Feature request: application start/exit-time script

Posted: 02 Oct 2015 08:11
by bdeshi
admin wrote:Please bumple again after 15.70 is out.
woah, 80's are here already! badabump! :ghost:

Re: Feature request: application start/exit-time script

Posted: 05 Oct 2015 13:00
by autocart
No use to bump now that Don is on vacation.
Especially since he sometimes seems to be overwhelmed by the many posts after he comes back...
Need to wait with bumping until he is here again. ;-)