Latest post of the previous page:
I am using this macro, it is working again. Thank you.Setting static Codepage in Far3-Editor.
Re: Setting static Codepage in Far3-Editor.
Please, I need help.
I don't know how to write this macro for viewer.
I don't know how to write this macro for viewer.
Re: Setting static Codepage in Far3-Editor.
because of lack viewer-api try to use this 'old-school' version:
Code: Select all
Event {
description="Set 28592 codepage";
group="ViewerEvent"; filemask="*.4gl,*.err";
action=function(Id,Event,Param)
if Event == far.Flags.VE_READ then
far.MacroPost([[
local cp, favorite = 28592, false
Keys("ShiftAltF9 Down Down 3 Enter")
Keys("ShiftF8")
if Object.ItemCount < 20 then Keys("CtrlH"); favorite = true end
if Menu.Select(cp,1) > 0 then Keys("Enter") else Keys("Esc") end
if favorite then Keys("ShiftF8 CtrlH Esc") end
]])
end
end;
}
Last edited by 2useven10 on Thu 22 May, 2014 02:43, edited 2 times in total.
Re: Setting static Codepage in Far3-Editor.
I don't know, what changed in Far3, but macro about Viewer is not working in version 3900 and later of Far3.
There is printing error "invalid flag combination" on line:
far.MacroPost([[
Can you help me?
There is printing error "invalid flag combination" on line:
far.MacroPost([[
Can you help me?
-
- Posts: 6834
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 530 times
Re: Setting static Codepage in Far3-Editor.
This is because KMFLAGS_DISABLEOUTPUT is no longer valid. Please delete "KMFLAGS_DISABLEOUTPUT" and restart Far.Far3c wrote:There is printing error "invalid flag combination"
- John Doe
- Бюрократ
- Posts: 13847
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 73 times
- Been thanked: 428 times
- Contact:
Re: Setting static Codepage in Far3-Editor.
Far3c
Just in case: much time has passed since the topic was started, and Far Manager now have some useful features:
- it's possible to choose any system codepage as default for editor and viewer.
- it's possible to finetune autodetection, e.g. you can limit it to Favorite codepages.
Just in case: much time has passed since the topic was started, and Far Manager now have some useful features:
- it's possible to choose any system codepage as default for editor and viewer.
- it's possible to finetune autodetection, e.g. you can limit it to Favorite codepages.
Re: Setting static Codepage in Far3-Editor.
Thank you Shmuel, now is macro working again.
I would like ask of John Doe about second suggestion (first tip I know), where can I find this "limit about Favorite codepage" for autodetection?
I would like ask of John Doe about second suggestion (first tip I know), where can I find this "limit about Favorite codepage" for autodetection?
- John Doe
- Бюрократ
- Posts: 13847
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 73 times
- Been thanked: 428 times
- Contact:
Re: Setting static Codepage in Far3-Editor.
Launch configuration editor
You can open relevant help article by pressing Shift-F1, unfortunately it is not translated yet, so I'll try to explain this parameter.
You have 2 alternatives here: forbid some codepages, or opposite - forbid all codepages except System/Unicode/Favorites.
far:config
and find Codepages.NoAutoDetectCP.You can open relevant help article by pressing Shift-F1, unfortunately it is not translated yet, so I'll try to explain this parameter.
You have 2 alternatives here: forbid some codepages, or opposite - forbid all codepages except System/Unicode/Favorites.
- Set Codepages.NoAutoDetectCP to string emumerating all codepages you want to forbid (use comma to separate numbers).
Note that it's still impossible to forbid Unicode (1200, 1201, 65001) - Set Codepages.NoAutoDetectCP = "-1", then open Options / Code Pages, and choose your Favorites in Other section (with Ins key).
Then press Ctrl-H to hide Other section.
Re: Setting static Codepage in Far3-Editor.
Very nice feature, this Far-Config. Thank you very match for this notice.
- John Doe
- Бюрократ
- Posts: 13847
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 73 times
- Been thanked: 428 times
- Contact:
Re: Setting static Codepage in Far3-Editor.
Some params listed there are not available elsewhere, you can see (outdated) list in Documentation\eng\TechInfo.txt