auto-open last page and auto-close the previes one

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Konos93a
Posts: 13
Joined: 22 Aug 2017, 01:06

auto-open last page and auto-close the previes one

14 Oct 2018, 06:55

i capture a book with this diy machine Image
i have a liveview with vysor app but with the method downbelow maybe i will better view what exactly i capture . with bigger image thumbnail i cant see image details

i want an autohotkey code that open with windows viewer the last added capture page and close all the others windows viewer

lets say that i have a camera folder(Αυτός ο υπολογιστής\Redmi 5 Plus\Εσωτ. κοινόχρ. αποθ. χώρος\DCIM\Camera) from a smartphone viewable and editable in a pc (windows 10)
Image

every time i capture a photo files number increase
Image

lets say that i open with windows viewer the image with filename 0064.jpeg

i capture a new image with filename 0066.jpeg . i want the new image auto-open with windows viewer and auto-close the old one if windows viewer is already open.
so open 0066 close 0064 ,open 0068 and close 0066 and so on.



----now some limits. the real captured photos names are like IMG_20181012_160550(the last picture always have bigger numbers than the others).

sometimes i have to delete one or 2 page (imagine that i capture 2 images in the same book page ) so i need to keep one of them

its a folder inside smartphone so maybe there will me permission issues .
Konos93a
Posts: 13
Joined: 22 Aug 2017, 01:06

Re: auto-open last page and auto-close the previes one

27 Oct 2018, 06:09

a friend of mine did this what do you suggest?

Code: Select all

#NoEnv
#SingleInstance force

;Script to monitor a folder 
;and keep the last jpg in a folder open
;in the default image viewer

;1. Edit the folder path on the line below and save
;2. Run the script
;3. When finished, press F7 to stop and exit

folder = C:\some folder\subfolder

SetTimer, view_last_image, 500
return

view_last_image:
;loop over files in alphanum sort order
Loop, Files, % folder "\*.jpg"
  file := A_LoopFilePath

if (file = image)
  return

Run % file
image := file
return

F7:: exitapp

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 215 guests