powcshell.url module#

インターネットショートカット。

主なクラスは UniformResourceLocator です。

class powcshell.url.IUniformResourceLocatorW#

ベースクラス: IUnknown

GetURL = <COM method offset 4: WinFunctionType>#
InvokeCommand = <COM method offset 5: WinFunctionType>#
SetURL = <COM method offset 3: WinFunctionType>#
class powcshell.url.IUrlInvokeCommandFlag(*values)#

ベースクラス: IntFlag

IURL_INVOKECOMMAND_FLAGS

ASYNCOK = 8#
DDEWAIT = 4#
LOG_USAGE = 16#
class powcshell.url.IUrlSetUrlFlag(*values)#

ベースクラス: IntFlag

IURL_SETURL_FLAGS

GUESS_PROTOCOL = 1#
USE_DEFAULT_PROTOCOL = 2#
class powcshell.url.UniformResourceLocator(o: Any)#

ベースクラス: object

インターネットショートカット。IUniformResourceLocatorWのラッパーです。

サンプル

空のインターネットショートカット作成

>>> UniformResourceLocator.create()

.lnkファイルを開いてインターネットショートカット作成

>>> UniformResourceLocator.create_from_file(path)

ストリームからインターネットショートカット作成

>>> UniformResourceLocator.create_from_stream(stream)
static create() UniformResourceLocator#
static create_fromfile(path: str, mode: ~powc.stream.StorageMode = <StorageMode.DIRECT: 0>) UniformResourceLocator#
static create_fromstream(stream: ComStream) UniformResourceLocator#
invoke(cmd: str, flags: IUrlInvokeCommandFlag, window_handle: int) None#
invoke_default(flags: IUrlInvokeCommandFlag, window_handle: int) None#
invoke_default_nothrow(flags: IUrlInvokeCommandFlag, window_handle: int | None = None) ComResult[None]#
invoke_nothrow(verb: str, flags: IUrlInvokeCommandFlag, window_handle: int | None = None) ComResult[None]#
property persist_file: PersistFile#
property persist_stream: PersistStream#
set_url(url: str, flags, IUrlSetUrlFlag) None#
set_url_nothrow(url: str, flags: IUrlSetUrlFlag) ComResult[None]#
property url: str#
property url_nothrow: ComResult[str]#
property wrapped_obj: c_void_p#