Shell Function

αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αž…αžΆαŸ†αž”αžΆαž…αŸ‹ αž…αžΆαž”αŸ‹αž•αŸ’αžαžΎαž˜β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αž•αŸ’αžŸαŸαž„β€‹αž‘αŸ€αž αž“αž·αž„β€‹αž€αŸ†αžŽαžαŸ‹β€‹αžšαž…αž“αžΆαž”αŸαž‘αŸ’αž˜β€‹αž”αž„αŸ’αž’αž½αž…β€‹αžšαŸ€αž„β€‹αŸ—β€‹αžαŸ’αž›αž½αž“Β αŸ”

Syntax:

Shell (Pathname As String[, Windowstyle As Integer[, Param As String[, bSync]]])

Parameters:

Pathname

Name of the program that you want to start, optionally with complete path and/or arguments.

Windowstyle

Optional integer expression that specifies the style of the window that the program is executed in.

note

Parameter Windowstyle is only effective on Windows systems. On other systems the parameter is ignored.


The following values are possible:

Windowstyle

Meaning

0

αž€αžΆαžšβ€‹αž•αŸ’αžαŸ„αžβ€‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸβ€‹αž‚αžΊβ€‹αžŸαŸ’αžαž·αžβ€‹αž“αŸ…β€‹αž›αžΎβ€‹αž”αž„αŸ’αž’αž½αž…β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αžŠαŸ‚αž›β€‹αž›αžΆαž€αŸ‹Β αŸ”

Not implemented in LibreOffice.

1

αž€αžΆαžšβ€‹αž•αŸ’αžαŸ„αžβ€‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸβ€‹αž‚αžΊβ€‹αžŸαŸ’αžαž·αžβ€‹αž“αŸ…β€‹αž›αžΎβ€‹αž”αž„αŸ’αž’αž½αž…β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αž€αŸ’αž“αž»αž„β€‹αž‘αŸ†αž αŸ†β€‹αžαžΆαž˜β€‹αžŸαŸ’αžαž„αŸ‹αžŠαžΆαžš αŸ”

Not implemented in LibreOffice.

2

αž€αžΆαžšβ€‹αž•αŸ’αžαŸ„αžβ€‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸβ€‹αž‚αžΊβ€‹αžŸαŸ’αžαž·αžβ€‹αž“αŸ…β€‹αž›αžΎβ€‹αž”αž„αŸ’αž’αž½αž…β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αžŠαŸ‚αž›β€‹αž”αžΆαž“β€‹αž”αž„αŸ’αžšαž½αž˜β€‹αž’αž”αŸ’αž”β€‹αž”αžšαž˜αžΆΒ αŸ”

3

αž€αžΆαžšβ€‹αž•αŸ’αžαŸ„αžβ€‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸβ€‹αž‚αžΊβ€‹αžŸαŸ’αžαž·αžβ€‹αž“αŸ…β€‹αž›αžΎβ€‹αž”αž„αŸ’αž’αž½αž…β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αžŠαŸ‚αž›β€‹αž”αžΆαž“β€‹αž–αž„αŸ’αžšαžΈαž€β€‹αž’αžαž·β€‹αž”αžšαž˜αžΆΒ αŸ”

4

αž”αž„αŸ’αž’αž½αž…β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αž‘αŸ†αž αŸ†β€‹αžαžΆαž˜β€‹αžŸαŸ’αžαž„αŸ‹αžŠαžΆαžš αžŠαŸ„αž™β€‹αž‚αŸ’αž˜αžΆαž“β€‹αž€αžΆαžšβ€‹αž•αŸ’αžαŸ„αžβ€‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸΒ αŸ”

Not implemented in LibreOffice.

6

αž”αž„αŸ’αž’αž½αž…β€‹αž€αž˜αŸ’αž˜αžœαž·αž’αžΈβ€‹αžŠαŸ‚αž›β€‹αž”αžΆαž“β€‹αž”αž„αŸ’αžšαž½αž˜β€‹αž’αž”αŸ’αž”β€‹αž”αžšαž˜αžΆ αž€αžΆαžšβ€‹αž•αŸ’αžαŸ„αžβ€‹αž’αžΆαžšαž˜αŸ’αž˜αžŽαŸβ€‹αž“αŸ…β€‹αžŸαž›αŸ‹β€‹αž›αžΎβ€‹αž”αž„αŸ’αž’αž½αž…β€‹αžŸαž€αž˜αŸ’αž˜Β αŸ”

Not implemented in LibreOffice.

10

αž”αž„αŸ’αž αžΆαž‰β€‹β€‹αž–αŸαž‰β€‹β€‹αž’αŸαž€αŸ’αžšαž„αŸ‹Β αŸ”


note

Windowstyle 3 and 10 are equivalent in Windows systems.


Param

String that specifies additional arguments passed to the program.

bSync

αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αžαž˜αŸ’αž›αŸƒβ€‹αž“αŸαŸ‡β€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž‘αŸ…β€‹αž‡αžΆ αž–αž·αž αž–αžΆαž€αŸ’αž™β€‹αž”αž‰αŸ’αž‡αžΆ Shell αž“αž·αž„β€‹αž—αžΆαžšαž€αž·αž…αŸ’αž…β€‹αž‘αžΆαŸ†αž„αž’αžŸαŸ‹β€‹αžšαž”αžŸαŸ‹ LibreOffice αž“αžΉαž„β€‹αžšαž„αŸ‹αž…αžΆαŸ†β€‹αžšαž αžΌαžβ€‹αžŠαž›αŸ‹β€‹αž”αŸ’αžšαžαž·αž”αžαŸ’αžαž·β€‹αž€αžΆαžšβ€‹αžŸαŸ‚αž›β€‹αž…αž”αŸ‹β€‹αžŸαž–αŸ’αžœβ€‹αž‚αŸ’αžšαž”αŸ‹Β αŸ” αž”αŸ’αžšαžŸαž·αž“β€‹αž”αžΎβ€‹αžαž˜αŸ’αž›αŸƒβ€‹αžαŸ’αžšαžΌαžœβ€‹αž”αžΆαž“β€‹αž€αŸ†αžŽαžαŸ‹β€‹αž‘αŸ…β€‹αž‡αžΆ αž˜αž·αž“β€‹αž–αž·αž αžŸαŸ‚αž›β€‹αžαŸ’αžšαž‘αž”αŸ‹β€‹αžŠαŸ„αž™β€‹αž•αŸ’αž‘αžΆαž›αŸ‹Β αŸ” αžαž˜αŸ’αž›αŸƒβ€‹αž›αŸ†αž“αžΆαŸ†αžŠαžΎαž˜β€‹αž‚αžΊ αž˜αž·αž“β€‹αž–αž·αžΒ αŸ”

Error codes:

5 αž€αžΆαžšβ€‹αž αŸ…β€‹αž”αŸ‚αž”αž”αž‘β€‹αž˜αž·αž“β€‹αžαŸ’αžšαžΉαž˜αžαŸ’αžšαžΌαžœ

53 αžšαž€β€‹αž˜αž·αž“β€‹αžƒαžΎαž‰β€‹αž―αž€αžŸαžΆαžš

73 αž˜αž·αž“β€‹αž’αžΆαž…β€‹αž”αŸ’αžšαžαž·αž”αžαŸ’αžαž·

Example:


Sub ExampleShellForWin
    Shell("c:\windows\calc.exe",2)
End Sub

Please support us!