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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
RunTask.SetArguments
Sets the command arguments that should be used to launch the executable.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| RunTask | 3.1 | Yes | Yes | No | Yes | No |
Deprecated
This function was deprecated. Use Shell functions instead.
Parameters
| Parameter | Description | Example |
|---|---|---|
| arguments | Pass one argument for each argument. | "-v" |
Result
Returns OK or error.
Description
Sets the command arguments that should be used to launch the executable.Be aware that shell expansion does not happen and shell variables are not expanded.
Examples
Set three arguments
MBS( "RunTask.SetArguments"; "-v"; "-s"; "test.txt" )
Set a lot of arguments:
MBS("RunTask.SetArguments"; "-i"; "/test/tmp/filetmp%d.jpg"; "-b:v"; "320k"; "-vcodec"; "prores"; "-profile"; "2"; "-qscale"; "5"; "/test/tmp/IM_0001.mov")
List connected clients on FileMaker Server:
# © 30.07.2016 Patrick Weh | Team Nifty GmbH (17:40 Uhr)
# List connected Clients
# ------------------------------------------------------------------------------------------------------------
# Script checks for connected clients at the FileMaker Server.
# Copy this File to your Server and run this Script on your FileMaker Server.
# ------------------------------------------------------------------------------------------------------------
#
Set Error Capture [On]
Allow User Abort [Off]
#
Set Variable [$r; Value:MBS( "RunTask.NewTask" )]
Set Variable [$r; Value:MBS( "RunTask.SetLaunchPath"; "/Library/FileMaker Server/Database Server/bin/fmsadmin" )]
# please put your admin password here
Set Variable [$r; Value:MBS( "RunTask.SetArguments"; "-u" ; "fmserveradmin" ; "-p" ; "fmserveradminpassword" ; "list" ; "clients" ; "-s" )]
Set Variable [$r; Value:MBS( "RunTask.Launch")]
# now wait for task to finish:
Set Variable [$result; Value:""]
Loop
Pause/Resume Script [Duration (seconds): 2]
Set Variable [$result; Value:$result & MBS("RunTask.ReadOutputText")]
Exit Loop If [MBS("RunTask.IsRunning") ≠ 1]
End Loop
#
# write into a field:
Set Field [Check clients::Clients; $result]
Commit Records/Requests [No dialog]
#
Set parameters for -p "Hello World":
MBS( "RunTask.SetArguments"; "-p"; "Hello World" )
# please notice that we just have quotes around Hello World
Show quicklook preview window for PDF file:
Set Variable [ $r ; Value: MBS( "RunTask.NewTask" ) ]
Set Variable [ $r ; Value: MBS( "RunTask.SetLaunchPath"; "/usr/bin/qlmanage" ) ]
Set Variable [ $r ; Value: MBS( "RunTask.SetArguments"; "-p"; "/Users/cs/Desktop/Hello World.pdf" ) ]
Set Variable [ $r ; Value: MBS( "RunTask.Launch") ]
See also
- RunTask.AddArgument
- RunTask.GetArgument
- RunTask.IsRunning
- RunTask.Launch
- RunTask.NewTask
- RunTask.ReadErrorText
- RunTask.ReadOutputText
- RunTask.SetLaunchPath
- RunTask.Wait
- URLScheme.SetDefaultHandler
Example Databases
Blog Entries
Created 18th August 2014, last changed 13th June 2020
RunTask.ReadOutputText - RunTask.SetCurrentDirectoryPath
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins