K-Meleon

DEP

KMeleonWiki > Resources > MacroLibrary > Download Express

Submitted by: Johnny Sim-Bravenboer

Notes:

This macro adds the options to download both links and selected text with the Download Express download manager to the right-click menu.

To the Edit menu this macro will add an option to manually send a link to the Download Express program, which by default will be the selected text.

Also added to the Edit menu is access to the Download Express Download List and Options dialogs.


Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder (Edit > Configuration > Macros) and create the following text file:

DEP.kmm

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Download Express -------------------------------------------------------------------------------
#
# Dependencies : main.kmm
# Resources       : -
# Preferences    : -
#
# ------------------------------------------------------------------------------------------------------------------

# ----- PRIVATE

# OPEN LINK WITH DEP
_DEP_URL{
  menugrayed = (hostname($LinkURL) == "");
  exec(readreg("HKCU", "Software\\MetaProducts\\Download Express\\ProgramPath") . " /PAUSEDURL=" . $LinkURL);
}

# SEND SELECTED TEXT TO DEP
_DEP_SELTEXT{
  menugrayed=(hostname($SelectedText)=="");
  exec(readreg("HKCU", "Software\\MetaProducts\\Download Express\\ProgramPath") . " /PAUSEDURL=" . $SelectedText);
}

# MANUALLY SEND A LINK TO DEP
_DEP_MANUAL{
  $deplink = prompt("Enter link to be downloaded by Download Express:", "Enter a Link", $SelectedText);
  $deplink != ""? exec(readreg("HKCU", "Software\\MetaProducts\\Download Express\\ProgramPath") . " /PAUSEDURL=" . $deplink):;
}

# OPEN THE DEP PROJECT LIST
_DEP_LIST{
  exec(sub("dep.exe", "projectslist.exe", readreg("HKCU","Software\\MetaProducts\\Download Express\\ProgramPath")));
}

# OPEN DEP OPTIONS
_DEP_OPTIONS{
  exec(readreg("HKCU","Software\\MetaProducts\\Download Express\\ProgramPath")." /Options");
}

_DEP_BuildMenu{
  setmenu(LinkSave, macro, "Save Link with D&ownload Express", _DEP_URL);
  setmenu(SelectedText, macro, "Send to Download &Express", _DEP_SELTEXT);
  setmenu(Preferences, separator, -1);
  setmenu(Preferences, macro, "Enter L&ink to Download with Download Express", _DEP_MANUAL);
  setmenu(Preferences, macro, "Download Express Project &List", _DEP_LIST);
  setmenu(Preferences, macro, "Download Express &Options", _DEP_OPTIONS);
}


$OnInit=$OnInit."_DEP_BuildMenu;";

# ------------------------------------------------------------------------------------------------------------------
$macroModules=$macroModules."DEP;";


Comments & Questions

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.