Say, has anyone written any interesting scripts for use with XnView?
I use XnView all the time, and wish it had a button to open a particular folder and sort by date and scroll to the bottom (I wrote this in powerpro, not ahk, and it works so-so like).
So I was just wondering if anyone had done something similar.
Anyone Write any Good Scripts for XnView?
Re: Anyone Write any Good Scripts for XnView?
I downloaded XnView just to create this script. I had never used it before today.
The script works well for me so far. You will of course need to edit the location to your images and the path to the xnview.exe executable file.
The script works well for me so far. You will of course need to edit the location to your images and the path to the xnview.exe executable file.
Code: Select all
; =======================================================================================
; Name .........: XnView Sort and Scroll
; Description ..: Open XnView to a specific directory and then scroll to the bottom
; AHK Version ..: AHK_L 1.1.22.02 (Unicode 32-bit) - May 27, 2015
; Platform .....: Windows 7 Professional SP1 64-bit
; Language .....: English (en-US)
; Author .......: TheDewd
; Modified .....: 2015-06-11 08:11:30
; =======================================================================================
; Global ================================================================================
#SingleInstance, Force ; Allow only one running instance of script
#Persistent ; Keep script permanently running until terminated
#NoEnv ; Avoid checking empty variables to see if they are environment variables
#Warn ; Enable warnings to assist with detecting common errors
;#NoTrayIcon ; Disable the tray icon of the script
SendMode, Input ; Recommended for new scripts due to its superior speed and reliability
SetWorkingDir, %A_ScriptDir% ; Change the working directory of the script
SetBatchLines, -1 ; Run script at maximum speed
; =======================================================================================
; Script ================================================================================
Run, xnview.exe "C:\Windows\Web\Wallpaper\Windows Featured"
Loop
{
IfWinActive, ahk_exe xnview.exe ; ahk_class XmainClass
{
WinMenuSelectItem, ahk_exe xnview.exe,, View, Sort By, Date
Break
}
Sleep, 500
}
ControlSend, SysListView321, {End}, ahk_exe xnview.exe
Return ; End automatic execution
; =======================================================================================
Last edited by TheDewd on 12 Jun 2015, 12:15, edited 1 time in total.
Re: Anyone Write any Good Scripts for XnView?
I have also discovered that you can add your own toolbar items.
See the screenshot below where I have added a toolbar item and pointed it to a script file, and also used a custom icon. Tested and works on my Windows 7 machine.
Script: ScrollToBottom.ahk
See the screenshot below where I have added a toolbar item and pointed it to a script file, and also used a custom icon. Tested and works on my Windows 7 machine.
Script: ScrollToBottom.ahk
Code: Select all
#NoTrayIcon
ControlSend, SysListView321, {End}, ahk_exe xnview.exe
ExitApp
Re: Anyone Write any Good Scripts for XnView?
Ah, well, I already had a button to do this kind of thing, but had made it with powerpro;
the autohotkey routine works like a charm though.
Thanks for your time!
the autohotkey routine works like a charm though.
Thanks for your time!
My Stuff: mousey; volume; ahkinfo; instantbirder; npp highlighter; Dynamic File Menu; tv - a treeview library;