seperate exe... Thread last updated on 2004-07-02 16:34:24

Posted by member 108633 on 2004-07-01 10:40:35

... that loads with litestep. Of coarse it will be a small file that uses very little memory and system resources. The exe monitors litestep, and when litestep is no longer running, then it executes the "Switch to default theme" shortut. That way you'll never have to restart again. What do you guys think?

Posted by member 35 on 2004-07-01 14:46:26 link

mmm, a shell manager like shellon or carapace can do that.

Posted by member 103254 on 2004-07-01 14:55:18 link

If LS isn't running anymore, you can't have it switch to default theme :P

Like sryo said, most shell managers have shell crash protection, so when your shell crashes, it pops up asking you to choose a shell to [re]load.

Posted by member 108633 on 2004-07-01 17:18:34 link

oh, but running "Switch to default theme" also loads litestep.

Posted by member 35 on 2004-07-01 17:32:47 link

yeah, but it loads it using the default theme :P now why would i want that if i was using another theme?

Posted by member 108633 on 2004-07-01 17:33:31 link

That might have what caused litestep to crash.
If this were a programming language:
:litestep_check
if (litestep.exe norunning) {
start C:\Litestep\utilities\LSThemeInstaller.exe /switch "austerity"
}
Timer {
goto :litestep_check (10000) // restarts app every 10 sec.
}

Posted by member 7991 on 2004-07-02 01:04:48 link

Perhaps Litestep could monitor whether it exited properly the last time it was executed. If not, on next start it could ask the user whether they would like to switch to the default theme (and maybe give the option to select another theme).

A further extension of this idea might alter the Themelist.rc entries to reflect whether Litestep was exited correctly the last time each theme was used. On startup of Litestep it might check whether it had previously shutdown correctly. If not, it would add a suffix to the displayed theme name (determined by the current themeselect.rc setting, ie: "Gathering -NOT SAFE"), and subsequently ask for a theme change.

Posted by member 35 on 2004-07-02 09:26:26 link

liquid circuit, remember that litestep is not the standard, neither the installer. that functionality wont be in the core.

edit: about the extension idea, isnt it being done now when one installs a theme, and is quite intrusive imo.

Posted by member 7 on 2004-07-02 10:35:01 link

Windows offers this feature already. Remember how explorer restarts after it crashes? All you have to do is set
LSSetAsShell

in step.rc and restart litestep.exe. Once the litestep process exits Windows will restart the shell - but there are a few problems. The API function it uses is completely undocumented and we haven't fully figured it out.

First, for some reason Windows always restarts the HKLM shell. Thus this technique doesn't really work if you have LS set up on a per-user basis. Second, LSSetAsShell has numerous negative sideeffects, such as explorer windows stopping to refresh.

Also note that this doesn't work if you terminate the shell process (via task manager or the ctrl-alt-f1 menu).

Now if all you want to do is start LS with a different theme... remember that litestep.exe can take the path to a config file as a command line parameter. It'll use that file instead of step.rc.

Posted by member 7991 on 2004-07-02 11:28:04 link

Sryo: I think I understand what you're saying, but could you clarify what you mean?

Posted by member 35 on 2004-07-02 14:30:59 link

*Perhaps Litestep could monitor whether it exited properly the last time it was executed. If not, on next start it could ask the user whether they would like to switch to the default theme (and maybe give the option to select another theme).*

it shouldnt do that because litestep doesnt manage the themes, it loads the step.rc. if there's an include to a theme.rc doesnt matter, many still use litestep build without installer.

the second idea has it's downside too, because why would it prompt to change the theme, if litestep closed unexpectedly it should prompt if it should be run again (or reload witout asking).

Posted by member 7991 on 2004-07-02 16:34:24 link

Yeah, that makes sense. However, I wasn't implying an automatic restart, simply when the program IS started again, it would make the check. I suppose this idea would probably be best as a script...

Which leads me a little off topic but, mzscript can execute a command on startup... what about executing a command on exit?