Menu

#133 "Locate" The Current Image In File Explorer

open
nobody
None
5
2023-11-15
2020-08-15
pepanee
No

Hello, I came up with this really cool idea of a suggestion.

So lets say that youre looking through 500 pictures in one folder, using JPEGView, by opening one image, and using the Right Arrow on the keyboard to scroll through the images in the app. You know, youre looking at many cool photos, then all of a sudden, you come across the prettiest photo of all! You like this photo so much that you want to make a copy of it somewhere else on the computer so you can access it much quicker. The only thing though is that all the images in that folder have random names like: "dn8dmm4ldha932mngf.jpg", and all the filenames look so similar! You dont want to go through the hassle of finding that file in File Explorer, its slightly too much work.

So instead, can you make an option in JPEGView that once you select that option, it will open a File Explorer window and highlight the exact picture that you are looking at. I think this feature would be a very great addition to this awesome program.

For my Desktop, I have a Desktop Slideshow. And theres someone that has made a custom vbs command that Locates The current Desktop Photo Image. I love that feature so much, because it helps me find the picture thats currently loaded. (Look at the attachment).

What do you think about this idea?

1 Attachments

Discussion

  • Melvin Nava

    Melvin Nava - 2020-09-04

    I agree it's an important feature.. But in the mean time you can make it yourself by adding an "Open With" menu entry that will allow you to open the current image in File Explorer both by clicking the option or by pressing a keyboard shortcut combination (like CTRL+ E)..

    Edit JPEGView.ini and add a command like this (at "Open with menu commands"):

    OpenWith0="KeyCode: Ctrl+E Cmd: '"Explorer.exe" /select,%filename%' Menuitem: 'Show in folder [...]' Flags: 'ShellExecute'"

    This will open file explorer and select the current file..
    You can probably use your own VBScript in this command with some modifications..

     
    👍
    1
  • pepanee

    pepanee - 2020-09-05

    Cool! Thank you so much for commenting here!! I really appreciate it.
    I added that to my "ini" file and did a few adjustments to the code you posted above, and it works awesomly! Sweet!

     
    👍
    1
  • cpo

    cpo - 2020-09-07

    Great, this was helpful for me too!

     
    👍
    2
  • pepanee

    pepanee - 2020-09-10

    I have another quick question. Do you know of any code to add to your code you posted above which does the following please:

    Suppose that the folder that a picture is in, is already open in a File Explorer window (either behind JPEGView, or minimized, etc), and I run the command to "Locate The Picture", then can the command notice that the folder is already open in File Explorer, and use that currently open folder to locate the image, instead of opening a brand new duplicate File Explorer window?

    (What I'm asking above is kinda poorly written, so I hope it isn't confusing, and that you understand what I'm asking =)

    Thank you so much again for your assistance!

     
    • Melvin Nava

      Melvin Nava - 2020-09-17

      You may be able to do that with VBScript, or more easily with AutoHotkey, since you can use all COM objects available in your system (like in VBScript) but it also has very useful features you can use to detect and activate specific windows.

      I did make a VBScript that does what you're asking for, but it requires the "QTTabBarLib.Scripting" object. This is included when you install QTTabBar so you have to decide if it works for you..

      Updated 2021-07-19:
      The next example takes a full path+filename (or multiple paths) as argument and opens the active file explorer tab (if found) and attempts to select the file or folder (or even multiple items). If if the given path is not active on any tab it opens a new one:

      ' ========================================================= '
      ' QTabBar Explore & Select '
      ' Author Melvin D. Nava <mdnava[at]gmail.com> '
      ' Last 2021-07-19 21:22 '
      ' ========================================================= '
      ' This VBScript can take one or multiple files/folders as argument '
      ' Then will open an existing QTabBar tab with specified items selected '
      ' If no tab with the given path is available, it opens a new one '
      ' ========================================================= '
      Dim objFSO, objShell, arrArgs, sArg
      Dim objFolder, objFile, sFilePath, sFileNamesName, sFolderPath
      Set objFSO      = CreateObject("Scripting.FileSystemObject")
      Set objShell    = CreateObject("WScript.Shell")
      Set arrArgs     = WScript.Arguments
      
      If IsURL(arrArgs(0)) Then
          objShell.Run arrArgs(0), 9, False
          WScript.Quit
      ElseIf (objFSO.FolderExists(arrArgs(0))) Then
          Set objFolder   = objFSO.GetFolder(GetFolder(arrArgs(0)))
          sFolderPath     = objFSO.GetAbsolutePathName(objFolder)
          sName           = objFSO.GetBaseName(objFolder)
      ElseIf (objFSO.FileExists(arrArgs(0))) Then
          Set objFile = objFSO.GetFile(GetFile(arrArgs(0)))
          sFilePath       = objFSO.GetAbsolutePathName(objFile)
          sFolderPath     = objFSO.GetParentFolderName(objFile) 
          sName           = objFSO.GetFileName(objFile)
      Else
          WScript.Echo "Invalid file or folder: " & vbCrLf & vbCrLf & arrArgs(0)
          WScript.Quit
      End If
      
      objShell.CurrentDirectory = sFolderPath
      
      Dim objQS, objWin, objTab, cSelection
      Set objQS = CreateObject("QTTabBarLib.Scripting")
      Set objWin      = objQS.Open(sFolderPath)
      Set objTab      = objWin.ActiveTab
      Set cSelection  = objQS.NewCollection()
      
      For Each sArg In arrArgs
          If (objFSO.FileExists(sArg)) Then
              Set objFile = objFSO.GetFile(sArg)
              sFilePath       = objFSO.GetAbsolutePathName(objFile)
              sFileName       = objFSO.GetFileName(objFile)
              cSelection.Push sFilePath
          End If
      Next
      
      objTab.SelectedItems = cSelection
      
      Set objQS = Nothing
      Set objWin = Nothing
      Set objTab = Nothing
      Set cSelection = Nothing
      
       

      Last edit: Melvin Nava 2021-07-20
  • pepanee

    pepanee - 2020-09-18

    Hmm I see. I use Macro Express Pro, which is similar to the other app you mentioned. Yet the complexity of all the things that needs to be done is way too much. I really appreciate all your assistance that you provided.

     
    👍
    1
    • Melvin Nava

      Melvin Nava - 2021-07-20

      I just updated the VBS code above to support multiple file selection.. Copying the code into a .vbs file and giving multiple files or sub-folders as argument (within the same path) will open an existing QTabBar tab with the specified items selected. If no active tab has the required path it will open a new tab. Is not really complex. It just requires QTabBar to be installed and an entry added to JpegView sending the current opened file to the VBScript file.

       
  • Lori Ortega

    Lori Ortega - 2023-11-15

    Hey there! Your idea of adding a "Locate in File Explorer" feature to JPEGView sounds fantastic! It would indeed be a convenient addition, especially when dealing with a large number of images with cryptic filenames. I can totally relate to the struggle of finding that one special picture among many similar-looking files. The ease of accessing and copying the favorite image directly from JPEGView to a preferred location through File Explorer would undoubtedly enhance the user experience.

    I also appreciate the parallel you drew with the custom vbs command for locating the current desktop photo image. Such features significantly contribute to user convenience. Speaking of user-friendly functionalities, have you explored the Gold Membership unlocked features in Picsart? It's impressive how tools like Picsart can elevate the creative process, and perhaps incorporating a similar streamlined file location feature could resonate well with users who value efficiency and ease of use. What are your thoughts on integrating this proposed feature into a program like Picsart, where the user experience is already enriched with advanced tools?

     

Log in to post a comment.