Page 1 of 1

goto & open works together in inputselect

Posted: 11 Sep 2014 21:28
by yusef88
hi, this command gets the contents of my paper folder "favs"

Code: Select all

open inputselect("Favs",  listfolder(paper:favs));
it opens files fine by double click, how to make it go to folders also by dblclick

Re: goto & open works together in inputselect

Posted: 11 Sep 2014 21:32
by TheQwerty

Code: Select all

$item = inputselect("Favs",  listfolder(paper:favs)); if (Exists($item) == 1) { open $item; } else { goto $item; }

Re: goto & open works together in inputselect

Posted: 11 Sep 2014 21:37
by yusef88
thanks for fast reply :o
i get this error:
Could not find:
inputselect("Favs", listfolder(paper:favs)
--------------
update
I figure out why>> it works very well..thanks a lot

$item = inputselect("Favs", listfolder(paper:favs)); if (Exists($item) == 1) { open $item; } else { goto $item; }

Re: goto & open works together in inputselect

Posted: 11 Sep 2014 21:46
by TheQwerty
:oops: Got a little carried away when moving the open - glad you figured it out!

Re: goto & open works together in inputselect

Posted: 03 Dec 2014 03:26
by yusef88

Code: Select all

$item = inputselect("Favs",  listfolder(paper:favs)); if (Exists($item) == 1) { open $item; } else { goto $item; }
can i get Favorites and favorite files in inputselect like above script? :oops:

Re: goto & open works together in inputselect

Posted: 03 Dec 2014 13:00
by TheQwerty
yusef88 wrote:can i get Favorites and favorite files in inputselect like above script? :oops:
You'd have to use getkey to read them out of <xydata>\<xyini>, which means you'll have to force at least a savesettings 1 to ensure you get the current list of favs.

Also since favorites can have captions you'd have to do some additional processing to ensure you're $item contains a location.

It's certainly possible though.