Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Closes input stream.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Shell | 8.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |
Parameter | Description | Example |
---|---|---|
ShellRef | The reference number from the shell. | $shell |
Returns OK or error.
Run a command line tool with input:
Set Variable [ $shell ; Value: MBS( "Shell.New" ) ]
Set Variable [ $s ; Value: MBS( "Shell.Execute"; $shell; "/Applications/Postgres.app/Contents/Versions/15/bin/gdaltransform"; "-s_srs"; "EPSG:25832"; "-t_srs"; "EPSG:4326"; "-output_xy") ]
# send input data and close input
Set Variable [ $s ; Value: MBS( "Shell.WriteInputText"; $shell; "666862 6716190"; "UTF-8") ]
Set Variable [ $s ; Value: MBS( "Shell.CloseInput"; $shell ) ]
# wait for app to finish
Set Variable [ $s ; Value: MBS( "Shell.Wait"; $shell; 5) ]
# read results
Set Variable [ $error ; Value: MBS( "Shell.ReadErrorText"; $shell; "UTF-8") ]
Set Variable [ $result ; Value: MBS( "Shell.ReadOutputText"; $shell; "UTF-8") ]
Set Field [ Shell::Error ; MBS( "Text.ReplaceNewline"; $error; 1) ]
Set Field [ Shell::Output ; MBS( "Text.ReplaceNewline"; $result; 1) ]
Set Variable [ $r ; Value: MBS("Shell.Release"; $shell) ]
This function checks for a license.
Created 18th June 2018, last changed 30th January 2023