5/17/2023 0 Comments Stig viewer mac![]() Note: the commands between tell and end tell are indented by a single tab Did I mention the syntax was pretty simple? Tell application “Terminal” - indicates we are asking the Terminal to do something. Here’s the script we will write: tell application "Terminal" activate set currentTab to do script "cd Documents/STIGViewerApp" #change to directory where you unzipped STIGViewer and JavaFX #delay 2 #using currenttab to make sure these don't execute in separate terminal tabs/windows do script ("java -module-path javafx-sdk-19.0.2.1/lib/ -add-modules ntrols,javafx.web -jar STIGViewer-2.17.jar") in currentTab end tellĪppleScript uses a simple syntax, which I will break down line by line. In contrast to other scripting languages, the Terminal session launched by AppleScript runs in the user’s home directory by default, not in the current working directory. Note: the location where you save the AppleScript file is less important than the JavaFX and STIGViewer files. I saved it in the same directory as my JavaFX and STIGViewer JAR for the sake of simplicity, but you can save it wherever. Name your script - I chose the very original LaunchSTIGViewer and choose where to save it.
0 Comments
Leave a Reply. |