This AutoIt script launches DokuWikiStick and opens the web page as the bundled run.bat
script does but MicroApache is automatically minimized and a systray icon gives access to the following menu :
DokuWikiStick
folder in Windows ExplorerGitHub
folder exists in your Documents
folder, the menu is expanded with the following functions : open github.com
and explore Documents\GitHub
folderHere comes the source :
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=DokuWikiStickGeekitude.ico #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Constants.au3> #include <WindowsConstants.au3> Opt("TrayAutoPause", 0) Opt("TrayMenuMode", 3) TraySetToolTip ("DokuWikiStick") If FileExists(@ScriptDir & "\server\mapache.exe") Then TrayTip("DokuWikiStick", "Starting MicroApache...", 2, 2) FileChangeDir (@ScriptDir & "\server") Run("mapache.exe", "", @SW_MINIMIZE) ShellExecute("http://localhost:8800/doku.php") Menu() Else MsgBox(16, "Error", "Missing \server\mapache.exe") Exit EndIf Func Menu() Local $idBrowseDWS = TrayCreateItem("Browse DokuWikiStick website") Local $idRestart = TrayCreateItem("Restart MicroApache") Local $idExploreDWS = TrayCreateItem("Explore DokuWikiStick folder") If FileExists(@MyDocumentsDir & "\GitHub") Then TrayCreateItem("") Local $idBrowseGH = TrayCreateItem("Browse GitHub website") Local $idExploreGH = TrayCreateItem("Explore Documents\GitHub folder") EndIf TrayCreateItem("") Local $idExit = TrayCreateItem("Exit") While 1 Switch TrayGetMsg() Case $idBrowseDWS ShellExecute("http://localhost:8800/doku.php") Case $idRestart TrayTip("DokuWikiStick", "Restarting MicroApache...", 2, 2) Run("ApacheKill.exe") Sleep(1000) Run("mapache.exe") Case $idExploreDWS ShellExecute(@ScriptDir) Case $idBrowseGH ShellExecute("https://github.com") Case $idExploreGH ShellExecute(@MyDocumentsDir & "\GitHub") Case $idExit KillApache() EndSwitch WEnd EndFunc Func KillApache() TrayTip("DokuWikiStick", "Killing MicroApache...", 2, 2) Run("ApacheKill.exe") Sleep(1000) Exit EndFunc
This file (DokuWikiStick.au3
) has to be compiled with the following procedure :
AutoIt Full Installation
(choose Edit when the install asks what to do when opening au3 files)AutoIt Script Editor
DokuWikiStick.au3
) and one of these icons : (based on an image from Andreas Gohr's blog or (wich I made from this clipart)You can also download the exe file here.