Announcement

Collapse
No announcement yet.

Switch to Naked window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by paul1149 View Post
    I'd like to have a button which switches the Irfanview instance (this would not be a persistent setting) interface to naked - that is, no title bar, menu bare, tool bar, or status bar. Ideally there would be some way to bring back Full mode. Thanks, p.
    Yes, a really good idea. Or a menu entry like this:

    view >> show/hide all (with shortcut)

    Comment


      #17
      How about this!

      Code:
      @echo off
      set hide=0
      D:\appz\IrfanView\i_view32.exe /killmesoftly
      :view
      if "%hide%"=="0" (
      set hide=1
      D:\appz\IrfanView\i_view32.exe %1 /hide=15
      goto :view
      )
      set hide=0
      D:\appz\IrfanView\i_view32.exe %1
      goto :view
      Simply call this script as your external editor. When you want to switch back, just hit Esc in IrfanView, and the other mode will return. Keep doing so to go back and forth! Quit the script to stop the crazy behavior.

      Comment


        #18
        Hi Skippybox. Thanks a lot for writing some code. I used it, but it works only partly for me. When hitting shift+E, a new naked window appears. But subsequent use of shift+e results in only more IrfanView instances appearing, so I end up with 3,4,5 etc. The other problems are that I already use Shift+E to open Photoshop as external editor, which I have to use far mor often and for the other external editors, there is no shortcut.
        Second problem: my IrfanView starts up in full screen mode because that's how I use it most of the time. I've suggested a "use normal mode" command line switch in the other thread and you also found a temporary workaround for this, but that's probably not compatible with using your script here, or at least horribly mind-buggling to find out.

        At least it would be a lot easier to have:
        * "show/hide everything" menu entry
        * "start in normal mode" command line switch

        So Skippybox, really don't waste your time helping me here, I think I'll just wait (and pray ) that one day these things may be added ...

        Comment


          #19
          I know the script can't replace a program coded feature, it was really just a novelty that might be handy.

          Originally posted by boarder's paradise View Post
          I used it, but it works only partly for me. When hitting shift+E, a new naked window appears. But subsequent use of shift+e results in only more IrfanView instances appearing, so I end up with 3,4,5 etc.
          I knew I should have explained it better. The script relies on specific looping, so you are really getting lost in the loops. You should not hit SHIFT+E again, because that calls another instance of the script which actually disturbs the others due to the loops. Like I said, you should hit Esc or exit IrfanView to make the switch back and forth between just one instance. Quitting the script stops the looping, so then you can hit SHIFT+E again if you want.

          Essentially the script is quite stupid because it has little way to know what is going on, thus it offers crude behavior. It can't work with any other file than the one it was initially provided. It also can't detect whether the window is naked to begin with, so you could get no change initially. Good reason to remain consistent in what mode you start and stop in.


          The other problems are that I already use Shift+E to open Photoshop as external editor, which I have to use far mor often and for the other external editors, there is no shortcut.
          Yes, I understand. But that affects any editor you put in those spots. You could devise a script invoked by SHIFT+E that controls all the editors and let's you choose one.

          You could also modify the script to keep the original window, along with the naked.

          Second problem: my IrfanView starts up in full screen mode because that's how I use it most of the time. I've suggested a "use normal mode" command line switch in the other thread and you also found a temporary workaround for this, but that's probably not compatible with using your script here, or at least horribly mind-buggling to find out.
          Actually, fullscreen startup doesn't affect the script. Pressing Enter reveals the correct window. But, it is an extra step. And the script is very accommodating. You can use the /ini switch in it. So, hopefully no mind-bugging.

          Comment


            #20
            I'm revisiting my old thread. Using "D:\Grafix\Irfan_View\i_view32.exe %1 /hide=15" as an External Editor doesn't work in Irfanview. The "/hide=15 breaks the link for some reason, even when quotes are used.

            The batch file works, but it leaves the cmd window lying around.

            Another way to easily open a pic in a clean "display mode" is to add the command to the Windows Explorer context menu. Here's a Registry key which I added for "*" - all file types:

            I'd still like to have a "Toggle Display Mode" button/hotkey in the UI, or to be able to access it via external editor without a batch file. but the Reg key works pretty well here for my purposes.

            Be blessed.
            p.

            Key Name: HKEY_CLASSES_ROOT\*\Shell\Irfanview Display Mode
            Class Name: <NO CLASS>
            Last Write Time: 2/3/10 - 11:45 PM

            Key Name: HKEY_CLASSES_ROOT\*\Shell\Irfanview Display Mode\command
            Class Name: <NO CLASS>
            Last Write Time: 2/3/10 - 11:45 PM
            Value 0
            Name: <NO NAME>
            Type: REG_SZ
            Data: c:\a-v\irfanview\i_view32.exe %1 /hide=15

            Comment


              #21
              Originally posted by paul1149 View Post
              I'm revisiting my old thread. Using "D:\Grafix\Irfan_View\i_view32.exe %1 /hide=15" as an External Editor doesn't work in Irfanview. The "/hide=15 breaks the link for some reason, even when quotes are used.
              The batch file works, but it leaves the cmd window lying around.
              Use "Start D:\Grafix\Irfan_View\i_view32.exe %1 /hide=15" as the batch file instead of just "D:\Grafix\Irfan_View\i_view32.exe %1 /hide=15". Then the batch file will not wait for Irfanview to finish.
              Last edited by Mij; 06.04.2010, 02:06 PM.

              Comment


                #22
                Thank you. This is the first time since the old DOS 5.2 that I've seen a way to close the CMD window that actually worked.

                Now if there's a way to close the original Irfanview window, it would be perfect. : )

                Comment


                  #23
                  Ok, I just paid closer attention to Skippybox's batch file, and it's working well. Shift-e calls the batch, the CMD window and old IV window close, and the frameless IV window appears. I'm not sure how the %1 still gets passed when the original IV window has been terminated, but it's obviously working.

                  Comment


                    #24
                    Glad you have it working.
                    The %1 is not passed as such at all. It is just a placeholder both in Irfanview and the batch file. The first copy of Irfanview replaces %1 in the External editor command with the full path and filename of the current image. So the batch file receives that path and filename and treats it as a variable to be saved as "first argument (or parameter)"
                    The batch file kills the original copy of Irfanview in the first line of code and then replaces the %1 it finds in its second line with what was saved as "first argument". So the new copy of Irfanview, started in the "naked" window, gets the path and filename right back again.
                    Finally the batch file closes itself because it has run out of things to do.

                    Incidentally, the External editor does work with the hide option included but, for some reason, the %1 then needs to be in quotes. i.e it should read
                    D:\Grafix\Irfan_View\i_view32.exe "%1" /hide=15
                    Last edited by Mij; 07.04.2010, 04:29 PM. Reason: "Incidentally..." added

                    Comment


                      #25
                      Ok, then, trying to deal with the nuance - the value of the %1 variable gets passed to the external editor, which in this case is a batch file, by IV hard coding, even though it's not mentioned in the IV user's command line to the batch file. That would explain how it survives the death of all existing IV instances.

                      It's all very neat - but I still would like a UI hotkey. : )

                      Comment

                      Working...
                      X