I've been looking for a way to run an application when I turn on my axim. Well, I'm not really turning it on, since it was just asleep and pressing the power button wakes it up, but you get the idea.
Why do this? This is useful if you use your device for a single purpose and need the environment to be ready right after you turn it on. For example, some people may only use the device for GPS and would want the GPS app to be up and running right away without having to manually run the program. With a scripting application like skschema, you can even create a script to, at wake up, close other apps, turn on bluetooth, and then run the gps app.
Another case is that sometimes the wifi doesn't quite work right if it was left on when the device is turned off. So instead of manually turning the wifi off and on, the device can run a script, at wake up, to turn off and on the wifi.
For me, I have a device for my father-in-law to use for internet radio. He doesn't know english and is over 65 years old so I want to keep it as simple and troublefree as possible. When he turns it on, it should be connected to wifi and show the today screen where I hava clauncher shortcuts to each radio station.
But of couse, it's never so perfect. Pressing the power button to wake up the device can show many problems: The wifi may need to be toggled to connect. An error message may be on the screen, most likely from Media Player complaining about not being able to connect to something. Media Player may still be running and so it'll need to be closed.
So on to the HOWTO. Actually, there isn't really much to it.
1. You'll need sktools (
http://s-k-tools.com/.
2. In sktools, open Notify Queue.
3. Click Action > Add...
4. Change the dropdown to Wakeup and under Filename and arguments, select the program you want to run upon startup.
That's it!
To do more than one task, I use sktool's skschema to create a script to perform multiple tasks. So in step 4. above, I would just point to the script file.
For my father-in-law, my script would do the following:
- play wav, like "Please wait"
- kill media player (if running)
- turn off wifi
- turn on wifi
- play wav, like "Ready"
I may also have the script click the upper-right corner to get rid of any error messages if I need to. It would be better if I could script some logic that would be able to detect if the wifi has connected to an accesspoint, but this is as good as I can get it for now.
Thanks.