PPIF_SELECTED

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

PPIF_SELECTED

Postby galaxy_far_FAR_away » Sun 03 Apr, 2016 18:12

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 15 times

Shmuel
Posts: 4956
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 11 times
Been thanked: 125 times

PPIF_SELECTED

Postby Shmuel » Mon 04 Apr, 2016 06:33

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


Return to “Support and Troubleshooting”

Who is online

Users browsing this forum: No registered users and 1 guest