Damastah Posted January 21, 2009 Share Posted January 21, 2009 func find() $search = FileFindFirstFile("*.jpg*") ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) ;MsgBox(0, "", $filelist) If @error Then ExitLoop MsgBox(4096, "File:", $file) $filelist += ", " & $file <--Trying to add the strings here. Does not work WEnd ; Close the search handle FileClose($search) I'm basically trying to get a string with a list of .jpg files in the directory delimited by commas. Link to comment Share on other sites More sharing options...
enaiman Posted January 21, 2009 Share Posted January 21, 2009 $filelist &= ", " & $file SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Valuater Posted January 21, 2009 Share Posted January 21, 2009 (edited) Maybe... Local $filelist MsgBox(4096, "File:", $file) $filelist &= $file & @CRLF 8) EDIT: for a comma delimited list, enaiman has it! Edited January 21, 2009 by Valuater Link to comment Share on other sites More sharing options...
SpookMeister Posted January 21, 2009 Share Posted January 21, 2009 Or the long way, if you forget the shorthand version... $filelist = $fileslist & ", " & $file [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Damastah Posted January 21, 2009 Author Share Posted January 21, 2009 Thank you all. Problem solved. Link to comment Share on other sites More sharing options...
monoceres Posted January 21, 2009 Share Posted January 21, 2009 Real men don't use the '&' operator MsgBox(0,"",ManlyHardcoreStringConjugating("Good"," Night")) Func ManlyHardcoreStringConjugating($s1,$s2) $struct=DllStructCreate("wchar["&StringLen($s1)+StringLen($s2)&"]") DllStructSetData($struct,1,$s1) DllStructSetData(DllStructCreate("wchar["&StringLen($s2)&"]",DllStructGetPtr($struct)+StringLen($s1)*2),1,$s2) Return DllStructGetData($struct,1) EndFunc Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 21, 2009 Share Posted January 21, 2009 @monoceres now you have to make all your future scripts like that (or are you not a real man? ) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Valuater Posted January 21, 2009 Share Posted January 21, 2009 Real men don't use the '&' operator Real men don't have computers.... 8) Link to comment Share on other sites More sharing options...
monoceres Posted January 21, 2009 Share Posted January 21, 2009 @monoceres now you have to make all your future scripts like that (or are you not a real man? )Of course, my way is the only way.Real men don't have computers.... 8)Tell me about it, I've never even used a computer. I write all my scripts on a theoretical basis and have a friend post them to this forum. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Paulie Posted January 22, 2009 Share Posted January 22, 2009 Real men don't use the '&' operator MsgBox(0,"",ManlyHardcoreStringConjugating("Good"," Night")) Func ManlyHardcoreStringConjugating($s1,$s2) $struct=DllStructCreate("wchar["&StringLen($s1)+StringLen($s2)&"]") DllStructSetData($struct,1,$s1) DllStructSetData(DllStructCreate("wchar["&StringLen($s2)&"]",DllStructGetPtr($struct)+StringLen($s1)*2),1,$s2) Return DllStructGetData($struct,1) EndFunc Monoceres divides by zero! $struct=DllStructCreate("wchar["&StringLen($s1)+StringLen($s2)&"]") 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