SHOW:
|
|
- or go back to the newest paste.
1 | - | ; If you like this program donate a coffee to paypal d.marzano@libero.it |
1 | + | ; If you like this program donate a coffee to paypal d.marzano@libero.it |
2 | - | ; Programma di backup universale - crea una nuova cartella e ci copia i file di gioco |
2 | + | |
3 | - | ; eseguibile con AUTOHOTKEY |
3 | + | ;-https://www.irfanview.com/ |
4 | - | ; https://www.autohotkey.com |
4 | + | ;-https://www.autohotkey.com/board/topic/121619-screencaptureahk-broken-capturescreen-function-win-81-x64/ ;- see also user 'Linear Spoon' |
5 | ;screenshots=%a_desktop%\SCREENSHOTS ;- create folder | |
6 | - | ; versione 1.6 - 12-giu-2023 |
6 | + | ; Tasto F11 cattura schermo intero e salva file tipo "AA-data-ora.png" |
7 | - | ; Adattabile a qualsiasi gioco, basta cambiare il percorso dei Savegame di gioco |
7 | + | ; cambia le lettere "AA" a piacimento |
8 | ||
9 | - | ; Premi F7 per Posizionare 1 Raffinatore portatile |
9 | + | screenshots=G:\_cattura ;- create folder |
10 | - | ; Premi F8 per Posizionare 2 Raffinatori portatili (raddoppia oggetti inventario test-giu2023 ok) |
10 | + | |
11 | - | ; Premi F9 per Posizionare 3 Raffinatori portatili (Triplica oggetti) |
11 | + | ifnotexist,%screenshots% |
12 | - | ; Premi F10 per un backup automatico ogni 5 minuti |
12 | + | filecreatedir,%screenshots% |
13 | - | ; Premi F11 per un backup manuale |
13 | + | ;-- |
14 | - | ; Premi F12 per chudere |
14 | + | ;irfan=C:\Program Files\IrfanView\i_view64.exe |
15 | irfan=g:\uty\irfanview462\i_view64.exe | |
16 | - | #MaxHotkeysPerInterval 1000 |
16 | + | wa:=A_screenwidth,ha:=A_screenHeight,xx:=100 |
17 | return | |
18 | - | msgBox ,0 ,Universal Savegame Backup AHK , Premi F10 per Autosave ogni 5 minuti `nPremi F11 per Backup manuale Savegame `nPremi F12 per Uscire |
18 | + | ;--------------------------------------------- |
19 | *~$!F2:: | |
20 | - | CoordMode, ToolTip, Screen |
20 | + | |
21 | - | afkenable := 0 |
21 | + | ;salva in altro drive\percorso |
22 | ;aac=%screenshots%\%a_now%_screenshot.png | |
23 | - | ;SourceDir = c:\Users\domen\AppData\Roaming\HelloGames\NMS\st_76561198059579679\ |
23 | + | |
24 | - | SourceDir = %userprofile%\AppData\Roaming\HelloGames\NMS\st_76561198059579679\ |
24 | + | ;salva directory corrente |
25 | - | TargetDir = FEB24_SG ; la cartella di backup e' nella stessa cartella del programma xxx.AHK |
25 | + | ;e cambia il prefisso dei file es AA, BB, XX |
26 | aac=BB_%a_now%_screenshot.png | |
27 | - | ;utente1 = %userprofile% |
27 | + | ;--- |
28 | - | ;MsgBox % utente1 |
28 | + | x:=(wa*10)//xx ,y:=(ha*1)//xx,w:=(wa*50)//xx,h:=(ha*50)//xx ;- x=10% y=1% width=50% height=50% |
29 | ;AA=/capture=2 /crop=(%x%,%y%,%w%,%h%) /aspectratio /convert=%aac% | |
30 | AA=/capture=1 /aspectratio /convert=%aac% ; Full screen | |
31 | ||
32 | - | F10:: |
32 | + | ifexist,%irfan% |
33 | - | afkenable := !afkenable |
33 | + | { |
34 | - | if (afkenable = 0) |
34 | + | runwait,%irfan% %AA% |
35 | run,%aac% | |
36 | - | { |
36 | + | |
37 | - | SplashTextOff |
37 | + | |
38 | - | ToolTip, Autosave OFF, 0, 0 |
38 | + | |
39 | - | SetTimer, RemoveToolTip, -5000 |
39 | + | |
40 | - | SetTimer, Salva, Off |
40 | + | |
41 | - | SoundBeep, 1000, 200 ; emette un beep |
41 | + | } |
42 | - | SoundBeep, 1000, 200 |
42 | + | |
43 | - | SoundBeep, 400, 200 |
43 | + | ;-------------- |
44 | ||
45 | - | } else { |
45 | + | F1:: |
46 | - | ;SplashTextOn,150,85,,AutoSave MODE ON Press F1 to turn OFF |
46 | + | |
47 | - | ;WinMove,,Autosave MODE ON Press F1 to turn OFF,(A_ScreenWidth/2)-(Width/2),25 |
47 | + | |
48 | - | ToolTip, Autosave ON, 0, 0 |
48 | + | |
49 | - | SetTimer, RemoveToolTip, -5000 |
49 | + | |
50 | - | SetTimer, Salva, 300000 ; salta a Salva ogni n. millisec. |
50 | + | |
51 | - | SoundBeep, 400, 200 ; beep |
51 | + | |
52 | - | SoundBeep, 400, 200 |
52 | + | F12::ESC |
53 | - | SoundBeep, 1000, 200 |
53 | + | |
54 | - | } |
54 | + | ;---------------------------------------------------------------------------------- |
55 | /* | |
56 | --- capture values: | |
57 | 0 = whole screen | |
58 | - | Salva: |
58 | + | 1 = current monitor, where mouse is located |
59 | - | { |
59 | + | 2 = foreground window |
60 | 3 = foreground window - client area | |
61 | - | counter = 100 |
61 | + | 4 = rectangle selection |
62 | - | ;MsgBox % counter |
62 | + | 5 = object selected with the mouse |
63 | 6 = start in capture mode (can't be combined with other commandline options) | |
64 | - | Cycle: |
64 | + | |
65 | - | DestDir = %TargetDir%_%counter% |
65 | + | --- Advanced examples: |
66 | - | if !FileExist(DestDir) |
66 | + | i_view32.exe /capture=2 /convert=c:\test.jpg |
67 | - | Goto, Creadir |
67 | + | Capture foreground window and save result as file. |
68 | ||
69 | - | incrementa: |
69 | + | i_view32.exe /capture=2 /convert=c:\capture_$U(%d%m%Y_%H%M%S).jpg |
70 | - | counter++ |
70 | + | Capture foreground window and save result as file; the file name contains time stamp. |
71 | - | Goto, Cycle |
71 | + | */ |
72 | ;----------------------------------------------------------------------------------- | |
73 | - | Creadir: |
73 | + | |
74 | - | ; FileCreateDir, m:\Temp\ahk\nomedir |
74 | + | ;shift + F12 = exitapp |
75 | - | ; DestDir = m:\Temp\ahk\Name_SG_%counter% |
75 | + | |
76 | - | FileCreateDir %DestDir% |
76 | + | +F12:: |
77 | - | ;FileCopyDir, %SourceDir%, %DestDir% |
77 | + | |
78 | - | FileCopy, %SourceDir%\*.*, %DestDir% |
78 | + | |
79 | - | FileCopy, restore.bat, %DestDir% |
79 | + | |
80 | ExitApp | |
81 | return |