You are here

Mini-Xenon Portable (aka Simple Explorer)

9 posts / 0 new
Last post
John Bentley
John Bentley's picture
Offline
Last seen: 14 years 7 months ago
Developer
Joined: 2006-01-24 13:26
Mini-Xenon Portable (aka Simple Explorer)

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.

Home page
Direct Download

Patrick Patience
Offline
Last seen: 4 years 3 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Oh boy

I think Ryan's gonna like you. Smile

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 6 months ago
Joined: 2006-01-06 21:27
Gosh.

Well... What can I say? Maybe a smiley would be better: Shock

One little thing: still can't select multiple files. Still good though Smile

"If you're not part of the solution, you're part of the precipitate."

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Mediafire down right now

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 Smile

#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.

John Bentley
John Bentley's picture
Offline
Last seen: 14 years 7 months ago
Developer
Joined: 2006-01-24 13:26
Not bad for a first script.

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

cowsay Moo
cowthink 'Dude, why are you staring at me.'

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
Regarding SetError(0), is

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.

John Bentley
John Bentley's picture
Offline
Last seen: 14 years 7 months ago
Developer
Joined: 2006-01-24 13:26
@error is reset for any

@error is reset for any function at all.

cowsay Moo
cowthink 'Dude, why are you staring at me.'

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
I was looking at your script

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.

John Bentley
John Bentley's picture
Offline
Last seen: 14 years 7 months ago
Developer
Joined: 2006-01-24 13:26
I just like being cautious.

I just like being cautious. I do that when passing any arguements.

cowsay Moo
cowthink 'Dude, why are you staring at me.'

Log in or register to post comments