Load previous program at startup

More
03 Sep 2016 17:38 #79980 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

Please Log in or Create an account to join the conversation.

More
03 Sep 2016 18:16 #79982 by tommylight
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.

More
03 Sep 2016 20:12 - 03 Sep 2016 20:18 #79986 by Rick G
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
Last edit: 03 Sep 2016 20:18 by Rick G.

Please Log in or Create an account to join the conversation.

More
03 Sep 2016 20:57 #79991 by terkaa
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

Please Log in or Create an account to join the conversation.

More
04 Sep 2016 06:14 #79997 by terkaa
Ok,

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.

More
04 Sep 2016 18:46 #80025 by newbynobi
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

Please Log in or Create an account to join the conversation.

More
04 Sep 2016 19:59 - 04 Sep 2016 20:20 #80029 by terkaa
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
Last edit: 04 Sep 2016 20:20 by terkaa.

Please Log in or Create an account to join the conversation.

More
04 Sep 2016 20:44 #80031 by newbynobi
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

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.178 seconds
Powered by Kunena Forum