LitDev Extension API
LDShell
Functions for extended file infos, LNK/URL shortcuts and Shell apps. (All code and methods provided by Pappa Lapub).
AllDetails
Gets all available extended properties as Array ("idx=property name;", where -1=Infotip, 0=Name, .. up to 286=Total bitrate (or ev. ?Full bitrate? on engl systems)).
ApplyVerbOn(path,verb)
Apply the given Verb (contextmenu item) for the given file or folder.
List of available Verbs (for a filetype or folder) under 'GetAllVerbsFor'.
path The full file- or folder path.
verb The Verb to apply (case- and '&' insensitive).
returns "SUCCESS" on success, else "FAILED".
CascadeWindows()
Orders all opended windows in cascades on the desktop (Revert with RestoreWindows).
DateTimeSettings()
Shows the dialog for date- and time settings.
DTIconsHide()
Hides all desktop icons.
DTIconsOn
Gets weather the desktop icons are currently visible ("True" or "False").
DTIconsShow()
Shows all hidden desktop icons again.
DTIconsToggle()
Toggles the view of all desktop icons automatically (On/Off).
ExploreFolder(path)
Opens a specified folder in a Windows Explorer window. (parent folder for existing file path). In new tab in QTTabBar.
path The folder path to open in explorer (file path opens parent folder). The folder must exist.
GetAllDetailNamesFor(path,step1)
Gets the names of all available extended properties for a given file or folder as Array (up to max. 316, w/o -1=Infotip).
path The full file- or folder path.
step1 Indizes in speps by 1? "True" or "False" (default, real property ID).
returns The names of all available extended properties as Array ("idx=property name;...", w/o Infotip) on success, else "FAILED".
GetAllDetailsFor(path)
Gets all available extended properties for the given file or folder as Array (up to max. 316, without -1=Infotip).
path The full file- or folder path.
returns All available extended properties as Array ("property name=value;...", without Infotip) on success, else "FAILED".
GetAllVerbsFor(path)
Gets all available Verbs (contextmenu items) for a given filetype or folder as Array.
Applying of a Verb on file/folder under see 'ApplyVerbOn'.
path The full file- or folder path.
returns All available Verbs as Array ("idx=verb;...", w/o '&') on success, else "FAILED".
GetDetail(path,infoType)
Gets the value of an extended property for a given file or folder.
path The full file- or folder path.
infoType The ID number or name of the property (eg. -1="Infotip"/"", 0="Name", 1="Size", etc.)
ID numbers and names of available properties under s. 'AllDetails'.
returns The value of the property if available, else "". "FAILED" on failure (eg. missing path).
Infotip lines separated by lf and ending with crlf.
GetSetting(value)
Gets values for global Shell settings (s. folder opions-view, CheckedStatus).
value An integer constant for the value to get (eg. 1, 2, 4, "8", "32" etc.).
returns "True" or "False" on success, else "FAILED".
example http://msdn.microsoft.com/library/windows/desktop/gg537739.aspx
ShowAllObjects = SBShell.GetSetting(1)
ShowExtensions = SBShell.GetSetting(2)
ShowInfoTip = SBShell.GetSetting(8192)
ShowSuperHidden = SBShell.GetSetting(262144)
GetSystemInfo(info)
Gets a given Systeminformation.
info The name of the value to get. Options:
"DirectoryServiceAvailable", "DoubleClickTime", "ProcessorLevel", "ProcessorSpeed", "ProcessorArchitecture", "PhysicalMemoryInstalled", "IsOS_DomainMember"
(Only XP: "IsOS_Professional", "IsOS_Personal").
returns The queried value on success, else "" or "FAILED".
LinkCreate(shortcut,target)
Creates a new lnk/url shortcut (Shell32). Further editing with 'LinkSetProperty'.
shortcut The full path for the new lnk/url shortcut file.
target The full path of the target file/-folder resp. URL address.
returns The full file path of the created shortcut on success, else "FAILED".
LinkGetProperty(shortcut,property)
Gets properties of a lnk/url shortcut link, like target pfad, arguments etc.
shortcut The full path of the lnk/url shortcut link file.
property The property to get (case independent, * for Urls) like:
"Target" target path *
"Args" arguments
"Folder" working directory
"Desc" comment *
"HotKey" shortcut key comb * (default: 0)
"Style" window style * (1 normal, 3 max, 7 min)
"Icon" icon path
returns The value of the property if available or "". "FAILED" on failure.
LinkSetProperty(shortcut,target,args,folder,desc,icoPath,icoIdx,hotkey,style)
Modifies properties of an existing lnk/url shortcut link, like target path, arguments etc. (* for Urls).
shortcut The full path of an existing lnk/url shortcut link file.
target * The full path of the target file/-folder resp. URL address.
args Startparameter when launching the shortcut or "" (for url).
folder The full path of the start folder or "" (for url).
desc * Comment or description for the shortcut or "".
icoPath * Full path of the icon file for the shortcut or "".
icoIdx * Index of the icon in the icon file (default: 0, for .ico).
hotkey * keys combination to launch the shortcut link (default: 0).
style * Window style when launching the shortcut (default: 1 normal, 3 max, 7 min).
returns The full file path of the modified shortcut on success, else "FAILED".
Name
Gets the name of the executing assembly for this extension.
OpenFolder(path)
Opens explorer with the given file-/folder path (parent folder for existing file path). In new tab in QTTabBar.
path Opens the specified folder (file path opens parent folder). The folder must exist.
RestoreWindows()
Restores all minimized windows in the taskbar (after ShowDesktop, TileAll.., CascadeWindows) again.
RunBox()
Shows the Run(box) Dialog.
SelectFolder(title,initDir)
Shows a folder selection dialog.
title The title to show on the dialog.
initDir The start folder when the dialog opens or "" for last selected folder (default: Computer).
returns The full folder path after selection or "" when canceled, else "FAILED".
ShellLink(shortcut,target)
Creates a new lnk/url shortcut (IWshRuntimeLibrary). Further editing with 'ShellLinkSet'.
shortcut The full path for the new lnk/url shortcut file.
target The full path of the target file/-folder resp. URL address.
returns The full file path of the created shortcut on success, else "FAILED".
ShellLinkGet(shortcut,property)
Gets properties of a lnk/url shortcut link, like target pfad, arguments etc. (IWshRuntimeLibrary).
shortcut The full path of the lnk/url shortcut link file.
property The property to get (case independent, * for Urls) like:
"Target" target path *
"Args" arguments
"Folder" working directory
"Desc" comment *
"HotKey" shortcut key comb * (default: 0)
"Style" window style * (1 normal, 3 max, 7 min)
"Icon" icon path,Idx (default: ,0)
returns The value of the property if available or "". "FAILED" on failure.
ShellLinkSet(shortcut,target,args,folder,desc,icon,hotkey,style)
Modifies properties of an existing lnk/url shortcut link, like target path, arguments etc. (* for Urls) (IWshRuntimeLibrary).
shortcut The full path of an existing lnk/url shortcut link file.
target * The full path of the target file/-folder resp. URL address.
args Startparameter when launching the shortcut or "" (for url).
folder The full path of the start folder or "" (for url).
desc * Comment or description for the shortcut or "".
icon * The full path (resp. path,Idx) of the icon for the shortcut link or "". 'Idx' is Index of the icon in in the file (default: 0, for .ico).
hotkey * keys combination to launch the shortcut link (default: 0).
style * Window style when launching the shortcut (default: 1 normal, 3 max, 7 min).
returns The full file path of the modified shortcut on success, else "FAILED".
ShowDesktop()
Minimizes all opened windows into the taskbar and showes the desktop (Revert with RestoreWindows).
ShowFileProperties(filePath)
Opens the shell properties dialog for a given file or folder path (GW is needed for that, not available from TW or Console).
filePath The full file- or folder path.
SpecialFolderConstants
Gets a list of all CSIDL numbers and their according special System-/Shell folder names as Array ("csidl=folder name;").
SpecialFolderList(csidl)
Gets all items in a special system/shell folder (upper level only).
csidl The CSIDL number of the system folder (0 to 47, constants and names of available folders under s. SpecialFolderConstants).
returns The names of all objects in the system folder as Array (only upper level) on success, else "FAILED".
example http://msdn.microsoft.com/library/bb774096.aspx
eg. CSIDL for:
3 Control panel
5 my documents
8 Recent
9 SendTo
10 RecBin
16 Desktop folder
17 Computer
20 Fonts
32 Temp Inet Files
SpecialFolderPaths
Gets a list of all special System-/Shell folder names and their according folder paths as Array ("folder name=path;").
SpecialFolders
Gets a list of all special System folders as Array ("folder name=path;"). For Shell folders s. 'SpecialFolderPaths'.
StartSettings()
Shows the dialog for startmenü/taskbar settings.
Switch3D()
Orders all opended windows in a 3D stack on the desktop to select through (with arrow keys).
TileAllHoriz()
Orders all opened windows horizontally tiled on the desktop (Revert with RestoreWindows).
TileAllVert()
Orders all opened windows vertically tiled on the desktop (Revert with RestoreWindows).
ToggleDesktop()
Toggles the view of the (windowless) desktop on and off (s. ShowDesktop/RestoreWindows).
Version
Gets the current file version of this extension (else 0.0.0.0).