michaelslamet Posted May 5, 2010 Share Posted May 5, 2010 Let say a user choose multiple file with FileOpenDialog. How to code to process these chosen files with While or For to do looping? $var = FileOpenDialog($message, @WindowsDir & "\", "Text (*.txt)", 1 + 4 ) I understand the $var will contain foldername and list of selected files separated with | How to code this logic in autoit: for first-file until last-file blblbla endfor or while read first file read second file until there is no more chosen file Thanks a lot!! Michael. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 5, 2010 Share Posted May 5, 2010 Here's a modified help file example ; Multiple filter group $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @WindowsDir & "", "Images (*.jpg;*.bmp)|Videos (*.avi;*.mpg)", 1 + 4 ) If @error Then MsgBox(4096,"","No File(s) chosen") Else $var = StringSplit($var, "|") For $i = 2 To $var[0] MsgBox(4096,"","You chose " & $var[$i]) Next EndIf - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
michaelslamet Posted May 5, 2010 Author Share Posted May 5, 2010 Wow, this is exactly what I need to know. Many thanks Bruce, you're the man ) Here's a modified help file example ; Multiple filter group $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @WindowsDir & "", "Images (*.jpg;*.bmp)|Videos (*.avi;*.mpg)", 1 + 4 ) If @error Then MsgBox(4096,"","No File(s) chosen") Else $var = StringSplit($var, "|") For $i = 2 To $var[0] MsgBox(4096,"","You chose " & $var[$i]) Next EndIf Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 5, 2010 Share Posted May 5, 2010 You bet, Good luck. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
michaelslamet Posted May 5, 2010 Author Share Posted May 5, 2010 Thanks, Bruce I need to learn alot after years without programming You bet, Good luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now