Page 1 of 1

Run macro at startup but before opening panels

Posted: Mon 15 May, 2017 17:20
by nnobody
Is it possible to run a macro at Far startup, but before panel folders will be opened?
The problem: check saved panel path and change it if necessary, but before Far attempts to open it.

Run macro at startup but before opening panels

Posted: Mon 15 May, 2017 17:39
by siberia-man
I guess this can help you

Code: Select all

Macro {
	description = "Display date/time of Far invocation";
	area = "Shell";
	key = "";
	flags = "RunAfterFARStart";
	action = function()
		-- http://forum.farmanager.com/viewtopic.php?p=138007#p138007
		-- Скрыть "вводимую" команду при старте FAR
		-- Hide an "entered" command at starting of FAR
		panel.GetUserScreen()
		win.system("echo:Started Far3")
		win.system("echo:[ %DATE% %TIME% ]")
		panel.SetUserScreen()
	end;
}

Run macro at startup but before opening panels

Posted: Mon 15 May, 2017 17:49
by nnobody
I've already tried RunAfterFARStart flag and such a macro runs after the panels are opened (GetUserScreen() just hides them).

Run macro at startup but before opening panels

Posted: Mon 15 May, 2017 18:08
by nnobody
The actual problem that I'd like to solve is slow Far startup if previous session ends up on opened network path (Network plugin, which i like) of currently unavailable host (Windows SMB timeout is about 30 seconds). I'd like to Far somehow save panel folders, but only for local drives.