Announcement

Collapse
No announcement yet.

Randomize switch

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

    Requested Randomize switch

    when i look at this command switch in irfanview help

    Code:
    i_view32.exe %file% /wall=2
    an idea popped out in my mind to use it to apply new wallpaper at each windows startup..but that command needs a randomize switch to make it possible so that it can randomly pick up a picture file in a folder then use it as wallpaper..

    eg:
    Code:
    i_view32.exe /randomfile %dir% /wall=2
    can please you add 'randomize' switch? i dont want to depend on other program or scripts(eg shk/autoit) to do this

    #2
    Some random function in the command list could be fine, but I'm not supporting this, because I would never use it.
    I don't like the wallpaper concept, and I hate things happening at windoze startup other than necessary.
    0.6180339887
    Rest In Peace, Sam!

    Comment


      #3
      What's the point of automatically changing walpapers...

      Comment


        #4
        Boredom, perhaps. I believe the condition can be treated
        Its: Belongs to "It"
        It's: Shortened form of "It is"
        ---------------------
        Lose: Fail to keep
        Loose: Not tight

        ---------------------
        Plurals do not require apostrophes

        Comment


          #5
          A batch file is enough....
          Code:
          @echo off
          REM Eventually change the two following statements
          set imgpattern="c:\your_images_path\*.jpg"
          set iviewpath="c:\Program Files\IrfanView\i_view32.exe"
          for %%D in (%imgpattern%) do set /a fn+=1
          set /a imgnumber=%RANDOM%*%fn%/32767
          set fn=0
          for %%D in (%imgpattern%) do (
              if !fn! EQU %imgnumber% (
                  %iviewpath% "%%D" /wall=2
              )
          set /a fn+=1
          )
          IrfanPaint developer
          The latest stable IrfanPaint version is the 0.4.13.70.
          IrfanPaint is now open-source (released under BSD license).

          Comment


            #6
            Hi MItaly,

            just add a "set fn=0"... it is not really necessary, but usefull while testing and playing with the script:

            Originally posted by MItaly View Post
            Code:
            @echo off
            REM Eventually change the two following statements
            set imgpattern="c:\your_images_path\*.jpg"
            set iviewpath="c:\Program Files\IrfanView\i_view32.exe"
            [B]set fn=0[/B]
            for %%D in (%imgpattern%) do set /a fn+=1
            set /a imgnumber=%RANDOM%*%fn%/32767
            set fn=0
            for %%D in (%imgpattern%) do (
                if !fn! EQU %imgnumber% (
                    %iviewpath% "%%D" /wall=2
                )
                set /a fn+=1
            )
            Regards, Nils.

            Comment


              #7
              Well, the scripts are interesting
              Its: Belongs to "It"
              It's: Shortened form of "It is"
              ---------------------
              Lose: Fail to keep
              Loose: Not tight

              ---------------------
              Plurals do not require apostrophes

              Comment

              Working...
              X