When launching SciTE4AutoHotkey, it remembers the opened file, bookmark positions, cursor location from the previous session, which is great. Thanks to the developers.
Is it possible to have these settings remembered for various *.session files? I'm using various *.session files to switch from one project to project and would like to find back bookmarks distinctly for each project.
If it is not possible, is there a wish list where I could add this suggestion?
Thanks,
Jean
SciTE4AutoHotkey sessions vs bookmarks
SciTE4AutoHotkey sessions vs bookmarks
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4AutoHotkey sessions vs bookmarks
An info I did not mention in my previous message is that I'm loading SciTE4AutoHotkey with various session files using the -loadsession command line parameter, for example:
C:\Program Files\AutoHotkey\SciTE\SciTE.exe "-loadsession:C:\\...\\QuickClipboardEditor\\QuickClipboardEditor.session"?
C:\Program Files\AutoHotkey\SciTE\SciTE.exe "-loadsession:C:\\...\\QuickClipboardEditor\\QuickClipboardEditor.session"?
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4AutoHotkey sessions vs bookmarks
I have this in my SciTEUser.properties file:
This saves the bookmark in the session file. But in the global session file: C:\...\SciTE\SciTE.session:
Would it be possible to have the buffer.n.bookmarks= entries saved in both the global session file AND the session file loaded when launching SciTE with the command line parameter -loadsession? I tried adding this in the loaded session file but it had no effect:
If this is not possible, a solution would be to launch a script at SciTE exit to copy the settings from the global session file to the "loaded" session file. Is there a way to trigger a script when SciTE exists?
Code: Select all
#~ If you set save.session, the list of currently opened buffers will be saved on exit in a session file.
#~ When you start SciTE next time (without specifying a file name on the command line) the last session will be restored automatically.
save.session=1
#~ Setting session.bookmarks causes bookmarks to be saved in session files.
#~ When loading a session file bookmarks are restored.
session.bookmarks=1
Code: Select all
buffer.1.path=C:\...\QuickClipboardEditor\QuickClipboardEditor.ahk
buffer.1.position=55
buffer.1.scroll=0
buffer.1.current=1
buffer.1.bookmarks=3 ; <<<
Code: Select all
save.session=1
session.bookmarks=1
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: SciTE4AutoHotkey sessions vs bookmarks
Until a better solution is found, I wrote this small script that:
- launches SciTE4Autohotkey loading the session file passed as parameter
- waits for SciTE to quit
- after SciTE quits, copies the global SciTE session file overwriting the session file passed as parameter.
It works well for my needs.
- launches SciTE4Autohotkey loading the session file passed as parameter
- waits for SciTE to quit
- after SciTE quits, copies the global SciTE session file overwriting the session file passed as parameter.
It works well for my needs.
Code: Select all
#SingleInstance Force
#requires AutoHotkey v1.1
strExePath := "C:\Program Files\AutoHotkey\SciTE\SciTE.exe"
strGobalSessionPath := "C:\Users\Jean Lalonde\Documents\AutoHotkey\SciTE\SciTE.session"
if !A_Args.Length()
{
MsgBox, % "Launch this script with the path of the session file to load as parameter."
ExitApp
}
else if !FileExist(A_Args.1)
{
MsgBox, % "Sesson file """ . A_Args.1 . """ not found."
ExitApp
}
; launch SciTE4AutoHotkey and open the session file and wait for apps exiting
; escape "\" in session file path by doubling them to "\\"
RunWait, % strExePath . " ""-loadsession:" . StrReplace(A_Args.1, "\", "\\") . """"
; remove this confirmation or change the timeout as required
MsgBox, 4, SciTE4AutoHotkey Session, % "Save session to this file?`n`n" . A_Args.1 . " ?", 10 ; 10 seconds timeout processed as Yes
IfMsgBox, No
ExitApp
; overwrite the loaded session file with the SciTE global session file
FileCopy, % strGobalSessionPath, % A_Args.1, 1 ; 1 to overwrtite
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Who is online
Users browsing this forum: No registered users and 8 guests