goto & open works together in inputselect

Discuss and share scripts and script files...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

goto & open works together in inputselect

Post 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
To see the attached files, you need to log into the forum.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: goto & open works together in inputselect

Post by TheQwerty »

Code: Select all

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

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: goto & open works together in inputselect

Post 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; }
To see the attached files, you need to log into the forum.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: goto & open works together in inputselect

Post by TheQwerty »

:oops: Got a little carried away when moving the open - glad you figured it out!

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: goto & open works together in inputselect

Post 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:

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: goto & open works together in inputselect

Post 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.

Post Reply