Talk:Octave for macOS: Difference between revisions

(→‎Helper for Mac: new section)
 
Line 11: Line 11:


:The wiki talk feature is not used widely.  Please consult the mailing list "help@octave.org" for questions about macOS and plotting. [[User:Siko1056|Siko1056]] ([[User talk:Siko1056|talk]]) 18:18, 19 December 2019 (PST)
:The wiki talk feature is not used widely.  Please consult the mailing list "help@octave.org" for questions about macOS and plotting. [[User:Siko1056|Siko1056]] ([[User talk:Siko1056|talk]]) 18:18, 19 December 2019 (PST)
== Helper for Mac ==
I created a little helper to open octave scripts from macs finder in octave GUI editor. I used automater to create an app running a shell script. The shell script looks like this:
  #! /bin/zsh
  # Add path if needed
  path=('/usr/local/bin' $path)
  export PATH
  # create an editor command for each file on command line
  for fi in "$@"
  do
    occmd+=(edit \'$fi\' ";")
  done
  # Run octave with files as arguments and edit files.
  /usr/local/bin/octave --gui --persist --eval "$occmd"
Save this with automator as "Octave Starter" application.
Select one octave ".m" file and open info window and change "open with" to use "Octave Starter".
After this double clicking an octave file will bring up Octave gui with the file opened in editor.
Hope that helps, Georg -- [[Special:Contributions/78.34.194.225|78.34.194.225]] 09:56, 20 February 2023 (UTC)
Anonymous user