Create shortcut in ObjectDock: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{PageAuthor|Jan}}
== Description ==
== Description ==
Places a shortcut to an application in the ObjectDockâ„¢
Places a shortcut to an application in the ObjectDockâ„¢
Line 10: Line 11:


$var        ; return code: ok|error|aborted|exists
$var        ; return code: ok|error|aborted|exists
---------------------------------------------------------------
---------------------------------------------------------------
${DockShortcutAdv} "[target]" "[name]" "[icon]" "[group]" $var
${DockShortcutAdv} "[target]" "[name]" "[icon]" "[group]" $var


Line 20: Line 23:
$var        ; return code: ok|error|aborted|exists
$var        ; return code: ok|error|aborted|exists
</highlight-nsis>
</highlight-nsis>
== Examples ==
'''Add normal shortcut to ObjectDock'''
<highlight-nsis>
!include "DockShortcut.nsh"
  !insertmacro "DockShortcut"
Section
${DockShortcut} "$INSTDIR\nsis.exe" "Nullsoft Install System" $0
SectionEnd
</highlight-nsis>
'''Add shortcut to 2nd tab of ObjektDock Plus, using a different icon'''
<highlight-nsis>
!include "DockShortcut.nsh"
  !insertmacro "DockShortcutAdv"
Section
${DockShortcutAdv} "$INSTDIR\nsis.exe" "Nullsoft Install System" "$INSTDIR\Contrib\Graphics\Icons\classic-install.ico" "2" $0
SectionEnd
</highlight-nsis>
== Download ==
<attach>DockShortcut.0.2.zip</attach>


[[Category:Disk, Path & File Functions]]
[[Category:Disk, Path & File Functions]]

Latest revision as of 20:30, 24 July 2008

Author: Jan (talk, contrib)


Description

Places a shortcut to an application in the ObjectDockâ„¢

Syntax

${DockShortcut} "[target]" "[name]" $var
 
"[target]"   ; full path to the target executable
"[name]"     ; name for the shortcut
 
$var         ; return code: ok|error|aborted|exists
 
---------------------------------------------------------------
 
${DockShortcutAdv} "[target]" "[name]" "[icon]" "[group]" $var
 
"[target]"   ; full path to the target executable
"[name]"     ; name for the shortcut
"[icon]"     ; target icon: exe|ico|png
"[group]"    ; id of the tab (ObjectDock Plus only!)
 
$var         ; return code: ok|error|aborted|exists

Examples

Add normal shortcut to ObjectDock

!include "DockShortcut.nsh"
  !insertmacro "DockShortcut"
 
Section
${DockShortcut} "$INSTDIR\nsis.exe" "Nullsoft Install System" $0
SectionEnd

Add shortcut to 2nd tab of ObjektDock Plus, using a different icon

!include "DockShortcut.nsh"
  !insertmacro "DockShortcutAdv"
 
Section
${DockShortcutAdv} "$INSTDIR\nsis.exe" "Nullsoft Install System" "$INSTDIR\Contrib\Graphics\Icons\classic-install.ico" "2" $0
SectionEnd

Download

DockShortcut.0.2.zip (1 KB)