pase Posted May 25, 2007 Share Posted May 25, 2007 Hello, I often tried to write scripts with relative paths. For example with the @ScriptDir Macro to convert all jpg pictures in the script's folder to thumbnails: $search = FileFindFirstFile('"' & @ScriptDir & '\*.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 ; create Thumbnails $file = FileFindNextFile($search) If @error Then ExitLoop $i = $i + 1 RunWait("C:\Programs\make_thumb.exe " & $file, "", ) WEnd FileClose($search)oÝ÷ Ù8^IÊâ¦Ö¥Á¬¬µêævzÌ"¶axǬ±¨ªê-6âë?v*ÞrÚ+ë&j×!yÛazÇÈijÛ^®z®¢Ö¥¶.az·ç^~)âµérW¬{aÇè׫N¨¶«Á¬®§v'Èr§ëayø«²Ùbëhjv²nµêZ¶azÇ+p¢¹,){^r×z®¶sbb33c·6V&6ÒfÆTfæDf'7DfÆR3¢b3#´fÆW2b3#²¢æ§r Of course it would be better, if the script would work with relative paths... I'm sure that there is only a small change necessary, but I have no idea... Any help would be appreciated! Greets pase Link to comment Share on other sites More sharing options...
Developers Jos Posted May 25, 2007 Developers Share Posted May 25, 2007 just this should work: $search = FileFindFirstFile(@ScriptDir & '\*.jpg' ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
GaryFrost Posted May 25, 2007 Share Posted May 25, 2007 just this should work:$search = FileFindFirstFile(@ScriptDir & '\*.jpg' )as long is the script is running from that folder. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
pase Posted May 25, 2007 Author Share Posted May 25, 2007 That is really amazing, I got a reply, which solves my problem, within two minutes Thank you very much! Greets pase Link to comment Share on other sites More sharing options...
Developers Jos Posted May 25, 2007 Developers Share Posted May 25, 2007 (edited) That is really amazing, I got a reply, which solves my problem, within two minutes mmmm not sure how to interpret that line and I should take that personal .. (j/k) Edited May 25, 2007 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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