Found this image viewer code, and it works, but honestly, I don't understand *why* it works. I see the path%num% = stuff (I guess to make path1, path2, path3 etc variables), but then I don't understand what %x1% means in the Gui, Add, Picture bit. I see the %x1% referenced nowhere else(!). Also, what is "vBleah" in the Gui line? Googled on that, found nothing.
But it works.
However, I'd like to alter it a little so that it:
a) resizes the image to be 75% bigger,
b) resizes the window to fit the image so that I can display the images that I need cleanly
c) allows using Left/Right cursor keys to move back/forward through the images and Up/Down cursor keys to zoom in/out.
I think that tons of work must have been done on image viewers (I found a few that were way way overcomplex for my needs), so must be a lot of experts at this on here. If any advice on update this a bit would be great. I like the simplicity of this approach, just want a few tweaks to get it perfect for my needs.
https://autohotkey.com/board/topic/22734-image-viewer/
#noenv ; https://autohotkey.com/board/topic/22734-image-viewer/
num = 1
loop,*.jpg,,1
{
path%num% = %A_LoopFileFullPath%
num++
}
loop,*.bmp,,1
{
path%num% = %A_LoopFileFullPath%
num++
}
loop,*.tif,,1
{
path%num% = %A_LoopFileFullPath%
num++
}
loop,*.png,,1
{
path%num% = %A_LoopFileFullPath%
num++
}
Gui, Add, Picture,vBleah x6 y10 w1160 h690 , %x1%
Gui, Add, Button, x496 y710 w30 h30 g<, <
Gui, Add, Button, x566 y710 w30 h30 g>, >
; Generated using SmartGUI Creator 4.0
Gui, Show, x131 y91 h744 w1180, ImageView
Return
count = 1
>:
location := % path%count%
Guicontrol,,Bleah,*w0 *h0 %location%
if count = %num%
{
count = 1
}
else
{
count++
}
return
<:
count--
location := % path%count%
Guicontrol,,Bleah,*w0 *h0 %location%
if count = 1
{
count = %num%
}
return
GuiClose:
ExitApp
- Home Board index AutoHotkey (v1.1 and older) Ask for Help (v1)
- Search
-
- It is currently 18 Apr 2024, 01:36
- All times are UTC-05:00
Image Viewer
Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey (v2, current version)
- Ask for Help (v2)
- Gaming
- Scripts and Functions (v2)
- Gaming
- Tutorials (v2)
- Tips and Tricks
- Wish List
- Suggestions on Documentation Improvements
- Bug Reports
- AutoHotkey Development
- AutoHotkey_H
- Ask for Help
- Development
- Editors
- Adventure IDE
- Old Topics
- AHK Studio
- Notepad++
- Pulovers Macro Creator
- SciTE4AutoHotkey
- Visual Studio Code
- Announcements
- General Discussion
- AutoHotkey (v1.1 and older)
- Ask for Help (v1)
- Gaming Help (v1)
- Scripts and Functions (v1)
- Gaming Scripts (v1)
- Tutorials (v1)
- Tips and Tricks (v1)
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- KeySharp
- Off-topic Discussion
- RPA
- Other languages
- Looking for Volunteers in other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)