Main > Main Forum

Huge, huge problem.

<< < (10/12) > >>

bkenobi:
If you want to make it simpler, you could have a script running in the background to detect if MALA is running.  If it isn't, then have the script launch MALA.  You might need some kind of a timer to make sure it doesn't run when you are starting up (so you would have 2 instances).  Anyway, just a thought to simplify if you can't figure out why it crashes.

jasonbar:
That's a wonderful idea, because I realized that the desktop shows long enough during boot that the user would have the opportunity to launch that icon before MaLa launched itself, therefore having 2 instances of MaLa running.


Assuming that I know absolutely nothing about scripts, how would I possibly go about making such a script?

Thanks,
-Jason

bkenobi:
www.autohotkey.com or www.autoitscript.com/autoit3/

If you can manually do something on the computer, you can use AHK or AI to automate it!  I use AHK, but AI is just as good with slightly different syntax from what I understand.  You should check out the "SetTimer" and the "Process" AHK functions.  I would expect this to only be a few lines of code.  If you are familiar with any kind of coding, you should be able to pick either of these codes up very quickly.  I could code something up right quick, but then you wouldn't have the fun.   :cheers:

jasonbar:
Thanks--this should probably help w/ my gyrations necessary to launch both MaLa & CPWizard upon launch & getting focus back to MaLa!

I've downloaded AutoHotkey & started simple programming.

Using the Run, Sleep, & WinActivate commands, I can launch MaLa & CPWizard & then put focus back to MaLa after X seconds, when CPWizard is done launching.

2 questions:

1 - Can I just use the AutoHotkey.ahk default script & shell my PC to jump right into AutoHotkey.exe (and it will, by default, run that script)?  Then I have full control over launching my applications & delays & window focus...

2 - How can I program AutoHotkey to recognize the difference between MaLa crashing (and wanting to restart MaLa right away) and me manually closing MaLa to get into Explorer & do some work on the cab?  I suppose I could also hold down a hard-to-reach key when I exit from MaLa & AutoHotkey could look for that keystroke & decide if it should restart MaLa or not?


Thanks--very cool program...but I don't know if I'd define it as "fun"... :laugh:
-Jason

bkenobi:
You can use the sleep and winactivate commands if you want and use the script for startup directly (windows seems to be able to use AHK scripts as startup/shutdown scripts just fine as that's what I do).  To do that, just point windows to the .ahk file and you'll be golden (alternately, compile the script to an exe).

As for crashes vs manual killing MALA, perhaps you could close the script on exiting MALA.  That shouldn't run if MALA crashes...only if it exits gracefully.  Of course, if you launch MALA again, you won't have the script running already.  So, you might want to make the monitoring portion part of a script that launches when MALA starts.

Lots of ways to do it and none are wrong!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version