How can get selected items first item position number?

Discuss and share scripts and script files...
Post Reply
drjs5x
Posts: 152
Joined: 18 Nov 2015 18:12
Location: Turkey

How can get selected items first item position number?

Post by drjs5x »

hi dear xyplorer family.

How can get selected items first item position number?

example i select 40-50 jpg files selected first item how can learn position?

sorry my bad english dears.
script.
please help me.
newbie or not...........

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: How can get selected items first item position number?

Post by highend »

Code: Select all

echo gettoken("<get SelectedItemsPathNames |>", 1, "|");
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: How can get selected items first item position number?

Post by bdeshi »

Code: Select all

text gettokenindex(<selitem>, listpane(), '|');
closest to the solution I could come.

edit: saw highend's snippet. His script gives you the first selected item. Mine gives you the ordinal list position of the first selected item. Which one do you want?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

drjs5x
Posts: 152
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: How can get selected items first item position number?

Post by drjs5x »

two replies wonderfull.

and very very thanks. and new want?

i want to x-1 select first item before item position number?
ok thanks

example=

$selection_first_item_pos_number = **** ; $before_pos_number=$selection_first_item_pos_number-1;msg $before_pos_number

my target this but i cant dears.
newbie or not...........

drjs5x
Posts: 152
Joined: 18 Nov 2015 18:12
Location: Turkey

Re: How can get selected items first item position number?

Post by drjs5x »

i can dears ... im happy noww

""
$a = gettokenindex(<selitem>, listpane(), '|');$b =eval($a-1);msg $b;
""

thats greattttt!!!!!!!!!!!!!!!!!!
newbie or not...........

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: How can get selected items first item position number?

Post by highend »

i want to x-1 select first item before item position number?

Code: Select all

sel gettokenindex(<selitem>, listpane(), "|") - 1;
One of my scripts helped you out? Please donate via Paypal

Post Reply