-
Notifications
You must be signed in to change notification settings - Fork 2
/
DesktopPic.hta
1106 lines (1004 loc) · 48.1 KB
/
DesktopPic.hta
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--
DesktopPic (Display picture or slideshow on desktop and/or stamp picture to wallpaper)
Les Ferch, lesferch@gmail.com, GitHub repository created 2022-03-20
DesktopPic.hta (Main program to display and stamp images)
WallP.exe (command line tool to set wallpaper per monitor)
-->
<html>
<head>
<title>DesktopPic</title>
<meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=9">
<hta:application
id=oHTA
icon="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
maximizebutton=no
minimizebutton=no
showintaskbar=no
contextmenu=no
border=none
caption=no
scroll=no
>
<script language="VBScript">
'Begin Main
Window.ResizeTo 0,0
Const HideMe = 999999999
Window.MoveTo HideMe,HideMe
Const MyVerNum = "1.1.9"
Const WallPVerNum = "1.0.0.0"
Const ForReading = 1
Const ForWriting = 2
Const wiaFormatPNG = "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}"
Const wiaFormatBMP = "{B96B3CAB-0728-11D3-9D7B-0000F81EF32E}"
Const HKCU = &H80000001
Set oWSH = CreateObject("Wscript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oReg = GetObject("winmgmts:\\.\root\default:StdRegProv")
Set oImg = CreateObject("WIA.ImageFile")
Set oSettings = CreateObject("Scripting.Dictionary")
Set DigitsOnly = New RegExp: DigitsOnly.Pattern = "[^0-9]"
Set DigitsComma = New RegExp: DigitsComma.Pattern = "[^0-9,]"
Dim PicTimer,UpdatePos,w,h,iw,ih,x,y,CenterCoordinates,hTpp,wTpp,Msg,L(10),aImage,MyAppData,ArrPic
Z = VBCRLF
Q = Chr(34)
'Copy of HTA for interface, WallP.exe, and processed image, go in MyAppData
'Note: INI file is stored with app for portability and to allow multiple instances
MyAppData = oWSH.ExpandEnvironmentStrings("%LocalAppData%") & "\DesktopPic\"
If Not oFSO.FolderExists(MyAppData) Then oFSO.CreateFolder(MyAppData)
WallPExe = MyAppData & "WallP.exe"
PicListFile = MyAppData & "PicList.txt"
NTVer = oWSH.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentVersion")
L(0)="Run on startup|Bring to front on start|Stretch smaller pictures|Pic delay in seconds|Max percent of screen area|Centered|Custom|Window position|Stamp|Restore|Continue|Help|Place at least one image file in the folder shown below|No image files found|This option can only be used on the primary monitor.|Press ⊞-P to temporarily change the primary monitor.|Wallpaper style must be set to Fill to use this option|Change wallpaper style to Fill?|Wallpaper file missing:|Background type must be set to Picture to use this option|Change background type to picture?|Display file names"
L(1)="Beim Start ausführen|Beim Start nach vorne bringen|Strecken Sie kleinere Bilder|Bildverzögerung in Sekunden|Maximaler Prozentsatz der Bildschirmfläche|Zentriert|Brauch|Fensterposition|Briefmarke|Wiederherstellen|Fortsetzen|Hilfe|Legen Sie mindestens eine Bilddatei in dem unten angezeigten Ordner ab|Keine Bilddateien gefunden|Diese Option kann nur auf dem primären Monitor verwendet werden|Drücken Sie ⊞-P, um den primären Monitor vorübergehend zu ändern.|Hintergrundstil muss auf Ausfüllen eingestellt sein, um diese Option zu verwenden|Hintergrundstil in Ausfüllen ändern?|Wallpaper-Datei fehlt:|Der Hintergrundtyp muss auf Bild eingestellt sein, um diese Option zu verwenden|Hintergrundtyp in Bild ändern?|Dateinamen anzeigen"
L(2)="Corre al empezar|Traer al frente al inicio|Estirar imágenes más pequeñas|Retardo de imagen en segundos|Porcentaje máximo del área de la pantalla|Centrado|Personalizado|Posición de la ventana|Sello|Restaurar|Continuar|Ayuda|Coloque al menos un archivo de imagen en la carpeta que se muestra a continuación|No se encontraron archivos de imagen|Esta opción solo se puede usar en el monitor principal|Presione ⊞-P para cambiar temporalmente el monitor principal.|El estilo de fondo de pantalla debe establecerse en Rellenar para usar esta opción|¿Cambiar el estilo de fondo de pantalla a Rellenar?|Falta el archivo del fondo de pantalla:|El tipo de fondo debe establecerse en Imagen para usar esta opción|¿Cambiar el tipo de fondo a imagen?|Mostrar nombres de archivos"
L(3)="Exécuter au démarrage|Amenez à l'avant au démarrage|Étirez des images plus petites|Délai d'image en secondes|Pourcentage maximum de la zone d'écran|Centré|Personnalisé|Position de la fenêtre|Timbre|Restaurer|Continuez|Aide|Placez au moins un fichier image dans le dossier indiqué ci-dessous|Aucun fichier image trouvé|Cette option ne peut être utilisée que sur le moniteur principal|Appuyez sur ⊞-P pour changer temporairement le moniteur principal.|Le style de papier peint doit être défini sur Remplir pour utiliser cette option|Changer le style de fond d'écran en Remplir ?|Fichier de fond d'écran manquant :|Le type d'arrière-plan doit être défini sur Image pour utiliser cette option|Changer le type d'arrière-plan en image ?|Afficher les noms de fichiers"
L(4)="起動時に実行する|スタート時に前面に出す|小さい画像を伸ばす|秒単位の画像の遅延|画面領域の最大パーセント|中央揃え|カスタム|ウィンドウの位置|切手|戻す|継続する|ヘルプ|以下に示すフォルダに少なくとも1つの画像ファイルを配置します|画像ファイルが見つかりません|このオプションは、プライマリモニターでのみ使用できます|⊞-Pを押して、プライマリモニターを一時的に変更します。|このオプションを使用するには、壁紙のスタイルを塗りつぶしに設定する必要があります|壁紙のスタイルを塗りつぶしに変更しますか?|壁紙ファイルがありません:|このオプションを使用するには、背景タイプを画像に設定する必要があります|背景の種類を画像に変更しますか?|ファイル名を表示する"
L(5)="在启动时运行|开始时放在前面|拉伸较小的图片|图片延迟以秒为单位|最大屏幕面积百分比|居中|风俗|窗口位置|邮票|恢复|继续|帮助|将至少一个图像文件放入如下所示的文件夹中|未找到图像文件|此选项只能在主显示器上使用|按 ⊞-P 临时更改主监视器。|墙纸样式必须设置为填充才能使用此选项|将壁纸样式更改为填充?|壁纸文件丢失:|背景类型必须设置为图片才能使用此选项|将背景类型更改为图片?|显示文件名"
L(6)="在啟動時運行|開始時放在前面|拉伸較小的圖片|圖片延遲以秒為單位|最大屏幕面積百分比|居中|風俗|窗口位置|郵票|恢復|繼續|幫助|在如下所示的文件夾中至少放置一個圖像文件|未找到圖像文件|此選項只能在主顯示器上使用|按 ⊞-P 臨時更改主監視器。|牆紙樣式必須設置為填充才能使用此選項|將壁紙樣式更改為填充?|壁紙文件丟失:|背景類型必須設置為圖片才能使用此選項|將背景類型更改為圖片?|顯示文件名"
L(7)="시작 시 실행|시작 시 맨 앞으로 가져오기|작은 사진 늘리기|초 단위의 사진 지연|화면 영역의 최대 백분율|중앙|관습|창 위치|우표|복원하다|계속하다|돕다|아래 표시된 폴더에 하나 이상의 이미지 파일을 넣으십시오.|이미지 파일을 찾을 수 없습니다|이 옵션은 기본 모니터에서만 사용할 수 있습니다.|기본 모니터를 일시적으로 변경하려면 ⊞-P를 누르세요.|이 옵션을 사용하려면 배경 화면 스타일을 채우기로 설정해야 합니다.|배경화면 스타일을 채우기로 변경하시겠습니까?|배경화면 파일 누락:|이 옵션을 사용하려면 배경 유형을 그림으로 설정해야 합니다.|배경 유형을 그림으로 변경하시겠습니까?|파일 이름 표시"
L(8)="Chạy khi khởi động|Đưa lên trước khi bắt đầu|Kéo dài hình ảnh nhỏ hơn|Pic trễ trong vài giây|Phần trăm diện tích màn hình tối đa|Căn giữa|Tập quán|Vị trí cửa sổ|Con tem|Khôi phục|Còn nữa|Giúp đỡ|Đặt ít nhất một tệp hình ảnh trong thư mục được hiển thị bên dưới|Không tìm thấy tệp hình ảnh nào|Tùy chọn này chỉ có thể được sử dụng trên màn hình chính.|Nhấn ⊞-P để tạm thời thay đổi điều khiển chính.|Kiểu hình nền phải được đặt thành Tô để sử dụng tùy chọn này|Thay đổi kiểu hình nền thành Điền?|Tệp hình nền bị thiếu:|Loại nền phải được đặt thành Ảnh để sử dụng tùy chọn này|Thay đổi loại nền thành hình ảnh?|Hiển thị tên tệp"
L(9)="Выполняться при запуске|Привести к началу на старте|Растягивать маленькие картинки|Задержка изображения в секундах|Максимальный процент площади экрана|по центру|Обычай|Положение окна|Печать|Восстановить|Продолжать|Помощь|Поместите хотя бы один файл изображения в папку, показанную ниже.|Файлы изображений не найдены|Этот параметр можно использовать только на основном мониторе.|Нажмите ⊞-P, чтобы временно изменить основной монитор.|Чтобы использовать эту опцию, для стиля обоев должно быть установлено значение «Заливка».|Изменить стиль обоев на Заливка?|Отсутствует файл обоев:|Тип фона должен быть установлен на Изображение, чтобы использовать эту опцию.|Изменить тип фона на картинку?|Показать имена файлов"
L(10)="Executar ao iniciar|Traga para a frente no início|Esticar fotos menores|Atraso da foto em segundos|Porcentagem máxima da área da tela|Centralizado|Personalizado|Posição da janela|Carimbo|Restaurar|Continuar|Ajuda|Coloque pelo menos um arquivo de imagem na pasta mostrada abaixo|Nenhum arquivo de imagem encontrado|Esta opção só pode ser usada no monitor primário.|Pressione ⊞-P para alterar temporariamente o monitor primário.|O estilo do papel de parede deve ser definido como Preencher para usar esta opção|Alterar o estilo do papel de parede para Preencher?|Arquivo de papel de parede ausente:|O tipo de plano de fundo deve ser definido como Imagem para usar esta opção|Alterar o tipo de plano de fundo para imagem?|Exibir nomes de arquivos"
ShowFileName = False
RunOnStartup = False
BringToFront = True
Stretch = False
PicDelay = 5
MaxScrPct = 25
Coordinates = ""
Forward = True
DoingInput = False
BadImage = False
PicIndex = -1
LangIdx=0
On Error Resume Next
Language = oWSH.RegRead("HKCU\Control Panel\International\LocaleName")
Language = oWSH.RegRead("HKCU\Control Panel\Desktop\PreferredUILanguages")(0)
If Left(Language,2)="de" Then LangIdx=1
If Left(Language,2)="es" Then LangIdx=2
If Left(Language,2)="fr" Then LangIdx=3
If Left(Language,2)="ja" Then LangIdx=4
If Language="zh-CN" Then LangIdx=5
If Language="zh-TW" Then LangIdx=6
If Left(Language,2)="ko" Then LangIdx=7
If Left(Language,2)="vi" Then LangIdx=8
If Left(Language,2)="ru" Then LangIdx=9
If Left(Language,2)="pt" Then LangIdx=10
On Error Goto 0
OptionMode = oHTA.caption="yes"
BorderSize = 0: If OptionMode Then BorderSize = 8
CaptionHeight = 30
CmdLine = Replace(oHTA.commandLine,Q & " " & Q,"|")
CmdLine = Replace(CmdLine,Q & " " & Q,"|")
CmdLine = Replace(CmdLine,Q,"")
aParam = Split(CmdLine,"|")
MyPath = Mid(document.URL,8)
MyFolder = oFSO.GetParentFolderName(MyPath)
MyName = oFSO.GetFileName(MyPath)
OptionModeHTA = MyAppData & MyName
If oFSO.FileExists(MyFolder & "\README.md") Then DevMode = True
If UBound(aParam)>0 Then
If IsNumeric(aParam(1)) Then PicIndex = aParam(1) - 1
End If
If OptionMode Then
PicPath = aParam(2) & "\"
HTAName = aParam(3)
MyTitle = Split(HTAName,".")(0)
oWSH.CurrentDirectory = PicPath
Else
MyTitle = Split(MyName,".")(0)
oWSH.CurrentDirectory = MyFolder
PicPath = oWSH.CurrentDirectory & "\"
End If
INIFile = PicPath & MyTitle & ".ini"
If Not(Instr(MyFolder,"C:\Program Files\")>0 Or Instr(MyFolder,"C:\Program Files (x86)\")>0) Then
TestFile = ".\" & Replace(Replace(Replace(Now(),"/",""),":","")," ","") & ".txt"
On Error Resume Next
Set oFile = oFSO.OpenTextFile(TestFile,ForWriting,True,Ansi)
oFile.Write ""
oFile.Close
On Error Goto 0
If oFSO.FileExists(TestFile) Then
oFSO.DeleteFile(TestFile)
Else
INIFile = MyAppData & MyTitle & ".ini"
End If
End If
If NTVer=>"6.1" Then
If oFSO.FileExists(WallPExe) Then
Set oFile = oFSO.OpenTextFile(WallPExe,ForReading)
FileContents = oFile.ReadAll
oFile.Close
If Instr(FileContents,WallPVerNum)=0 Then oFSO.DeleteFile(WallPExe)
End If
If Not oFSO.FileExists(WallPExe) Then
oWSH.Run "certutil -decode " & Q & MyPath & Q & " " & Q & WallPExe & Q,0,False
End If
End If
PicExt = ".png"
PicFormat = wiaFormatPNG
If NTVer="6.1" Then
PicFormat = wiaFormatBMP
PicExt = ".bmp"
End If
Ini2Dict
If oSettings.Exists("[Options]LangIdx") Then LangIdx = oSettings.Item("[Options]LangIdx")
If oSettings.Exists("[Options]RunOnStartup") Then RunOnStartup = (LCase(oSettings.Item("[Options]RunOnStartup"))="true")
If oSettings.Exists("[Options]BringToFront") Then BringToFront = (LCase(oSettings.Item("[Options]BringToFront"))="true")
If oSettings.Exists("[Options]Stretch") Then Stretch = (LCase(oSettings.Item("[Options]Stretch"))="true")
If oSettings.Exists("[Options]ShowFileName") Then ShowFileName = (LCase(oSettings.Item("[Options]ShowFileName"))="true")
If oSettings.Exists("[Options]PicDelay") Then PicDelay = oSettings.Item("[Options]PicDelay")
If oSettings.Exists("[Options]MaxScrPct") Then MaxScrPct = oSettings.Item("[Options]MaxScrPct")
If oSettings.Exists("[Options]Coordinates") Then Coordinates = oSettings.Item("[Options]Coordinates")
If Stretch="" Then Stretch = False
If PicDelay="" Then PicDelay = 5
If MaxScrPct="" Then MaxScrPct = 25
Msg = Split(L(LangIdx),"|")
oWSH.Run "Cmd /c dir /b *.png *.jpg *.bmp *.gif>" & Q & PicListFile & Q,0,True
FileContents = ""
On Error Resume Next
Set oFile = oFSO.OpenTextFile(PicListFile,ForReading)
FileContents = oFile.ReadAll
oFile.Close
On Error Goto 0
If FileContents="" Then
MsgBox Msg(12) & Z & Z & MyFolder,vbOKonly,Msg(13)
self.close
Else
ArrPic = Split(FileContents,Z)
End If
'End Main
Function GetScale()
GetScale = 1.0
On Error Resume Next
'If user changes scale, they must logout/login for this registry value to change
GetScale = oWSH.RegRead("HKCU\Control Panel\Desktop\WindowMetrics\AppliedDPI") / 96
On Error Goto 0
End Function
Sub Ini2Dict
If oFSO.FileExists(INIFile) Then
Set oFile = oFSO.OpenTextFile(INIFile,ForReading)
Do Until oFile.AtEndOfStream
Line = Trim(oFile.ReadLine)
If Line<>"" And Left(Line,1)<>";" Then
If Left(Line,1)="[" Then
Section = Line
Else
ArrLine = Split(Line,"=")
If UBound(Arrline)=1 Then oSettings.Add Section & ArrLine(0),ArrLine(1)
End If
End If
Loop
oFile.Close
End If
End Sub
Sub window_onLoad
If OptionMode Then
document.body.style.backgroundPosition="0px -" & CaptionHeight & "px"
ShowOptions
If LangIdx<>0 Then UpdateLang
Else
HideOptions
End If
If NTVer<"6.1" Then
Bsw.Disabled = True
Brw.Disabled = True
End If
document.Title = MyTitle
If Not BringToFront Then Window.blur
LoadPic
If Coordinates<>"" Then RepositionWindow
ToggleShortcut
wTpp = Window.outerWidth: hTpp = Window.outerHeight
If OptionMode Then
UpdatePos = Window.SetInterval("UpdatePosition()", 100)
Else
If UBound(ArrPic)>1 Then PicTimer = Window.SetInterval("LoadPic()", PicDelay*1000)
End If
End Sub
Sub UpdateLang
Msg = Split(L(LangIdx),"|")
M0.innerHTML = Msg(0)
M1.innerHTML = Msg(1)
M2.innerHTML = Msg(2)
M3.innerHTML = Msg(3)
M4.innerHTML = Msg(4)
M5.innerHTML = Msg(5)
M6.innerHTML = Msg(6)
M7.innerHTML = Msg(7)
M8.innerHTML = Msg(21)
Bsw.Value = Msg(8)
Brw.Value = Msg(9)
Bcn.Value = Msg(10)
Bhp.Value = Msg(11)
End Sub
Sub UpdateXY
x = 0: y = 0
aCoords = Split(Coordinates,",")
On Error Resume Next
x = CInt(aCoords(0))
y = CInt(aCoords(1))
On Error Goto 0
Coordinates = x & "," & y
End Sub
Sub RepositionWindow
UpdateXY
Window.MoveTo x - BorderSize, y
End Sub
Sub ToggleShortcut
Crs.blur
RunOnstartup = Crs.Checked
ShortCutFolder = oWSH.SpecialFolders("Startup")
ShortcutExists = False
Set oFolder = oFSO.GetFolder(ShortCutFolder)
For Each oFile In oFolder.Files
If LCase(oFSO.GetExtensionName(oFile.Name)) = "lnk" Then
Set link = oWSH.CreateShortcut(ShortCutFolder & "\" & oFile.Name)
If link.TargetPath=PicPath & HTAName Then
ShortcutExists = True
If Not RunOnstartup Then oFSO.DeleteFile ShortCutFolder & "\" & oFile.Name
End If
End If
Next
If RunOnstartup And Not ShortcutExists Then
ShortCutPath = ShortCutFolder & "\" & MyTitle & Replace(Replace(Replace(Now(),"/",""),":","")," ","") & ".lnk"
Set link = oWSH.CreateShortcut(ShortCutPath)
link.TargetPath = PicPath & HTAName
link.Save
End If
End Sub
Sub UpdatePosition
sw = screen.availWidth
sh = screen.availHeight
w = Window.outerWidth
h = Window.outerHeight
UpdateTpp = Not(w=wTpp And h=hTpp)
w = w - (BorderSize * 2)
h = h - BorderSize
If UpdateTpp Then
NewSize = Cint((w * h) / (sw * sh) * 100)
If NewSize>100 Then NewSize = 100
If NewSize<=0 Then NewSize = 1
Tpp.Value = NewSize
MaxScrPct = Tpp.Value
Else
Tpp.Value = MaxScrPct
End If
Tsp.Value = window.screenX + BorderSize & "," & window.screenY
Coordinates = Tsp.Value
UpdateXY
If Mpp.SelectedIndex=0 And Tsp.Value<>CenterCoordinates Then
Mpp.SelectedIndex=1
Tsp.style.display = ""
End If
End Sub
Sub LoadPic
If Forward Then PicIndex = PicIndex + 1 Else PicIndex = PicIndex - 1
If PicIndex=UBound(ArrPic) Then PicIndex = 0
If PicIndex<0 Then PicIndex = UBound(ArrPic)-1
aImage = Split(ArrPic(PicIndex),"|")
If UBound(aImage)=0 Then
On Error Resume Next
oImg.LoadFile aImage(0)
If Err.Number=0 Then IsImage=True Else IsImage=False
On Error Goto 0
If IsImage Then
iw = oImg.Width: ih = oImg.Height
ArrPic(PicIndex) = aImage(0) & "|" & iw & "|" & ih
Else
ArrPic(PicIndex) = aImage(0) & "|0|0"
End If
aImage = Split(ArrPic(PicIndex),"|")
End If
iw = aImage(1): ih = aImage(2)
Nam.innerHTML = aImage(0)
If iw>0 And ih>0 Then
BadImage = False
If ShowFileName Then
Nam.style.display = ""
Else
Nam.style.display = "none"
End If
ResizePic
ResizeWindow
If Coordinates="" Then CenterWindow
window.document.body.background = PicPath & aImage(0)
Else
BadImage = True
Nam.style.display = ""
iw = 9: ih = 6
ResizePic
ResizeWindow
If Coordinates="" Then CenterWindow
window.document.body.background = ""
End If
End Sub
Sub ResizePic
sw = screen.availWidth
sh = screen.availHeight
MaxArea = sw * sh * (MaxScrPct/100)
ImgArea = iw * ih
w = iw: h = ih
If ImgArea>MaxArea Or Stretch Or OptionMode Or BadImage Then
ResizeFactor = Sqr(MaxArea/ImgArea)
w = iw * ResizeFactor
h = ih * ResizeFactor
If w>sw Then h = sw/w * h : w = sw
If h>sh Then w = sh/h * w : h = sh
w = CInt(w): h = CInt(h)
h = h + BorderSize: w = w + (BorderSize * 2)
End If
End Sub
Sub ResizeWindow
Window.ResizeTo w, h
End Sub
Sub CenterWindow
sw = screen.availWidth
sh = screen.availHeight
Window.MoveTo (sw - w)/2, (sh - h)/2
CenterCoordinates = window.screenX + BorderSize & "," & window.screenY
End Sub
Sub ShowOptions
Opt.style.display = ""
Scale = GetScale()
Crs.Style.Zoom = 1.2 * Scale
Cbf.Style.Zoom = 1.2 * Scale
Csp.Style.Zoom = 1.2 * Scale
Cfn.Style.Zoom = 1.2 * Scale
Crs.Checked = RunOnStartup
Cbf.Checked = BringToFront
Csp.Checked = Stretch
Cfn.Checked = ShowFileName
Tpd.Value = PicDelay
Tpp.Value = MaxScrPct
Tsp.Value = Coordinates
If Coordinates="" Then
Tsp.style.display = "none"
Else
mpp.SelectedIndex = 1
Tsp.style.display = ""
End If
Mln.SelectedIndex = LangIdx
End Sub
Sub HideOptions
Opt.style.display = "none"
Tsp.style.display = "none"
End Sub
Sub document_ondblclick
If Not OptionMode Then LaunchOptionModeHTA
End Sub
Sub document_onclick
If OptionMode And Not DoingInput Then
ResizePic
ResizeWindow
Var2Ini
End If
End Sub
Sub ManualAdvance(Flag,KeyCode)
If Not DoingInput Then
window.event.keyCode = 0
clearInterval(PicTimer)
Forward = Flag
If Not(KeyCode=32) Then PicTimer = 0
If PicTimer=0 Then LoadPic
PicTimer = 0
End If
End Sub
Sub document_onKeyDown
If window.event.ctrlKey And window.event.keyCode=116 Then
window.event.keyCode = 0
Exit Sub
End If
If window.event.ctrlKey Or window.event.altKey Or window.event.shiftKey Then Exit Sub
Select Case window.event.keyCode
Case 32, 39 'Spacebar, Right arrow
ManualAdvance True,window.event.keyCode
Case 8, 37 'Backspace, Left arrow
ManualAdvance False,window.event.keyCode
Case 13 'Enter
ContinueShow
Case 27 'Esc
If Not OptionMode Then LaunchOptionModeHTA
Case 116 'F5
window.event.keyCode = 0
Case 114 'F3
If OptionMode Then
window.event.keyCode = 0
oWSH.Run "Explorer.exe """ & PicPath & """",1,False
End If
Case 115 'F4
If OptionMode Then
window.event.keyCode = 0
oWSH.Run "Explorer.exe """ & MyAppData & """",1,False
End If
End Select
End Sub
Sub ContinueShow
If OptionMode Then
oWSH.Run Q & PicPath & HTAName & Q & " " & Q & PicIndex & Q,1,False
self.close
Else
HideOptions
Forward = True
clearInterval(PicTimer)
PicTimer = Window.SetInterval("LoadPic()", PicDelay*1000)
End If
End Sub
Sub Help
Bhp.blur
oWSH.Run "https://lesferch.github.io/DesktopPic"
End Sub
Sub LaunchOptionModeHTA
clearInterval(PicTimer)
If oFSO.FileExists(OptionModeHTA) Then
If DevMode Then
oFSO.DeleteFile(OptionModeHTA)
Else
Set oFile = oFSO.OpenTextFile(OptionModeHTA,ForReading)
FileContents = oFile.ReadAll
oFile.Close
If Instr(FileContents,Q & MyVerNum & Q)=0 Then oFSO.DeleteFile(OptionModeHTA)
End If
End If
If Not oFSO.FileExists(OptionModeHTA) Then
Set oFile = oFSO.OpenTextFile(MyPath,ForReading)
MyCode = oFile.ReadAll
oFile.Close
MyCode = Replace(MyCode,LCase("CAPTION=NO"),"caption=yes")
MyCode = Replace(MyCode,LCase("BORDER=NONE"),"border=thick")
MyCode = Replace(MyCode,LCase("SCROLL=NO"),"scroll=auto")
Set oFile = oFSO.OpenTextFile(OptionModeHTA,ForWriting,True)
oFile.Write MyCode
oFile.Close
End If
oWSH.Run Q & OptionModeHTA & Q & " " & Q & PicIndex & Q & " " & Q & MyFolder & Q & " " & Q & MyName & Q,1,False
self.close
End Sub
Sub OnFocusInput
DoingInput = True
ClearInterval(UpdatePos)
End Sub
Sub OnBlurInput
DoingInput = False
UpdatePos = Window.SetInterval("UpdatePosition()", 500)
End Sub
Sub OnInputDigits(id)
document.getElementByID(id).Value = DigitsOnly.Replace(document.getElementByID(id).Value,"")
End Sub
Sub OnInputDigitsComma(id)
document.getElementByID(id).Value = DigitsComma.Replace(document.getElementByID(id).Value,"")
document.getElementByID(id).Value = Replace(document.getElementByID(id).Value,",,",",")
End Sub
Sub OnChangeTpd
If Tpd.Value<1 Then Tpd.Value = 1
End Sub
Sub OnChangeTpp
If Tpp.Value<1 Or Tpp.Value>100 Then
Tpp.Value = MaxScrPct
Else
MaxScrPct = Tpp.Value
End If
ResizePic
ResizeWindow
wTpp = Window.outerWidth: hTpp = Window.outerHeight
End Sub
Sub OnChangeMPP
Mpp.blur
If Mpp.SelectedIndex=1 Then
Tsp.style.display = ""
Else
CenterWindow
Tsp.style.display = "none"
End If
End Sub
Sub OnChangeMln
LangIdx = Mln.SelectedIndex
UpdateLang
End Sub
Sub OnChangeTsp
If tsp.Value<>"" Then
Coordinates = Tsp.Value
RepositionWindow
End If
End Sub
Sub OnClickCfn
Cfn.blur
If Cfn.checked Then
Nam.style.display = ""
ShowFileName = True
Else
Nam.style.display = "none"
ShowFileName = False
End If
End Sub
Sub window_onUnload
If OptionMode Then Var2Ini
End Sub
Sub Var2Ini
Set oFile = oFSO.OpenTextFile(INIFile,ForWriting,True)
oFile.Write "[Options]" & Z
oFile.Write "LangIdx=" & LangIdx & Z
oFile.Write "RunOnStartup=" & Crs.Checked & Z
oFile.Write "BringToFront=" & Cbf.Checked & Z
oFile.Write "Stretch=" & Csp.Checked & Z
oFile.Write "ShowFileName=" & Cfn.Checked & Z
oFile.Write "PicDelay=" & Tpd.Value & Z
oFile.Write "MaxScrPct=" & Tpp.Value & Z
If Mpp.SelectedIndex=0 Then Tsp.Value=""
If InStr(Tsp.Value,HideMe) Then Tsp.Value = ""
oFile.Write "Coordinates=" & Tsp.Value & Z
oFile.Close
End Sub
Sub RestoreWallpaper
Brw.blur
If (x<0 Or y<0 Or x>screen.Width Or y>screen.Height) Then
MsgBox Msg(14) & Z & Z & Msg(15),vbOKonly,Msg(9)
Exit Sub
End If
oWSH.Run Q & WallPExe & Q & " 0",0,True
Monitor = oWSH.RegRead("HKCU\Software\WallP\Monitor")
WPpath = oWSH.RegRead("HKCU\Software\WallP\WPpath")
On Error Resume Next
WPbackup = oWSH.RegRead("HKCU\Software\WallP\" & Monitor & "\WPbackup")
On Error Goto 0
If oFSO.FileExists(WPbackup) Then
oWSH.Run Q & WallPExe & Q & " 0 " & Q & WPbackup & Q,0,True
Else
On Error Resume Next
WPbackup = oWSH.RegRead("HKCU\Software\WallP\All\WPbackup")
On Error Goto 0
If oFSO.FileExists(WPbackup) Then
oWSH.Run Q & WallPExe & Q & " 0 " & Q & WPbackup & Q,0,True
End If
End If
If oFSO.FileExists(WPpath) Then
If InStr(LCase(WPpath),LCase(MyAppData & "DesktopPic"))=0 Then
oWSH.RegWrite "HKCU\Software\WallP\" & Monitor & "\WPbackup",WPpath
oWSH.RegWrite "HKCU\Software\WallP\All\WPbackup",WPpath
End If
End If
End Sub
Sub StampWallpaper
Bsw.blur
If (x<0 Or y<0 Or x>screen.Width Or y>screen.Height) Then
MsgBox Msg(14) & Z & Z & Msg(15),vbOKonly,Msg(8)
Exit Sub
End If
'Check for Fill style
WallpaperStyle = oWSH.RegRead("HKCU\Control Panel\Desktop\WallpaperStyle")
If WallpaperStyle<>"10" Then
Answer = MsgBox(Msg(16) & Z & Z & Msg(17),vbYesNo,Msg(8))
If Answer = vbNo Then Exit Sub
End If
'Detect if slideshow is enabled
BackgroundType = 0
On Error Resume Next
BackgroundType = oWSH.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers\BackgroundType")
On Error Goto 0
If BackgroundType=2 Then
Answer = MsgBox(Msg(19) & Z & Z & Msg(20),vbYesNo,Msg(8))
If Answer = vbNo Then Exit Sub
End If
If NTVer="6.1" Then
If oWSH.RegRead("HKCU\Control Panel\Desktop\Wallpaper")="" Then BackgroundType = 1
End If
sw = screen.availWidth
sh = screen.availHeight
Fsw = screen.Width
Fsh = screen.Height
StampImg = PicPath & aImage(0)
oWSH.Run Q & WallPExe & Q & " 0",0,True
Monitor = oWSH.RegRead("HKCU\Software\WallP\Monitor")
WPpath = oWSH.RegRead("HKCU\Software\WallP\WPpath")
StampedFile = MyAppData & "DesktopPic" & Monitor & PicExt
'Solid color background
If BackgroundType=1 Then
Colors = Split(oWSH.RegRead("HKCU\Control Panel\Colors\Background")," ")
c = CLng("&hFF" & Right("0" & Hex(Colors(0)),2) & Right("0" & Hex(Colors(1)),2) & Right("0" & Hex(Colors(2)),2))
Pad = Int(0.1 * Math.Max(Fsw,Fsh))
Set v = CreateObject("WIA.Vector")
For i = 1 To 400
v.Add c
Next
Set Img = v.ImageFile(20,20)
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add IP.FilterInfos("Scale").FilterID
IP.Filters(1).Properties("MaximumWidth") = Fsw + Pad
IP.Filters(1).Properties("MaximumHeight") = Fsh + Pad
IP.Filters(1).Properties("PreserveAspectRatio") = KeepAspect
IP.Filters.Add IP.FilterInfos("Crop").FilterID
IP.Filters(2).Properties("Right") = Pad
IP.Filters(2).Properties("Bottom") = Pad
IP.Filters.Add IP.FilterInfos("Convert").FilterID
IP.Filters(3).Properties("FormatID").Value = PicFormat
Set Img = IP.Apply(Img)
SolidColorImage = MyAppData & "SolidColorImage" & PicExt
If oFSO.FileExists(SolidColorImage) Then oFSO.DeleteFile SolidColorImage
Img.SaveFile SolidColorImage
Set Img=Nothing
Set IP=Nothing
WPpath = SolidColorImage
oWSH.Run Q & WallPExe & Q & " 0 Fill " & Q & SolidColorImage & Q,0,True
MonitorCount = oWSH.RegRead("HKCU\Software\WallP\MonitorCount")
If MonitorCount>1 Then
For i = 1 To MonitorCount-1
oWSH.Run Q & WallPExe & Q & " " & i & " Fill " & Q & SolidColorImage & Q,0,True
Next
End If
End If
If oFSO.FileExists(WPpath) Then
If InStr(LCase(WPpath),LCase(MyAppData & "DesktopPic"))=0 Then
oWSH.RegWrite "HKCU\Software\WallP\" & Monitor & "\WPbackup",WPpath
oWSH.RegWrite "HKCU\Software\WallP\All\WPbackup",WPpath
End If
Else
MsgBox Msg(18) & Z & Z & WPpath
Exit Sub
End If
'Scale image to be stamped
Set Img = CreateObject("WIA.ImageFile")
Img.LoadFile StampImg
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add IP.FilterInfos("Scale").FilterID
IP.Filters(1).Properties("MaximumWidth") = w
IP.Filters(1).Properties("MaximumHeight") = h
Set Img = IP.Apply(Img)
Set IP=Nothing
'Load current wallpaper
Set Wall = CreateObject("WIA.ImageFile")
Wall.LoadFile WPpath
'Adjust current wallpaper to fill screen
If Not(Wall.Width=Fsw And Wall.Height=Fsh) Then
wFactor = Fsw / Wall.Width
hFactor = Fsh / Wall.Height
If wFactor>hFactor Then NewWidth = Fsw : NewHeight = Int(wFactor * Wall.Height)
If hFactor>wFactor Then NewHeight = Fsh : NewWidth = Int(hFactor * Wall.Width)
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add IP.FilterInfos("Scale").FilterID
IP.Filters(1).Properties("MaximumWidth") = NewWidth
IP.Filters(1).Properties("MaximumHeight") = NewHeight
IP.Filters(1).Properties("PreserveAspectRatio") = KeepAspect
Set Wall = IP.Apply(Wall)
Set IP=Nothing
NewWidth = Wall.Width
NewHeight = Wall.Height
'Crop excess width or height
If NewWidth>Fsw Or NewHeight>Fsh Then
LeftCrop = 0
RightCrop = 0
TopCrop = 0
BotCrop = 0
If NewWidth>Fsw Then
LeftCrop = Int((NewWidth - Fsw) / 2)
RightCrop = NewWidth - Fsw - LeftCrop
End If
If NewHeight>Fsh Then
TopCrop = Int((NewHeight - Fsh) / 2)
TopCrop = Int(TopCrop * 2 / 3)
BotCrop = NewHeight - Fsh - TopCrop
End If
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add IP.FilterInfos("Crop").FilterID
IP.Filters(1).Properties("Left") = LeftCrop
IP.Filters(1).Properties("Right") = RightCrop
IP.Filters(1).Properties("Top") = TopCrop
IP.Filters(1).Properties("Bottom") = BotCrop
Set Wall = IP.Apply(Wall)
Set IP=Nothing
End If
End If
'Stamp image
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add IP.FilterInfos("Stamp").FilterID
Set IP.Filters(1).Properties("ImageFile") = Img
IP.Filters(1).Properties("Left") = window.screenX + BorderSize
IP.Filters(1).Properties("Top") = window.screenY
IP.Filters.Add IP.FilterInfos("Convert").FilterID
IP.Filters(2).Properties("FormatID").Value = PicFormat
Set Wall = IP.Apply(Wall)
If oFSO.FileExists(StampedFile) Then oFSO.DeleteFile StampedFile
Wall.SaveFile StampedFile
Set Wall=Nothing
Set Img=Nothing
Set IP=Nothing
oWSH.Run Q & WallPExe & Q & " 0 Fill " & Q & StampedFile & Q,0,True
End Sub
</script>
<style>
body {background-size:cover; background-attachment:fixed; background-repeat:no-repeat}
br {font-size: 16pt}
.cc {
font-family: sans-serif;
font-weight: normal;
font-size: 11pt;
color: white;
background: rgba(0,0,0,.4);
padding: 1pt;
border-radius: 2pt;
}
.scaled {vertical-align:bottom}
</style>
</head>
<body>
<span id=Nam class=cc></span>
<div id=Opt>
<input type=button id=Bsw Value=Stamp onclick=StampWallpaper()>
<input type=button id=Brw Value=Restore onclick=RestoreWallpaper()>
<input type=button id=Bcn Value=Continue onclick=ContinueShow()>
<input type=button id=Bhp Value=Help onclick=Help()>
<br>
<select id=Mln OnChange=OnChangeMln()>
<option>English</option>
<option>Deutsch</option>
<option>Español</option>
<option>Français</option>
<option>日本語</option>
<option>中文 (简体)</option>
<option>中文 (繁體)</option>
<option>한국어</option>
<option>Tiếng Việt</option>
<option>Русский</option>
<option>Português</option>
</select><br>
<input type=checkbox class=scaled id=Crs OnClick=ToggleShortcut()>
<span id=M0 class=cc>Run on startup</span><br>
<input type=checkbox class=scaled id=Cbf OnClick=Cbf.blur()>
<span id=M1 class=cc>Bring to front on start</span><br>
<input type=checkbox class=scaled id=Csp OnClick=Csp.blur()>
<span id=M2 class=cc>Stretch smaller pictures</span><br>
<input type=checkbox class=scaled id=Cfn OnClick=OnClickCfn()>
<span id=M8 class=cc>Display file names</span><br>
<input type=text size=5 id=Tpd MaxLength=5 OnFocus=OnFocusInput() OnBlur=OnBlurInput() OnInput=OnInputDigits("Tpd") OnChange=OnChangeTpd()>
<span id=M3 class=cc>Pic delay in seconds</span><br>
<input type=text size=5 id=Tpp MaxLength=3 OnFocus=OnFocusInput() OnBlur=OnBlurInput() OnInput=OnInputDigits("Tpp") OnChange=OnChangeTpp()>
<span id=M4 class=cc>Max percent of screen area</span><br>
<select id=Mpp OnChange=OnChangeMpp()>
<option id=M5>Centered</option>
<option id=M6>Custom</option>
</select>
<span id=M7 class=cc>Window position</span>
<input type=text size=11 id=Tsp MaxLength=11 OnFocus=OnFocusInput() OnBlur=OnBlurInput() OnInput=OnInputDigitsComma("Tsp") OnChange=OnChangeTsp()>
<br>
</div>
</body>
</html>
<!--
This is a base64 encoding of WallP.exe
-----BEGIN CERTIFICATE-----
TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5v
dCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAJWEDf8AAAAA
AAAAAOAAIgALATAAAB4AAAAIAAAAAAAAtjwAAAAgAAAAQAAAAABAAAAgAAAAAgAA
BAAAAAAAAAAGAAAAAAAAAACAAAAAAgAAAAAAAAMAYIUAABAAABAAAAAAEAAAEAAA
AAAAABAAAAAAAAAAAAAAAGQ8AABPAAAAAEAAAIwFAAAAAAAAAAAAAAAAAAAAAAAA
AGAAAAwAAADUOwAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAIAAACAAAAAAAAAAAAAAACCAAAEgAAAAAAAAAAAAAAC50ZXh0AAAA
vBwAAAAgAAAAHgAAAAIAAAAAAAAAAAAAAAAAACAAAGAucnNyYwAAAIwFAAAAQAAA
AAYAAAAgAAAAAAAAAAAAAAAAAABAAABALnJlbG9jAAAMAAAAAGA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