Load previous program at startup
03 Sep 2016 17:38 #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 or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19106
- Thank you received: 6398
03 Sep 2016 18:16 #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 or Create an account to join the conversation.
03 Sep 2016 20:12 - 03 Sep 2016 20:18 #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
Last edit: 03 Sep 2016 20:18 by Rick G.
Please Log in or Create an account to join the conversation.
03 Sep 2016 20:57 #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 or Create an account to join the conversation.
04 Sep 2016 06:14 #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 or Create an account to join the conversation.
04 Sep 2016 18:46 #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 or Create an account to join the conversation.
04 Sep 2016 19:59 - 04 Sep 2016 20:20 #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
Last edit: 04 Sep 2016 20:20 by terkaa.
Please Log in or Create an account to join the conversation.
04 Sep 2016 20:44 #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 or Create an account to join the conversation.
Time to create page: 0.178 seconds