![Very Happy :D](./images/smilies/icon_biggrin.gif)
Edit: And I'll use the mod version of Notepad2 which has more extension schemes (but these will still open in Notepad2 official.)
That's true and I was a little surprised to see that. For lack of documentation by the author, I would probably borrow them from another similar text editor that does list them. In this example, Notepad2 evidently uses Scintilla for its source editing code, so you could probably use that at least as a start.guinness wrote:So considering all these applications are included in PortableApps and are the 'big players' in the portable world, I will go through these and check their associations, but my problem is Notepad2 for example doesn't specify the list of potential extensions it can open, so this is where I would need feedback.
Definitely. CAFE/Coffee associations are one element that, once I set it up on my computer, I really didn't have to touch it again for years, and its paid off over and over in terms of ease and simplicity. I always thought it was the primary selling point of the Kitchen Sink project and would probably still be working on CAFE in some capacity if I was still doing my own freeware distro.guinness wrote:Thanks for showing interest webfork.
Code: Select all
ahk=Notepad2.exe
as=Notepad2.exe
asc=Notepad2.exe
asm=Notepad2.exe
asp=Notepad2.exe
aspx=Notepad2.exe
au3=Notepad2.exe
avs=Notepad2.exe
avsi=Notepad2.exe
axl=Notepad2.exe
bas=Notepad2.exe
bat=Notepad2.exe
c=Notepad2.exe
cc=Notepad2.exe
cfg=Notepad2.exe
cfm=Notepad2.exe
cgi=Notepad2.exe
cls=Notepad2.exe
cmake=Notepad2.exe
cmd=Notepad2.exe
conf=Notepad2.exe
cpp=Notepad2.exe
cs=Notepad2.exe
css=Notepad2.exe
ctest=Notepad2.exe
ctl=Notepad2.exe
cxx=Notepad2.exe
dfm=Notepad2.exe
diff=Notepad2.exe
diz=Notepad2.exe
dlg=Notepad2.exe
dob=Notepad2.exe
dpk=Notepad2.exe
dpr=Notepad2.exe
dsm=Notepad2.exe
dsp=Notepad2.exe
dsr=Notepad2.exe
dtd=Notepad2.exe
frm=Notepad2.exe
h=Notepad2.exe
hh=Notepad2.exe
hpp=Notepad2.exe
hta=Notepad2.exe
htaccess=Notepad2.exe
htc=Notepad2.exe
htd=Notepad2.exe
htm=Notepad2.exe
html=Notepad2.exe
htt=Notepad2.exe
hxx=Notepad2.exe
ia=Notepad2.exe
idl=Notepad2.exe
inc=Notepad2.exe
inf=Notepad2.exe
ini=Notepad2.exe
inl=Notepad2.exe
isl=Notepad2.exe
islu=Notepad2.exe
iss=Notepad2.exe
itcl=Notepad2.exe
java=Notepad2.exe
js=Notepad2.exe
jse=Notepad2.exe
jsm=Notepad2.exe
json=Notepad2.exe
latex=Notepad2.exe
log=Notepad2.exe
lua=Notepad2.exe
m=Notepad2.exe
mak=Notepad2.exe
make=Notepad2.exe
mk=Notepad2.exe
mm=Notepad2.exe
msc=Notepad2.exe
msvc=Notepad2.exe
nfo=Notepad2.exe
nsh=Notepad2.exe
nsi=Notepad2.exe
odl=Notepad2.exe
oem=Notepad2.exe
pag=Notepad2.exe
pas=Notepad2.exe
patch=Notepad2.exe
php=Notepad2.exe
php3=Notepad2.exe
phtml=Notepad2.exe
pl=Notepad2.exe
pm=Notepad2.exe
pod=Notepad2.exe
pp=Notepad2.exe
properties=Notepad2.exe
ps1=Notepad2.exe
psd1=Notepad2.exe
psm1=Notepad2.exe
py=Notepad2.exe
pyw=Notepad2.exe
r=Notepad2.exe
rake=Notepad2.exe
Rakefile=Notepad2.exe
rb=Notepad2.exe
rbw=Notepad2.exe
rc=Notepad2.exe
rc2=Notepad2.exe
rct=Notepad2.exe
rdf=Notepad2.exe
reg=Notepad2.exe
rh=Notepad2.exe
rjs=Notepad2.exe
rss=Notepad2.exe
ruby=Notepad2.exe
scriptlet=Notepad2.exe
sed=Notepad2.exe
sh=Notepad2.exe
shtml=Notepad2.exe
sif=Notepad2.exe
sql=Notepad2.exe
sty=Notepad2.exe
svg=Notepad2.exe
tcl=Notepad2.exe
tex=Notepad2.exe
text=Notepad2.exe
theme=Notepad2.exe
tpl=Notepad2.exe
txt=Notepad2.exe
url=Notepad2.exe
vb=Notepad2.exe
vbs=Notepad2.exe
vcproj=Notepad2.exe
wtx=Notepad2.exe
xaml=Notepad2.exe
xhtml=Notepad2.exe
xml=Notepad2.exe
xsd=Notepad2.exe
xsl=Notepad2.exe
xslt=Notepad2.exe
xul=Notepad2.exe
Code: Select all
_Main()
Func _Main()
Local $aSplit, $sFilePath = @ScriptDir & "\Config.txt", $sReturn = ""
Local $aArray = IniReadSectionNames(@ScriptDir & "\Notepad2Scheme.ini")
For $i = 1 To $aArray[0]
$aSplit = StringSplit(IniRead(@ScriptDir & "\Notepad2Scheme.ini", $aArray[$i], "FileNameExtensions", ""), ";")
For $j = 1 To $aSplit[0]
$sReturn &= StringStripWS($aSplit[$j], 3) & "=" & @CRLF
Next
Next
_SetFile($sReturn, $sFilePath, 1)
EndFunc ;==>_Main
Func _SetFile($sString, $sFile, $iOverwrite = 0) ; By guinness.
Local $hFileOpen
$hFileOpen = FileOpen($sFile, $iOverwrite + 1)
FileWrite($hFileOpen, $sString)
FileClose($hFileOpen)
If @error Then
Return SetError(1, 0, $sString)
EndIf
Return $sString
EndFunc ;==>_SetFile
Code: Select all
001=7-Zip.exe
7z=7-Zip.exe
arj=7-Zip.exe
bz2=7-Zip.exe
bzip2=7-Zip.exe
cab=7-Zip.exe
cpio=7-Zip.exe
deb=7-Zip.exe
dmg=7-Zip.exe
fat=7-Zip.exe
gz=7-Zip.exe
gzip=7-Zip.exe
hfs=7-Zip.exe
iso=7-Zip.exe
lha=7-Zip.exe
lzh=7-Zip.exe
lzma=7-Zip.exe
ntfs=7-Zip.exe
rar=7-Zip.exe
rpm=7-Zip.exe
squashfs=7-Zip.exe
swm=7-Zip.exe
tar=7-Zip.exe
taz=7-Zip.exe
tbz=7-Zip.exe
tbz2=7-Zip.exe
tgz=7-Zip.exe
tpz=7-Zip.exe
txz=7-Zip.exe
vhd=7-Zip.exe
wim=7-Zip.exe
xar=7-Zip.exe
xz=7-Zip.exe
z=7-Zip.exe
zip=7-Zip.exe
Code: Select all
#include <Array.au3> ; Required only for _ArrayDisplay(), but not the UDF!
#include <GUIListView.au3>
_Main()
Func _Main()
Local $aArray, $hListView = ControlGetHandle("[TITLE:Options; CLASS:#32770]", "", "[CLASS:SysListView32; INSTANCE:1]"), _
$sFilePath = @ScriptDir & "\Config.txt", $sReturn = ""
$aArray = _GUICtrlListView_CreateArray($hListView)
For $i = 1 To $aArray[0][0]
$sReturn &= StringStripWS($aArray[$i][0], 3) & "=7-Zip.exe" & @CRLF
Next
_SetFile($sReturn, $sFilePath, 1)
_ArrayDisplay($aArray)
EndFunc ;==>_Main
Func _SetFile($sString, $sFile, $iOverwrite = 0) ; By guinness.
Local $hFileOpen
$hFileOpen = FileOpen($sFile, $iOverwrite + 1)
FileWrite($hFileOpen, $sString)
FileClose($hFileOpen)
If @error Then
Return SetError(1, 0, $sString)
EndIf
Return $sString
EndFunc ;==>_SetFile
; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
; #FUNCTION# =========================================================================================================
; Name...........: _GUICtrlListView_CreateArray()
; Description ...: Creates a 2-dimensional array from a lisview.
; Syntax.........: _GUICtrlListView_CreateArray($hListView, [$sDelimeter = "|"])
; Parameters ....: $hListView - Handle of the ListView.
; [Optional] $sDelimeter - One or more characters to use as delimiters (case sensitive). Default = "|"
; Requirement(s).: v3.2.12.1 or higher & GUIListView.au3.
; Return values .: Success - The array returned is two-dimensional and is made up as follows:
; $aArray[0][0] = Number of rows
; $aArray[0][1] = Number of columns
; $aArray[0][3] = Delimited string of the column name(s) e.g. Column 1|Column 2|Column 3|Column nth
; $aArray[1][0] = 1st row, 1st column
; $aArray[1][1] = 1st row, 2nd column
; $aArray[n][0] = nth row, 1st column
; $aArray[n][1] = nth row, 2nd column
; $aArray[n][1] = nth row, 3rd column
; Failure - Returns array with @error = 1 if the number of rows is equal to 0
; Author ........: guinness
; Example........; Yes
;=====================================================================================================================
Func _GUICtrlListView_CreateArray($hListView, $sDelimeter = "|")
Local $aColumns, $iDim = 0, $iError = 0, $sIndex, $sSubItem
Local $iColumnCount = _GUICtrlListView_GetColumnCount($hListView)
Local $iItemCount = _GUICtrlListView_GetItemCount($hListView)
If $iColumnCount < 3 Then
$iDim = 3 - $iColumnCount
EndIf
Local $aReturn[$iItemCount + 1][$iColumnCount + $iDim] = [[$iItemCount, $iColumnCount, ""]]
For $A = 0 To $iColumnCount - 1
$aColumns = _GUICtrlListView_GetColumn($hListView, $A)
If $A = $iColumnCount - 1 Then
$sDelimeter = ""
EndIf
$aReturn[0][2] &= $aColumns[5] & $sDelimeter
Next
For $A = 0 To $iItemCount - 1
$sIndex = _GUICtrlListView_GetItemText($hListView, $A)
$aReturn[$A + 1][0] = $sIndex
If $iColumnCount > 0 Then
For $B = 1 To $iColumnCount - 1
$sSubItem = _GUICtrlListView_GetItemText($hListView, $A, $B)
$aReturn[$A + 1][$B] = $sSubItem
Next
EndIf
Next
If $aReturn[0][0] = 0 Then
$iError = 1
EndIf
Return SetError($iError, 0, $aReturn)
EndFunc ;==>_GUICtrlListView_CreateArray
Code: Select all
acr=IrfanView.exe
ani=IrfanView.exe
arw=IrfanView.exe
bmp=IrfanView.exe
cgm=IrfanView.exe
clp=IrfanView.exe
cpt=IrfanView.exe
crw=IrfanView.exe
cur=IrfanView.exe
dcm=IrfanView.exe
dcr=IrfanView.exe
dcx=IrfanView.exe
dib=IrfanView.exe
djvu=IrfanView.exe
dll=IrfanView.exe
dng=IrfanView.exe
dwg=IrfanView.exe
dxf=IrfanView.exe
eef=IrfanView.exe
emf=IrfanView.exe
eps=IrfanView.exe
exe=IrfanView.exe
gif=IrfanView.exe
hdp=IrfanView.exe
hpgl=IrfanView.exe
icl=IrfanView.exe
ico=IrfanView.exe
iff=IrfanView.exe
jp2=IrfanView.exe
jpc=IrfanView.exe
jpeg=IrfanView.exe
jpg=IrfanView.exe
mng=IrfanView.exe
mrsid=IrfanView.exe
mrw=IrfanView.exe
nef=IrfanView.exe
nlm=IrfanView.exe
nol=IrfanView.exe
orf=IrfanView.exe
pbm=IrfanView.exe
pcd=IrfanView.exe
pcx=IrfanView.exe
pdf=IrfanView.exe
pef=IrfanView.exe
pgm=IrfanView.exe
pict=IrfanView.exe
png=IrfanView.exe
ppm=IrfanView.exe
ps=IrfanView.exe
psd=IrfanView.exe
raf=IrfanView.exe
ras=IrfanView.exe
raw=IrfanView.exe
rw2=IrfanView.exe
sgi=IrfanView.exe
srf=IrfanView.exe
swf=IrfanView.exe
tga=IrfanView.exe
tif=IrfanView.exe
tiff=IrfanView.exe
txt=IrfanView.exe
wbc=IrfanView.exe
wmf=IrfanView.exe
x3f=IrfanView.exe
Code: Select all
acr=IrfanView.exe
ai=IrfanView.exe
ani=IrfanView.exe
arw=IrfanView.exe
awd=IrfanView.exe
b3d=IrfanView.exe
bmp=IrfanView.exe
cam=IrfanView.exe
cgm=IrfanView.exe
clp=IrfanView.exe
cpt=IrfanView.exe
cr2=IrfanView.exe
crw=IrfanView.exe
cur=IrfanView.exe
dcm=IrfanView.exe
dcr=IrfanView.exe
dcx=IrfanView.exe
dds=IrfanView.exe
dib=IrfanView.exe
djvu=IrfanView.exe
dll=IrfanView.exe
dng=IrfanView.exe
dwg=IrfanView.exe
dxf=IrfanView.exe
ecw=IrfanView.exe
eef=IrfanView.exe
emf=IrfanView.exe
eps=IrfanView.exe
exe=IrfanView.exe
exr=IrfanView.exe
fits=IrfanView.exe
flv=IrfanView.exe
fpx=IrfanView.exe
fsh=IrfanView.exe
g3=IrfanView.exe
gif=IrfanView.exe
hdp=IrfanView.exe
hdr=IrfanView.exe
hpgl=IrfanView.exe
icl=IrfanView.exe
ico=IrfanView.exe
ics=IrfanView.exe
iff=IrfanView.exe
ima=IrfanView.exe
img=IrfanView.exe
iw44=IrfanView.exe
j2k=IrfanView.exe
jls=IrfanView.exe
jng=IrfanView.exe
jp2=IrfanView.exe
jpc=IrfanView.exe
jpeg=IrfanView.exe
jpg=IrfanView.exe
jpm=IrfanView.exe
kdc=IrfanView.exe
lbm=IrfanView.exe
mng=IrfanView.exe
mrc=IrfanView.exe
mrsid=IrfanView.exe
mrw=IrfanView.exe
nef=IrfanView.exe
ngg=IrfanView.exe
nlm=IrfanView.exe
nol=IrfanView.exe
nrw=IrfanView.exe
orf=IrfanView.exe
pbm=IrfanView.exe
pcd=IrfanView.exe
pcx=IrfanView.exe
pdn=IrfanView.exe
pef=IrfanView.exe
pgm=IrfanView.exe
pic=IrfanView.exe
pict=IrfanView.exe
png=IrfanView.exe
ppm=IrfanView.exe
ps=IrfanView.exe
psd=IrfanView.exe
psp=IrfanView.exe
pvr=IrfanView.exe
qtif=IrfanView.exe
raf=IrfanView.exe
ras=IrfanView.exe
raw=IrfanView.exe
rgb=IrfanView.exe
rle=IrfanView.exe
rw2=IrfanView.exe
sff=IrfanView.exe
sfw=IrfanView.exe
sgi=IrfanView.exe
sid=IrfanView.exe
sif=IrfanView.exe
srf=IrfanView.exe
sun=IrfanView.exe
svg=IrfanView.exe
swf=IrfanView.exe
tga=IrfanView.exe
tif=IrfanView.exe
tiff=IrfanView.exe
ttf=IrfanView.exe
txt=IrfanView.exe
vtf=IrfanView.exe
wad=IrfanView.exe
wal=IrfanView.exe
wbc=IrfanView.exe
wbmp=IrfanView.exe
wbz=IrfanView.exe
wdp=IrfanView.exe
webp=IrfanView.exe
wmf=IrfanView.exe
wsq=IrfanView.exe
x3f=IrfanView.exe
xbm=IrfanView.exe
xcf=IrfanView.exe
xpm=IrfanView.exe
yuv=IrfanView.exe
Code: Select all
#include <String.au3>
_Main()
Func _Main()
Local $iIsPlugins = 0 ; Change to 1 if using Plugins.
Local $aSplit_1, $aSplit_2, $sFilePath = @ScriptDir & "\Config.txt", $sReturn = ""
; You can retrieve the file from http://www.irfanview.com/main_formats.htm
Local $aArray = _StringBetween(_GetFile(@ScriptDir & "\IrfanView formats.html", 0), '<td width="26%">', '</td>')
For $i = 0 To UBound($aArray) - 1
If StringInStr($aArray[$i], "Video/Audio") Then
ExitLoop
EndIf
$aArray[$i] = StringReplace($aArray[$i], " ", "")
$aArray[$i] = StringReplace($aArray[$i], "Extension", "")
$aArray[$i] = StringReplace($aArray[$i], '<b>Graphic formats:</b>', "")
$aArray[$i] = StringReplace($aArray[$i], 'Mac ', "")
If StringStripWS($aArray[$i], 8) = "" Then
ContinueLoop
EndIf
$aSplit_1 = StringSplit($aArray[$i], ",")
For $j = 1 To $aSplit_1[0]
$aSplit_2 = StringSplit($aSplit_1[$j], "/")
For $k = 1 To $aSplit_2[0]
$aSplit_2[$k] = StringStripWS($aSplit_2[$k], 3)
If StringInStr($aSplit_2[$k], "*") And $iIsPlugins = 0 Then
ContinueLoop
EndIf
$aSplit_2[$k] = StringReplace($aSplit_2[$k], "*", "")
$sReturn &= StringLower($aSplit_2[$k]) & "=IrfanView.exe" & @CRLF
Next
Next
Next
_SetFile($sReturn, $sFilePath, 1)
EndFunc ;==>_Main
Func _GetFile($sFile, $sFormat = 0) ; By guinness.
Local $hFileOpen, $sData
$hFileOpen = FileOpen($sFile, $sFormat)
If $hFileOpen = -1 Then
Return SetError(1, 0, "")
EndIf
$sData = FileRead($hFileOpen)
FileClose($hFileOpen)
Return $sData
EndFunc ;==>_GetFile
Func _SetFile($sString, $sFile, $iOverwrite = 0) ; By guinness.
Local $hFileOpen
$hFileOpen = FileOpen($sFile, $iOverwrite + 1)
FileWrite($hFileOpen, $sString)
FileClose($hFileOpen)
If @error Then
Return SetError(1, 0, $sString)
EndIf
Return $sString
EndFunc ;==>_SetFile
Code: Select all
acr=IrfanView.exe
ani=IrfanView.exe
arw=IrfanView.exe
bmp=IrfanView.exe
cgm=IrfanView.exe
clp=IrfanView.exe
cpt=IrfanView.exe
crw=IrfanView.exe
cur=IrfanView.exe
dcm=IrfanView.exe
dcr=IrfanView.exe
dcx=IrfanView.exe
dib=IrfanView.exe
djvu=IrfanView.exe
dll=IrfanView.exe
dng=IrfanView.exe
dwg=IrfanView.exe
dxf=IrfanView.exe
eef=IrfanView.exe
emf=IrfanView.exe
eps=IrfanView.exe
exe=IrfanView.exe
gif=IrfanView.exe
hdp=IrfanView.exe
hpgl=IrfanView.exe
icl=IrfanView.exe
ico=IrfanView.exe
iff=IrfanView.exe
jp2=IrfanView.exe
jpc=IrfanView.exe
jpeg=IrfanView.exe
jpg=IrfanView.exe
mng=IrfanView.exe
mrsid=IrfanView.exe
mrw=IrfanView.exe
nef=IrfanView.exe
nlm=IrfanView.exe
nol=IrfanView.exe
orf=IrfanView.exe
pbm=IrfanView.exe
pcd=IrfanView.exe
pcx=IrfanView.exe
pdf=IrfanView.exe
pef=IrfanView.exe
pgm=IrfanView.exe
pict=IrfanView.exe
png=IrfanView.exe
ppm=IrfanView.exe
ps=IrfanView.exe
psd=IrfanView.exe
raf=IrfanView.exe
ras=IrfanView.exe
raw=IrfanView.exe
rw2=IrfanView.exe
sgi=IrfanView.exe
srf=IrfanView.exe
swf=IrfanView.exe
tga=IrfanView.exe
tif=IrfanView.exe
tiff=IrfanView.exe
wbc=IrfanView.exe
wmf=IrfanView.exe
x3f=IrfanView.exe
Code: Select all
acr=IrfanView.exe
ai=IrfanView.exe
ani=IrfanView.exe
arw=IrfanView.exe
awd=IrfanView.exe
b3d=IrfanView.exe
bmp=IrfanView.exe
cam=IrfanView.exe
cgm=IrfanView.exe
clp=IrfanView.exe
cpt=IrfanView.exe
cr2=IrfanView.exe
crw=IrfanView.exe
cur=IrfanView.exe
dcm=IrfanView.exe
dcr=IrfanView.exe
dcx=IrfanView.exe
dds=IrfanView.exe
dib=IrfanView.exe
djvu=IrfanView.exe
dll=IrfanView.exe
dng=IrfanView.exe
dwg=IrfanView.exe
dxf=IrfanView.exe
ecw=IrfanView.exe
eef=IrfanView.exe
emf=IrfanView.exe
eps=IrfanView.exe
exe=IrfanView.exe
exr=IrfanView.exe
fits=IrfanView.exe
fpx=IrfanView.exe
fsh=IrfanView.exe
g3=IrfanView.exe
gif=IrfanView.exe
hdp=IrfanView.exe
hdr=IrfanView.exe
hpgl=IrfanView.exe
icl=IrfanView.exe
ico=IrfanView.exe
ics=IrfanView.exe
iff=IrfanView.exe
ima=IrfanView.exe
img=IrfanView.exe
iw44=IrfanView.exe
j2k=IrfanView.exe
jls=IrfanView.exe
jng=IrfanView.exe
jp2=IrfanView.exe
jpc=IrfanView.exe
jpeg=IrfanView.exe
jpg=IrfanView.exe
jpm=IrfanView.exe
kdc=IrfanView.exe
lbm=IrfanView.exe
mng=IrfanView.exe
mrc=IrfanView.exe
mrsid=IrfanView.exe
mrw=IrfanView.exe
nef=IrfanView.exe
ngg=IrfanView.exe
nlm=IrfanView.exe
nol=IrfanView.exe
nrw=IrfanView.exe
orf=IrfanView.exe
pbm=IrfanView.exe
pcd=IrfanView.exe
pcx=IrfanView.exe
pdn=IrfanView.exe
pef=IrfanView.exe
pgm=IrfanView.exe
pic=IrfanView.exe
pict=IrfanView.exe
png=IrfanView.exe
ppm=IrfanView.exe
ps=IrfanView.exe
psd=IrfanView.exe
psp=IrfanView.exe
pvr=IrfanView.exe
qtif=IrfanView.exe
raf=IrfanView.exe
ras=IrfanView.exe
raw=IrfanView.exe
rgb=IrfanView.exe
rle=IrfanView.exe
rw2=IrfanView.exe
sff=IrfanView.exe
sfw=IrfanView.exe
sgi=IrfanView.exe
sid=IrfanView.exe
srf=IrfanView.exe
sun=IrfanView.exe
swf=IrfanView.exe
tga=IrfanView.exe
tif=IrfanView.exe
tiff=IrfanView.exe
ttf=IrfanView.exe
vtf=IrfanView.exe
wad=IrfanView.exe
wal=IrfanView.exe
wbc=IrfanView.exe
wbmp=IrfanView.exe
wbz=IrfanView.exe
wdp=IrfanView.exe
webp=IrfanView.exe
wmf=IrfanView.exe
wsq=IrfanView.exe
x3f=IrfanView.exe
xbm=IrfanView.exe
xcf=IrfanView.exe
xpm=IrfanView.exe
yuv=IrfanView.exe
Code: Select all
_Main()
Func _Main()
Local $sFilePath = @ScriptDir & "\Config.txt", $sReturn = ""
; Make sure you add [associations] to the top of the files you are comparing.
Local $aArray_1 = IniReadSection(@ScriptDir & "\IrfanView.txt", "associations")
Local $aArray_2 = IniReadSection(@ScriptDir & "\Notepad2.txt", "associations")
For $i = 1 To $aArray_1[0][0]
For $j = 1 To $aArray_2[0][0]
If $aArray_1[$i][0] = $aArray_2[$j][0] Then
ContinueLoop 2
EndIf
Next
$sReturn &= $aArray_1[$i][0] & "=" & $aArray_1[$i][1] & @CRLF
Next
_SetFile($sReturn, $sFilePath, 1)
EndFunc ;==>_Main
Func _SetFile($sString, $sFile, $iOverwrite = 0) ; By guinness.
Local $hFileOpen
$hFileOpen = FileOpen($sFile, $iOverwrite + 1)
FileWrite($hFileOpen, $sString)
FileClose($hFileOpen)
If @error Then
Return SetError(1, 0, $sString)
EndIf
Return $sString
EndFunc ;==>_SetFile
Thanks for reviving this topic. Btw, webfork's site is now @ http://sourceforge.net/apps/mediawiki/k ... CafeConfigguinness wrote:I decided to re-vist webfork's page for different CAFE configurations for eXpressowebfork wrote:Having worked with CAFE a lot recently for the Kitchen Sink project, I've developed a short list of CAFE config files for other programs on portablefreeware.com:
http://sites.google.com/site/cafeconfig/
Code: Select all
cb7=Sumatra PDF.exe
cba=Sumatra PDF.exe
cbr=Sumatra PDF.exe
cbt=Sumatra PDF.exe
cbz=Sumatra PDF.exe
chm=Sumatra PDF.exe
djv=Sumatra PDF.exe
djvu=Sumatra PDF.exe
pdf=Sumatra PDF.exe
Code: Select all
None, I read the website for supported file extensions.
Code: Select all
torrent=uTorrent.exe
Code: Select all
a52=VLC.exe
aac=VLC.exe
ac3=VLC.exe
asf=VLC.exe
asx=VLC.exe
avi=VLC.exe
b4s=VLC.exe
divx=VLC.exe
dts=VLC.exe
dv=VLC.exe
flac=VLC.exe
flv=VLC.exe
gxf=VLC.exe
ifo=VLC.exe
m1v=VLC.exe
m2ts=VLC.exe
m2v=VLC.exe
m3u=VLC.exe
m4a=VLC.exe
m4p=VLC.exe
m4v=VLC.exe
mka=VLC.exe
mkv=VLC.exe
mod=VLC.exe
mov=VLC.exe
mp1=VLC.exe
mp2=VLC.exe
mp3=VLC.exe
mp4=VLC.exe
mpeg1=VLC.exe
mpeg2=VLC.exe
mpeg4=VLC.exe
mpeg=VLC.exe
mpg=VLC.exe
mts=VLC.exe
mxf=VLC.exe
oga=VLC.exe
ogg=VLC.exe
ogm=VLC.exe
ogv=VLC.exe
ogx=VLC.exe
oma=VLC.exe
pls=VLC.exe
sdp=VLC.exe
spx=VLC.exe
ts=VLC.exe
tta=VLC.exe
vlc=VLC.exe
vob=VLC.exe
vro=VLC.exe
wav=VLC.exe
wma=VLC.exe
wmv=VLC.exe
xm=VLC.exe
xspf=VLC.exe
Code: Select all
None, because VLC uses Nokia's QT framework, so I went to Tools >> Preferences >> Interface >> Setup file associations and then manually wrote down the supported extensions.
Code: Select all
123=LibreOffice.exe
602=LibreOffice.exe
bmp=LibreOffice.exe
cgm=LibreOffice.exe
csv=LibreOffice.exe
dbf=LibreOffice.exe
dif=LibreOffice.exe
doc=LibreOffice.exe
docm=LibreOffice.exe
docx=LibreOffice.exe
dot=LibreOffice.exe
dotm=LibreOffice.exe
dotx=LibreOffice.exe
dxf=LibreOffice.exe
emf=LibreOffice.exe
eps=LibreOffice.exe
fodg=LibreOffice.exe
fodp=LibreOffice.exe
fods=LibreOffice.exe
fodt=LibreOffice.exe
gif=LibreOffice.exe
htm=LibreOffice.exe
html=LibreOffice.exe
hwp=LibreOffice.exe
jfif=LibreOffice.exe
jif=LibreOffice.exe
jpe=LibreOffice.exe
jpeg=LibreOffice.exe
jpg=LibreOffice.exe
lwp=LibreOffice.exe
met=LibreOffice.exe
mml=LibreOffice.exe
odb=LibreOffice.exe
odf=LibreOffice.exe
odg=LibreOffice.exe
odm=LibreOffice.exe
odp=LibreOffice.exe
ods=LibreOffice.exe
odt=LibreOffice.exe
otg=LibreOffice.exe
oth=LibreOffice.exe
otp=LibreOffice.exe
ots=LibreOffice.exe
ott=LibreOffice.exe
pbm=LibreOffice.exe
pcd=LibreOffice.exe
pct=LibreOffice.exe
pcx=LibreOffice.exe
pdb=LibreOffice.exe
pdf=LibreOffice.exe
pgm=LibreOffice.exe
pict=LibreOffice.exe
png=LibreOffice.exe
pot=LibreOffice.exe
potm=LibreOffice.exe
potx=LibreOffice.exe
ppm=LibreOffice.exe
pps=LibreOffice.exe
ppsx=LibreOffice.exe
ppt=LibreOffice.exe
pptm=LibreOffice.exe
pptx=LibreOffice.exe
psd=LibreOffice.exe
psw=LibreOffice.exe
pxl=LibreOffice.exe
ras=LibreOffice.exe
rtf=LibreOffice.exe
sda=LibreOffice.exe
sdc=LibreOffice.exe
sdd=LibreOffice.exe
sdp=LibreOffice.exe
sdw=LibreOffice.exe
sgf=LibreOffice.exe
sgl=LibreOffice.exe
sgv=LibreOffice.exe
slk=LibreOffice.exe
smf=LibreOffice.exe
stc=LibreOffice.exe
std=LibreOffice.exe
sti=LibreOffice.exe
stw=LibreOffice.exe
svg=LibreOffice.exe
svm=LibreOffice.exe
sxc=LibreOffice.exe
sxd=LibreOffice.exe
sxg=LibreOffice.exe
sxi=LibreOffice.exe
sxm=LibreOffice.exe
sxw=LibreOffice.exe
tga=LibreOffice.exe
tif=LibreOffice.exe
tiff=LibreOffice.exe
txt=LibreOffice.exe
uof=LibreOffice.exe
uop=LibreOffice.exe
uos=LibreOffice.exe
uot=LibreOffice.exe
vor=LibreOffice.exe
wb2=LibreOffice.exe
wk1=LibreOffice.exe
wks=LibreOffice.exe
wmf=LibreOffice.exe
wpd=LibreOffice.exe
wpg=LibreOffice.exe
wps=LibreOffice.exe
xbm=LibreOffice.exe
xlc=LibreOffice.exe
xlk=LibreOffice.exe
xlm=LibreOffice.exe
xls=LibreOffice.exe
xlsb=LibreOffice.exe
xlsm=LibreOffice.exe
xlsx=LibreOffice.exe
xlt=LibreOffice.exe
xltm=LibreOffice.exe
xltx=LibreOffice.exe
xlw=LibreOffice.exe
xml=LibreOffice.exe
xpm=LibreOffice.exe
Code: Select all
#include <GuiComboBoxEx.au3>
_Main()
Func _Main()
Local $aArray, $aSplit, $hComboBox = ControlGetHandle("[TITLE:Open; CLASS:#32770]", "", "[CLASS:ComboBox; INSTANCE:2]"), _
$sFilePath = @ScriptDir & "\Config.txt", $sReturn = "", $sUnique = ""
$aArray = StringSplit(_GUICtrlComboBoxEx_GetList($hComboBox), "|")
For $i = 1 To $aArray[0]
$aSplit = StringSplit($aArray[$i], "(")
If @error Then
ContinueLoop
EndIf
$aArray[$i] = StringReplace($aSplit[$aSplit[0]], "*.", "")
$aArray[$i] = StringReplace($aArray[$i], ")", "")
$aSplit = StringSplit($aArray[$i], ";")
For $j = 1 To $aSplit[0]
If $aSplit[$j] = "*" Then
ContinueLoop
EndIf
$aSplit[$j] = StringStripWS($aSplit[$j], 3)
If StringInStr($sUnique, $aSplit[$j] & ";", 1) = 0 Then
$sUnique &= $aSplit[$j] & ";"
$sReturn &= $aSplit[$j] & "=LibreOffice.exe" & @CRLF
EndIf
Next
Next
_SetFile($sReturn, $sFilePath, 1)
EndFunc ;==>_Main
Func _SetFile($sString, $sFile, $iOverwrite = 0) ; By guinness.
Local $hFileOpen
$hFileOpen = FileOpen($sFile, $iOverwrite + 1)
FileWrite($hFileOpen, $sString)
FileClose($hFileOpen)
If @error Then
Return SetError(1, 0, $sString)
EndIf
Return $sString
EndFunc ;==>_SetFile
Code: Select all
avi=SMPlayer.exe
vfw=SMPlayer.exe
divx=SMPlayer.exe
mpg=SMPlayer.exe
mpeg=SMPlayer.exe
m1v=SMPlayer.exe
m2v=SMPlayer.exe
mpv=SMPlayer.exe
dv=SMPlayer.exe
3gp=SMPlayer.exe
mov=SMPlayer.exe
mp4=SMPlayer.exe
m4v=SMPlayer.exe
mqv=SMPlayer.exe
dat=SMPlayer.exe
vcd=SMPlayer.exe
ogg=SMPlayer.exe
ogm=SMPlayer.exe
ogv=SMPlayer.exe
asf=SMPlayer.exe
wmv=SMPlayer.exe
bin=SMPlayer.exe
iso=SMPlayer.exe
vob=SMPlayer.exe
mkv=SMPlayer.exe
nsv=SMPlayer.exe
ram=SMPlayer.exe
flv=SMPlayer.exe
rm=SMPlayer.exe
swf=SMPlayer.exe
ts=SMPlayer.exe
rmvb=SMPlayer.exe
dvr-ms=SMPlayer.exe
m2t=SMPlayer.exe
m2ts=SMPlayer.exe
rec=SMPlayer.exe
f4v=SMPlayer.exe
hdmov=SMPlayer.exe
webm=SMPlayer.exe
vp8=SMPlayer.exe
mp3=SMPlayer.exe
wav=SMPlayer.exe
wma=SMPlayer.exe
ac3=SMPlayer.exe
ra=SMPlayer.exe
ape=SMPlayer.exe
flac=SMPlayer.exe
thd=SMPlayer.exe
m3u=SMPlayer.exe
m3u8=SMPlayer.exe
pls=SMPlayer.exe