PPIF_SELECTED

You have encountered a problem using Far macros? Here you can get help.
Post Reply
galaxy_far_FAR_away
Posts: 23
Joined: Mon 12 Aug, 2013 14:03
Has thanked: 6 times

PPIF_SELECTED

Post by galaxy_far_FAR_away »

I like to test which item selected in a FAR panel.

These fragments are always true for me:

Code: Select all

if (band(tonumber(current_file.Flags), far.Flags.PPIF_SELECTED))...

Code: Select all

if (band(current_file.Flags, far.Flags.PPIF_SELECTED))...

Code: Select all

if (bit64.band(tonumber(current_file.Flags), far.Flags.PPIF_SELECTED))...

Code: Select all

if (bit64.band(current_file.Flags, far.Flags.PPIF_SELECTED))...
I attached a test file: press key '1' to test if first file in a panel is selected.
Attachments
ppif_selected.lua
(376 Bytes) Downloaded 226 times
Shmuel
Posts: 6815
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 526 times

PPIF_SELECTED

Post by Shmuel »

Incorrect: if band(...) then
Correct: if band(...) ~= 0 then
Post Reply

Return to “Support and Troubleshooting”