- Posts: 261
- Thank you received: 0
Load previous program at startup
10 years 1 month ago #79980
by terkaa
Load previous program at startup was created by terkaa
Hi,
I would like to know if it is possible to save current program name to file and always at startup load program that was run previous time?
Tero
I would like to know if it is possible to save current program name to file and always at startup load program that was run previous time?
Tero
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 3
10 years 1 month ago #79982
by tommylight
Replied by tommylight on topic Load previous program at startup
You can do that, but only for a single file, or you can edit the ini file before you shut down the computer, to point it to the file you need. Or you can make a pyvcp or python script that would save that.
Please Log in to join the conversation.
10 years 1 month ago #79986
by Rick G
Replied by Rick G on topic Load previous program at startup
Well with AXIS although not automatic loaded the last file can be loaded by selecting...
File
Recent_files
So it would seem the last file name is saved somewhere.
Rick G
File
Recent_files
So it would seem the last file name is saved somewhere.
Rick G
Please Log in to join the conversation.
10 years 1 month ago #79991
by terkaa
Replied by terkaa on topic Load previous program at startup
Adding one line to gmmoccapy:
def on btn_run_clicked(self, widget, data = None):
added >> self.prefs.putpref( "open_file", self.stat.file, str)
And it seems to work but I am wondering if it also works with PIN halui.program-run
Tero
def on btn_run_clicked(self, widget, data = None):
added >> self.prefs.putpref( "open_file", self.stat.file, str)
And it seems to work but I am wondering if it also works with PIN halui.program-run
Tero
Please Log in to join the conversation.
10 years 1 month ago #79997
by terkaa
Replied by terkaa on topic Load previous program at startup
Ok,
Adding self.prefs.putpref( "open_file", path, str)
After btn_select_clicked does the trick and seems to work ok.
Tero
Adding self.prefs.putpref( "open_file", path, str)
After btn_select_clicked does the trick and seems to work ok.
Tero
Please Log in to join the conversation.
10 years 1 month ago #80025
by newbynobi
Replied by newbynobi on topic Load previous program at startup
Why nobody reads the documentation?
Go to the settings page, and klick there load actual file on start up.
Isn't that what you want?
Norbert
Go to the settings page, and klick there load actual file on start up.
Isn't that what you want?
Norbert
Please Log in to join the conversation.
10 years 1 month ago #80029
by terkaa
Replied by terkaa on topic Load previous program at startup
Hi,
I want it to change every time new program is loaded. So every time user loads a new file, this file name is set to be loaded at next startup. We have many Okuma's here and those always load program that was previously ran at startup. I did read the docs but I did not understand it correctly. I assumed that it would set currently loaded file to be loaded at startup.... Like with browser home page "use current page" option. But yes that option is what I was looking for.... I should of tried it. Thank you. I will now go and bang my head to wall for next hour or so....
Tero
I want it to change every time new program is loaded. So every time user loads a new file, this file name is set to be loaded at next startup. We have many Okuma's here and those always load program that was previously ran at startup. I did read the docs but I did not understand it correctly. I assumed that it would set currently loaded file to be loaded at startup.... Like with browser home page "use current page" option. But yes that option is what I was looking for.... I should of tried it. Thank you. I will now go and bang my head to wall for next hour or so....
Tero
Please Log in to join the conversation.
10 years 1 month ago #80031
by newbynobi
Replied by newbynobi on topic Load previous program at startup
Do not hurt youself:-)
What you want is a setting ‘allways remember last loaded file‘ and settings page is for a fixed file to be loaded at startup.
I like your idea and will add that setting asap.
Norbert
What you want is a setting ‘allways remember last loaded file‘ and settings page is for a fixed file to be loaded at startup.
I like your idea and will add that setting asap.
Norbert
Please Log in to join the conversation.
Time to create page: 0.091 seconds
