View Single Post
Old 06-12-2021, 11:54 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,461
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
This worked

Code:
program:

k = $#kobocoll;

if check_yes_no('#onkobo', 0, 1, 0) then 'Send to Device'
elif check_yes_no('#onkobo', 0, 0, 1) then
    if 'Kobo Store' in k then 'Kobo Store'
	elif 'Send to Device' in k then 'Send to Device'
	else 'Sideloaded'
	fi
fi
Ideally I'd want to change it to an exact match '^Kobo Store$', but I forgot how to make it use a regexp and it's not likely to overlap any of my other collections anyways.
Is #kobocol tags-like? If so you should use 'inlist' instead of 'in'.
chaley is offline   Reply With Quote