MDBU idea/how-to/request
-
JLoftus
- Posts: 600
- Joined: 22 Jan 2014 14:58
MDBU idea/how-to/request
I have an interesting idea for a MDBU feature... for a folder
I could see several neat potentials for a MDBU operation on a folder (currently does nothing, right?)
I would like to do this (maybe someone has a script idea, did not want to double-post):
MDBU on a folder could preview a text file within the folder of the same name. That is, if a folder named "InterestingIdeas" has a file in it named "InterestingIdeas.txt" then the MDBU would pop up a preview of that text file.
What do you think?
I could see several neat potentials for a MDBU operation on a folder (currently does nothing, right?)
I would like to do this (maybe someone has a script idea, did not want to double-post):
MDBU on a folder could preview a text file within the folder of the same name. That is, if a folder named "InterestingIdeas" has a file in it named "InterestingIdeas.txt" then the MDBU would pop up a preview of that text file.
What do you think?
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: MDBU idea/how-to/request
Could be done with a script + an .ahk .exe
A bit too specific for a general MDBU function imho...
A bit too specific for a general MDBU function imho...
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66631
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
JLoftus
- Posts: 600
- Joined: 22 Jan 2014 14:58
Re: MDBU idea/how-to/request
OK, so that idea was too specific, are there any general things that are or can be done with MDBU on a folder?
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: MDBU idea/how-to/request
Not atm...
Regarding your "wish"...
XYscript (put it on a hotkey, button, whatever):
Replace the
D:\PreviewTxtFile.exe
with whereever you place the .exe from the .zip file (attachment)!
When you execute the script, a white window (no top bar, no scroll bars, etc.), a little bit smaller than your XY instance opens up and shows the .txt file...
Click the left mouse button anywhere to close it...
Attachment: Compiled .ahk code...
Regarding your "wish"...
XYscript (put it on a hotkey, button, whatever):
Replace the
D:\PreviewTxtFile.exe
with whereever you place the .exe from the .zip file (attachment)!
Code: Select all
if (exists("<curitem>") == 2) {
$folderName = regexreplace("<curitem>", "^(.*\\)(.*?)$", "$2");
$fileToPreview = "<curitem>\$folderName.txt";
if (exists($fileToPreview) == 1) {
run """D:\PreviewTxtFile.exe"" ""$fileToPreview""", "<curpath>";
}
}Click the left mouse button anywhere to close it...
Attachment: Compiled .ahk code...
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
-
eil
- Posts: 1888
- Joined: 13 Jan 2011 19:44
Re: MDBU idea/how-to/request
em.. why everybody forgot that in Thumbs view with folder thumbs enabled, MDBU on folder will popup folder's picture..
Win 7 SP1 x64 100% 1366x768|1900x1080
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: MDBU idea/how-to/request
And what does the OP do, when his .txt file in that folder changes and he forgets to take a new screenshot from it? Preview outdated data?em.. why everybody forgot that in Thumbs view with folder thumbs enabled, MDBU on folder will popup folder's picture.
Just askin'
One of my scripts helped you out? Please donate via Paypal
-
JLoftus
- Posts: 600
- Joined: 22 Jan 2014 14:58
Re: MDBU idea/how-to/request
@highend, this worked great, thank you! would you mind sharing the ahk source? Also, I made this actionable from a CTB but really, would prefer MDBU, is there any way to associate that script snippet with MDBU (on a folder only) ?
Thank you again!
Thank you again!
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: MDBU idea/how-to/request
Code: Select all
#NoEnv
#SingleInstance, Force
#NoTrayIcon
#Persistent
WinGetPos, xPos, yPos, width, height, ahk_class ThunderRT6FormDC
xPos += 5
yPos += 30
width -= 10
height -= 35
Gui, New, +LastFound +AlwaysOnTop +HwndPreviewHWND
Gui, Color, FFFFFF
Gui -Caption
Gui, Font, s10, Segoe UI
Gui, Add, Edit, x%xPos% y%yPos% w%width% h%height% -WantCtrlA -Wrap -VScroll -E0x200 BackgroundTrans Disabled ReadOnly
FileRead, FileContents, %1%
GuiControl,, Edit1, %FileContents%
Gui, Show, x%xPos% y%yPos% w%width% h%height%
return
GuiEscape:
GuiClose:
ExitApp
return
LButton::
ExitApp
return
One of my scripts helped you out? Please donate via Paypal
-
klownboy
- Posts: 4468
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440
Re: MDBU idea/how-to/request
If you install Thumbnail Extensions 1.03 (text file thumbnails in explorer) on your system you'll have thumbnails of any text type file including XYS scripts. The Control Panel applet lets you choose the extensions you'd like to see as thumbnails. You can then refer to the txt file in a desktop.ini in the folder (yes, refer to a text file) and then have the folder in the parent folder look like a txt file.The desktop ini file simply refers to any text file and look something like this:Yes, it's a stupid example but it works. I wasn't able to get the text file like Grocery List.txt renamed to folder.txt to work directly but there may be a way around that as well. Of course this method doesn't really blow anything up when you MDBU on th folder since there is a limit to the text thumbnail size.
Code: Select all
[ViewState]
Mode=
Vid=
FolderType=Pictures
Logo=G:\Downloads\GroceryList.txtTo see the attached files, you need to log into the forum.
-
highend
- Posts: 14993
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: MDBU idea/how-to/request
Btw, when you remove the -VScroll option in the .ahk code, you can even scroll your "previewed" text vertically while there is no vertical scroll bar displayed...
And if you have any problems with wrong encodings (e.g. "Umlauts" in german), add:
FileEncoding, UTF-8
before:
FileRead, FileContents, %1%
And if you have any problems with wrong encodings (e.g. "Umlauts" in german), add:
FileEncoding, UTF-8
before:
FileRead, FileContents, %1%
One of my scripts helped you out? Please donate via Paypal
-
eil
- Posts: 1888
- Joined: 13 Jan 2011 19:44
Re: MDBU idea/how-to/request
i was only referring to statement that "MDBU on folder has no action" -it has.highend wrote:And what does the OP do, when his .txt file in that folder changes and he forgets to take a new screenshot from it? Preview outdated data?em.. why everybody forgot that in Thumbs view with folder thumbs enabled, MDBU on folder will popup folder's picture.
Just askin'
Win 7 SP1 x64 100% 1366x768|1900x1080
XYplorer Beta Club