lee321987 Posted May 14, 2021 Share Posted May 14, 2021 (edited) Hello. If (while SciTE is NOT running) I run SciTE by double-clicking an .AU3 script to edit it then the previous SciTE session is ERASED. Is there any way I can make SciTE load the previous session when it is run by double-clicking a script? (adding the file I just double-clicked of course). Edited May 26, 2021 by lee321987 Mark the question as [SOLVED]. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 14, 2021 Developers Share Posted May 14, 2021 Use the separate SciTE4AutoIt3 installer and this issue will be resolved (is configurable) #restore last session when selecting Open file from Explorer - Only available in SciTE4AutoIt3 version save.session.advanced=1 Jos mLipok, argumentum and lee321987 3 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
lee321987 Posted May 14, 2021 Author Share Posted May 14, 2021 @Jos THANK YOU!!! Link to comment Share on other sites More sharing options...
pseakins Posted May 17, 2021 Share Posted May 17, 2021 On 5/14/2021 at 10:19 PM, Jos said: save.session.advanced=1 Shut the front door! I have been using AutoIt for 14 odd years and initially was frustrated at losing my sessions until I learned to never click on an .au3 file. I am perplexed that this mysterious hidden feature is remmed out by default when intuitively this is the behaviour one would expect from an editor. Fourteen years too late but this may help me in the future. Thanks for asking @lee321987 and Jos for answering. lee321987 and argumentum 2 Phil Seakins Link to comment Share on other sites More sharing options...
lee321987 Posted May 17, 2021 Author Share Posted May 17, 2021 Yeah I've been using AutoIt for probably 12-13 years. I made habit of just leaving SciTE running most of the time, and for those times where I thought it was running but it wasn't, I wrote a script to backup the previous .session file (the file is not written until you close SciTE), close SciTE, and copy the backup file over the current. I'm really grateful to hear about this setting! I too think it should be default behavior. pseakins 1 Link to comment Share on other sites More sharing options...
Developers Jos Posted May 17, 2021 Developers Share Posted May 17, 2021 3 hours ago, lee321987 said: I too think it should be default behavior. You guys are probably right but that should only happen when check.if.already.open=1 as else each SciTE session would restore all files. This function has been in there since the early days but I moved it into the internal SciTE Source in 2018: Quote 8-7-2018 *** Merged the SciTE v 4.1.0 by Neil Hodgson with our own version of SciTE. (Jos) This is a major change from the previous version so ensure you update all files including LUA or else you will get errors! - SciLexer au3: Fixed issues with nested CommentBlocks not always showing the correct color. - SciLexer au3: Change any line starting with # and no recognised keyword to be shown with the Pre-Processor in stead of default. - Changed Shortcut for AU3INFO to Ctrl+Shift+F6. - Moved the session restore logic for (save.session.advanced=1)into SciTE in stead of LoadSession.lua as that was clearing the recent files list of the last session when opening a file by double cliking it. This is fixed with this change. Default remains 0 so when a file is double clicked the last session isn't restored unless you add this to SciTEuser.properties: "save.session.advanced=1" Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
pseakins Posted May 18, 2021 Share Posted May 18, 2021 I am not sure I understand. It appears that check.if.already.open=1 apparently prevented Scite from restoring all files which of course is the opposite of what you would want. Anyway, it doesn't really matter to me, as I learned to never click on an .au3. Thanks for commenting Jos. At least these features are configurable which is what makes AutoIt so great. You want to do something - AutoIt can make it happen. Phil Seakins Link to comment Share on other sites More sharing options...
Developers Jos Posted May 18, 2021 Developers Share Posted May 18, 2021 2 hours ago, pseakins said: I am not sure I understand. It appears that check.if.already.open=1 apparently prevented Scite from restoring all files which of course is the opposite of what you would want. Understood and that is "fixed" with the function I added to SciTE with this parameter. ... but when check.if.already.open=0, one expects that SciTE will open a new SciTE instance for each double-clicked file and I would think you don't want to restore the complete session first when using save.session.advanced=1....right? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
pseakins Posted May 21, 2021 Share Posted May 21, 2021 On 5/18/2021 at 5:04 PM, Jos said: you don't want to restore the complete session first when using save.session.advanced=1....right? I do. I have about twenty tabs open in the editor. I want them all to remain when I open the editor otherwise I may forget I was working on them. Enabling save.session.advanced=1 now protects me from accidently losing them. I am happy the way things are. I open the editor via the Quick Launch panel because I fiddled around with the colour scheme resulting in having the cursor disappear. Via help from this forum I tailored @eManF's SciTE Caret Changer(Color and Width) app which I need to execute at the same time in order to make the cursor visible. I like a dark blue background. Phil Seakins Link to comment Share on other sites More sharing options...
Developers Jos Posted May 21, 2021 Developers Share Posted May 21, 2021 6 hours ago, pseakins said: I do. I have about twenty tabs open in the editor. I guess you didn't completely read/understand the question as the mentioned option opens a separate instance of SciTE for each file! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
pseakins Posted May 22, 2021 Share Posted May 22, 2021 18 hours ago, Jos said: opens a separate instance of SciTE for each file Yes, didn't understand. Wouldn't want that either. Phil Seakins Link to comment Share on other sites More sharing options...
ratus69 Posted June 11, 2023 Share Posted June 11, 2023 hello, I've installed the latest release of Scite and when I enable save.session.advanced=1, I have SciTEUser.properties and SciTEGlobal.properties in tabs with the script I wanted to open but none of the previous script used... any thoughts ? thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted June 11, 2023 Developers Share Posted June 11, 2023 Which version of SciTE are you running exactly? (show me the SciTE output info when a script is ran so I can check) What exactly are the steps you do and what where you expecting as the description is not 100% clear to me? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ratus69 Posted July 6, 2023 Share Posted July 6, 2023 ok looks like it's fixed, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now