Mini-Xenon is just an open file dialog posing as a file manager. (For a full FM see Xenon.) Some people liked it before so I've updated and pafed it.
You are here
Mini-Xenon Portable (aka Simple Explorer)
I think Ryan's gonna like you.
Well... What can I say? Maybe a smiley would be better:
One little thing: still can't select multiple files. Still good though
Well Mediafire's down right now, but here's my version of this thing that handles selecting multiple files. I'm not trying to steal thunder here, or course, I'm just learning AutoIt and this seemed like a good first try. So feel free to adopt parts of it to handle multi files in yours
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=folder.ico #AutoIt3Wrapper_outfile=FileExplorer.exe #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $msg = "Hold down Shift or Ctrl to select multiple files..." $oDir = @HomeDrive Opt("RunErrorsFatal", 0) While 1 SetError(0) $ofile = FileOpenDialog($msg, $oDir, "All Files (*.*)", 1 + 4) If $ofile = "" Then Exit $afile = StringSplit($ofile, "|") If @error Then ShellExecute($ofile, "", @WorkingDir, "open") Else For $i = 2 To $afile[0] ShellExecute(@WorkingDir & "\" & $afile[$i], "", @WorkingDir, "open") Next EndIf $oDir = @WorkingDir WEnd
If you want me to post/host a compiled version, just lemme know. The 'folder.ico' is shell32.dll icon #46 if I remember correctly.
Not bad for a first script. You don't need SetError(0). That is done automatically when you call a function. Instead of If $ofile = "" Then Exit
use If @error Then Exit
Regarding SetError(0), is @error reset each time I call FileOpenDialog() or StringSplit() then? I guess I got confused thinking that meant if I called a user function or something. Thanks for the tips.
@error is reset for any function at all.
I was looking at your script (Mediafire is back up). Is there a reason that this line -
ShellExecute($exe, """" & StringReplace($file, """", """""") & """", $drive & $dir);
couldn't be this -
ShellExecute($exe, '"' & $file & '"', $drive & $dir);
That gives the same result, right? Because $file will never contain quotes to replace.
EDIT - Boy I feel like an jerk tonight after your help earlier, but I think your function could be -
Func LaunchFile($fname) Local $a; _PathSplit($file, $drive, $dir, $a, $ext); Local $exe = IniRead($AssocIni, StringTrimLeft($ext, 1), "exe", ""); If $exe == "" Then ShellExecute($file, "", $drive & $dir); Else ShellExecute($exe, '"' & $file & '"', $drive & $dir); EndIf EndFunc
Without the _PathSplit here, your INI associations don't work.
I just like being cautious. I do that when passing any arguements.