[SOLVED] Show multiple extensions in Gui Listview Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
timoshina
Posts: 28
Joined: 06 Jun 2017, 12:45

[SOLVED] Show multiple extensions in Gui Listview

17 May 2018, 14:03

Fellas, where can I specify which file extensions I want to show in my list?
For example txt, docx, jpg

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
TLM
Posts: 1322
Joined: 01 Oct 2013, 07:52

Re: Show multiple extensions in Gui Listview

17 May 2018, 14:13

try something like

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I just eyeballed so no guarantee it's exactly what you're after.
timoshina
Posts: 28
Joined: 06 Jun 2017, 12:45

Re: Show multiple extensions in Gui Listview

17 May 2018, 14:27

TLM wrote:try something like

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

I just eyeballed so no guarantee it's exactly what you're after.


I appreciate fast answer but unfortunately something is missing. Now it doesn't show any files at all.
timoshina
Posts: 28
Joined: 06 Jun 2017, 12:45

Re: Show multiple extensions in Gui Listview

17 May 2018, 15:01

ok I think I got it and It seems to work. :) Hope this is the proper way to go

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

timoshina
Posts: 28
Joined: 06 Jun 2017, 12:45

Re: Show multiple extensions in Gui Listview

17 May 2018, 15:25

Funny thing the code above works in windows 10 but does not work in windows 7 (only shows first loop). Question is still open then :|
User avatar
TLM
Posts: 1322
Joined: 01 Oct 2013, 07:52

Re: Show multiple extensions in Gui Listview  Topic is solved

17 May 2018, 15:34

This works for me on all OS's

Code: [Select all] [Download] GeSHi © Codebox Plus

fileExtensions = txt jpg docx

Loop, %A_Desktop%\*.*
{
if ( InStr( fileExtensions, A_LoopFileExt ) )
msgbox % A_LoopFileFullPath
}
Obviously you'd have to change the message box to you ListView command.

You only have to loop through the files once.
timoshina
Posts: 28
Joined: 06 Jun 2017, 12:45

Re: Show multiple extensions in Gui Listview

17 May 2018, 16:25

Thank you, TLM!

Here is the final code

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: Exaskryz, lukeman3000, pro100andrik94 and 58 guests