octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53854] An error massage about failing to load


From: Petr Lobaz
Subject: [Octave-bug-tracker] [bug #53854] An error massage about failing to load notepad++ on startup
Date: Mon, 14 May 2018 16:55:06 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #3, bug #53854 (project octave):

My previous "solution" did not work when Octave was launched witout attempt to
edit a file, e.g. when clicking on the desktop icon "GNU Octave (GUI)".

Here is a refined solution. Edit the original file octave.vbs located in the
Octave root folder. 
Replace lines 39 to 47 (from "check args to see..." to "Next") by


' check args to see if told to run gui or command line
' and build other args to use
GUI_MODE=1
ADD_PAUSE=0
AllArgs = ""
Set wshArgs = WScript.Arguments
For I = 0 to wshArgs.Count - 1
  If wshArgs(I) = "--no-gui" Then GUI_MODE=0
  If ADD_PAUSE=1 AND GUI_MODE=1 Then 
    AllArgs = AllArgs & " " & chr(34) & "pause(1); " & wshArgs(I) & chr(34)
    ADD_PAUSE=0
  Else
    AllArgs = AllArgs & " " & chr(34) & wshArgs(I) & chr(34)
  End If
  If wshArgs(I) = "--eval" Then ADD_PAUSE=1
Next


*Description*

The loop waits for the argument "--eval". It then assumes that the next
argument will be "edit 'FILENAME'". Based on this assumption (that is not
checked) is adds "pause(1); " before the edit command.
If there is no "--eval" command, no pause is added. Adding pause would result
in waiting one second and terminating Octave.

You can tweak the delay. On my computer, even pause(0.5) works fine.

Petr

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53854>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]