(maybe) useful functions for developing plug-ins for Janetter