;- ActiveX-Explorer , select defined folders with DDL
;- select a file to see info in GUI-Child > txt-files or also ( picture,MP3,MP4 > needs exiftool )
;-
;- select a file to see info in GUI-Child > txt-files or also ( picture,MP3,MP4 > needs exiftool )
;-
CODE:
;- ActiveX-Explorer , select defined folders with DDL
;- select a file to see info in GUI-3 > txt-files or also ( picture,MP3,MP4 > needs exiftool )
;-
;-
;- MODIFIED = 20240323
;- CREATED = 20240323
;-
#Requires AutoHotkey v1.1.33.11
#warn
#noenv
Fileencoding,UTF-8
name1:="ACTIVEX_Explorer"
setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2: +HwndAId +0x2000000
Gui,2: -DPIScale
Gui,2:Color,Black,Black
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
;- maybe change fontsize
if (wa=3840)
Gui,2:Font,s12 cYellow,Lucida Console
else if (wa=1920)
Gui,2:Font,s10 cYellow,Lucida Console
else
Gui,2:Font,s8 cYellow,Lucida Console
;-
currentpath:=a_desktop
clipboard:=""
global currentpath,ak
;--------------------
e1=
(Ltrim join|
%a_desktop%
D:\M_GARRY
D:\M_DOC
D:\M_MEDIA
D:\M_MEDIA\M_FILME
)
;---------------------------------------------------------------------
x:=(wa*17)/xx,y:=(ha*1)/xx,w:=(wa*65)/xx,
Gui,2: Add,Edit,x%x% y%y% w%w% r1 vPath,
x:=(wa*82.5)/xx,y:=(ha*1)/xx,w:=(wa*2.7)/xx,h:=(ha*2.5)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gGO1,<GO
x:=(wa*85.5)/xx,y:=(ha*1)/xx,w:=(wa*3.5)/xx,h:=(ha*2.5)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gBack,<BACK
;-
x:=(wa*17)/xx,y:=(ha*4)/xx,w:=(wa*65)/xx,
Gui,2: Add,Edit,x%x% y%y% w%w% r1 vED0,
;x:=(wa*82.5)/xx,y:=(ha*4)/xx,w:=(wa*6.5)/xx,h:=(ha*2.5)/xx
;Gui,2: Add, Button,x%x% y%y% w%w% h%h% gInfoShow,<< INFO
;-
;---------------------------------------------------------------------
x:=(wa*17)/xx,y:=(ha*7)/xx,w:=(wa*72)/xx,h:=(ha*82)/xx
Gui,2: Add, ActiveX, vWB x%x% y%y% w%w% h%h%, Shell.Explorer,%a_desktop%
ComObjConnect(WB, WB_events) ; Connect WB's events to the WB_events class object.
;-
;-
x:=(wa*1)/xx,y:=(ha*2)/xx,w:=(wa*15)/xx
Gui,2: Add, DropDownList,x%x% y%y% w%w% vddl1 choose1 gGo2,%e1%
;-
;-
x:=(wa*1)/xx,y:=(ha*51)/xx,w:=(wa*9)/xx,h:=(ha*2.7)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gSystemInfo,System-Info
;-
x:=(wa*1)/xx,y:=(ha*54)/xx,w:=(wa*9)/xx,h:=(ha*2.7)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gSpeedtest,Speedtest-Ookla
;-
x:=(wa*1)/xx,y:=(ha*57)/xx,w:=(wa*9)/xx,h:=(ha*2.7)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gWlanpswords,WLAN-PSWORDS
;-
;-
;-
x:=(wa*17)/xx,y:=(ha*90)/xx,w:=(wa*12)/xx,h:=(ha*2.5)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gInfoShow vInfoShow, INFO from selected-file
x:=(wa*30)/xx,y:=(ha*90)/xx,w:=(wa*12)/xx,h:=(ha*2.5)/xx
Gui,2: Add, Button,x%x% y%y% w%w% h%h% gGO1 vReturnx, RETURN to EXPLORER
;-
x:=(wa*.1)/xx,y:=(ha*.1)/xx,w:=(wa*92)/xx,h:=(ha*94)/xx
Gui,2:Show, x%x% y%y% w%w% h%h%,%name1%
gosub,go2
settimer,aas2,1000
Guicontrol,2: Disable , InfoShow
Guicontrol,2: Disable , Returnx
return
;-------------------
;=============================================================
childnew:
Gui,2:submit,nohide
Gui,3: new
Gui,3:default
Gui,3: +HwndBId +0x2000000
Gui,3: -DPIScale -Caption +Border
Gui,3:Color,Black,Black
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
;- maybe change fontsize
if (wa=3840)
Gui,3:Font,s12 cYellow,Lucida Console
else if (wa=1920)
Gui,3:Font,s10 cYellow,Lucida Console
else
Gui,3:Font,s8 cYellow,Lucida Console
;-
Gui,3:+Parent%AId%
x:=(wa*0)/xx,y:=(ha*0)/xx,w:=(wa*72)/xx,h:=(ha*82)/xx
Gui,3: Add,Edit,x%x% y%y% w%w% h%h% vED1,Line1`nLine2
x:=(wa*17)/xx,y:=(ha*7)/xx,w:=(wa*72)/xx,h:=(ha*82)/xx
gui,3: show,x%x% y%y% w%w% h%h%,TEST3
Guicontrol,2: Enable , Returnx
return
;==============================================================
;------------------------------
2GuiClose:
ExitApp
esc::exitapp
;-------------------
aas2:
Gui,2: submit,nohide
selx:= wb.Document.SelectedItems
ak:=""
for item in selx
{
ak:=item.path
GuiControl,2:,ED0,%ak%
}
if ak<>
{
Guicontrol,2: Enable , InfoShow
gosub,infoshow
}
else
Guicontrol,2: Disable , InfoShow
return
;==============================================================
InfoShow:
Gui,2: submit,nohide
settimer,aas2,off
Guicontrol,2: Enable , Returnx
Guicontrol,2: Disable , InfoShow
txtx:="ahk,txt,bat,bas,ini,html" ;- text
imgx:="jpg,jpeg,bmp,tif,png,wav,mp3,mp4" ;- pictures & MP3 MP4
;mp3x:="mp3,mp4"
;--
SplitPath,ED0, name, dir, ext, name_no_ext, drive
if ext in %txtx%
{
fileread,ac,%ED0%
gosub,childnew
GuiControl,3:,ED1,%ac%
ac:="",ED0:=""
return
}
if ext in %imgx%
{
PR:="D:\M_GARRY\PROGRAMME_SA\EXIFTOOL\ExifTool.exe"
ifnotexist,%PR%
{
msgbox, 262208,INFO ,PROGRAM NOT EXISTS`n%PR%
return
}
loop,%ED0%
SP1:=A_loopFileShortPath ;- DOS 8.3 to accept chinese characters
try
runwait,%comspec% /c %pr% "%sp1%" | clip,,hide
;-------------------------------------------------------
;- extract picture from a MP3 if picture exists :
;SplitPath,SP1, name2, dir2, ext2, name_no_ext2, drive2
;f1:=a_desktop . "\" . name_no_ext2 . ".png"
;runwait,%comspec% /c %pr% -b "%sp1%" >%f1%
;try,run,%f1%
;return
;-------------------------------------------------------
gosub,childnew
GuiControl,3:,ED1,%clipboard%
ED0:="",clipboard:=""
return
}
/*
if ext in %mp3x%
{
PR:="D:\M_GARRY\PROGRAMME_SA\MP3TAG\Mp3tag.exe"
runwait,"%pr%" "%ED0%"
return
}
*/
return
;----------------------
Go1: ;- firstLine
Gui,2: Submit, NoHide
Guicontrol,2: Disable , Returnx
settimer,aas2,on
Gui,3:destroy
GuiControl,2:,ED0,
WB.Navigate(path)
Return
;--------------------
Go2: ;- DDL
Gui,2: Submit, NoHide
Gui,3:destroy
GuiControl,2:,ED0,
WB.Navigate(ddl1)
Return
;--------------------
Systeminfo:
Gui,2: submit,nohide
GuiControl,2:,ED0
Splashimage,,b w600 h150 x10 Y400 CWsilver m9 b fs14 zh0,Wait... SystemInfo running...
runwait,%comspec% /c systeminfo | clip,,hide
Splashimage, off
gosub,childnew
GuiControl,3:,ED1,%clipboard%
clipboard:=""
return
;-------------------
Speedtest:
Gui,2: submit,nohide
GuiControl,2:,ED0
speedtestOokla:="D:\M_GARRY\PROGRAMME_SA\SPEED_TEST\ookla-speedtest-1.1.1-win64\speedtest.exe"
ifnotexist,%speedtestookla%
{
msgbox, 262208,INFO ,PROGRAM NOT EXISTS`n%speedtestookla%
return
}
Splashimage,,b w600 h150 x10 Y400 CWsilver m9 b fs14 zh0,Wait ... Internet-Speedtest running...
try,runwait,%comspec% /c %speedtestOokla% --accept-license |clip,,hide
Splashimage, off
gosub,childnew
GuiControl,3:,ED1,%clipboard%
clipboard:=""
return
;===========================================
;-------------------
Back:
Gui,2: Submit, NoHide
GuiControl,2:,ED0,
Gui,3:destroy
StringSplit, FolderArray, Path, \
FolderArray0 := FolderArray0 - 1
BackPath =
Loop, %FolderArray0%
{
BackPath .= FolderArray%a_index% "\"
}
WB.Navigate(BackPath)
Return
;-------------------------------------------
UpdateDDLPath:
GuiControlGet, CurrentPath,, Path
Gui,2: Submit, NoHide
StringSplit, FolderArray, CurrentPath, \
Loop, %FolderArray0%
{
if FolderArray%a_index% =
{
continue
}
}
Return
;============================================
WLANpswords:
Gui,2: submit,nohide
GuiControl,2:,ED0
;-- WLAN Windows11 SSID pswords ( Computer must be connected once with WLAN )
;--
fd:=a_scriptdir . "\WifiXMLS"
ifnotexist,%fd%
filecreatedir,%fd%
;--
RunWait, %comspec% /c "netsh wlan export profile folder=%fd% key=clear",, hide ;- Exports all WiFi profile
;RunWait, %comspec% /k "netsh wlan export profile folder=%fd% key=clear"
;--
e4:=""
Loop, %fd%\*.xml
{
aac:=""
y:=A_LoopFileFullPath ;- this is a xml-file in folder WiFiXMLS
fileread,aac,%y%
Loop,parse,aac,`n,`r
{
x:= A_LoopField
if x contains <name>
L1:=RegExReplace( x, "<.*?>" )
if x contains <keyMaterial>
{
L2:=RegExReplace( x, "<.*?>" )
L1=%L1%
L2=%L2%
e4 .= "SSID=" . L1 "`nPassword=" . L2 . "`nXML-File=" . y . "`n----------------`n"
}
}
}
gosub,childnew
GuiControl,3:,ED1,%e4%
clipboard:=""
return
;=================================================
;--------------------------------------------
class WB_events
{
NavigateComplete2(wb, NewPath)
{
GuiControl,2:, Path, %NewPath% ; Update the Path edit control.
Gosub, UpdateDDLPath
}
}
;============== END SCRIPT ActiveX Explorer ============================
Statistics: Posted by garry — Today, 15:14