Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- ListLines Off
- SetBatchLines -1
- SendMode Input
- #KeyHistory 0
- SetWinDelay, -1
- CoordMode, Mouse, Client
- Splitpath(Path){
- SplitPath,Path,FileName,Dir,Ext,NNE,Drive
- return {FileName:Filename,Dir:Dir,Ext:Ext,NNE:NNE,Drive:Drive}
- }
- SaveFolder = C:\Users\Erica\Documents\My Games\Skyrim Special Edition\Saves\ ;Where saves are at
- SaveIn = C:\Users\Erica\Documents\My Games\Skyrim Special Edition\Saves ;Location to move saves to
- ScreenshotPath = C:\Reprise\Steam\steamapps\common\Skyrim Special Edition\Screenshots ;Reshade screenshot path
- Global Keywords = "AlftandWorld,Blackreach,BlindCliffCaveWorld,BloatedMansGrottoWorld,BrinewaterGrottoWorld,DeepwoodRedoubtWorld,DLC01FalmerValley,DLC1AncestorsGladeWorld,DLC1ForebearsHoldout,DLC1HunterHQWorld,DLC1VampireCastleCourtyard,DLC2SolstheimWorld,EastEmpireWarehouse,EldergleamSanctuaryWorld,FallowstoneCaveWorldEnd,FallowstoneCaveWorldStart,FrostmereCryptWorld,JaphetsFollyWorld,KarthspireRedoubtWorld,KatariahWorld,LabyrinthianMazeWorld,LabyrinthianWorld,LabyrinthianWorld03,LabyrinthianWorld04,MossMotherCavernWorld,RedEagleRedoubtWorld,ShadowgreenCavernWorld,SkuldafnWorld,SouthfringeWorld,Sovngarde,Tamriel" ;DLC01Boneyard
- Random, X, -10, 1800
- Random, Y, -400, 300
- Random, MONumber, -330, 600
- Random, NX, -640, 520
- Random, NY, -200, 160
- f12:: ;Move saves, take screenshot. Main script.
- SetWorkingDir, C:\Users\Erica\Desktop\Mod ;Remove file paths before mod folder
- Loop Files, *.dds, R ;R means recursive.
- storedPath .= A_LoopFileFullPath "`n"`
- path := StrSplit(storedPath,"`n") ;Split long list. storedpath = list of all dds file paths. storedpath.
- Loop { ;path[1] = textures\Clutter\Door.dds. path[2] = textures\Clutter\wow.dds, etc.
- Path%A_Index% := path[A_Index] ;Raw answer now in Path1... etc. "Clutter\Door.dds"
- Dir%A_Index% := Splitpath(Path%A_Index%).dir ;Dir[1] = "Clutter"
- SavePath := SaveFolder Dir%A_Index% ;SavePath = "C:\Users\Desktop\Saves\Clutter". SaveFolder + Dir[1]
- FileName := Splitpath(Path%A_Index%).nne ;FileName1 = "Door" ...etc
- If (Filename = "") ;If no file name, all textures processed. Break loop.
- Break
- Filemove, %SavePath%\*%FileName%*.ess, %SaveIn% ;Move saves. "C:\Users\Desktop\Saves\Clutter\Door.ess" move to SavesIn.
- WinActivate Skyrim ahk_class Skyrim Special Edition ;Tab to Skyrim.
- FileList := "" , Count = 0 ;Count and FileList are reset at start of each loop to prevent old data.
- Loop, %SaveIn%\*.ess ;Asterisk = Wildcard
- Count++ ;Count = # of loops (saves) to load in game. Variable ready.
- Loop Files, %SaveIn%\*.ess ;Numeric sort for save number. List all saves again and sort.
- FileList .= A_LoopFileName "`n"`
- Sort, FileList, P5 N
- msgbox %Filelist%
- sleep 200 ;100
- Loop % Count {
- File := StrSplit(FileList,"`n"),File%A_Index% := File[A_Index]
- Clipboard := "load " Splitpath(File%A_Index%).nne
- Load()
- }
- Filemove, %SaveIn%, %Savepath% ;Saves processed, moving back to original location
- }
- WinActivate ahk_exe explorer.exe
- Exit
- Load() {
- Restart:
- sendinput, {~ down}
- sleep 30
- sendinput, {~ up}
- send {ctrl down}
- sleep 40 ;30
- send {v down}
- sleep 40
- send {ctrl up} {v up} {Enter}
- sleep 25 ;Delay after entering command to load save. Wait for loading screen to start. 25 ok? 15 fail.
- Loop {
- PixelGetColor, color1, 3800, 1079 ;Check pixel color (Pixels at very edge of screen shouldn't be tested.)
- PixelGetColor, color2, 2000, 79
- PixelGetColor, color3, 2500, 1600
- if (color1 !== 0x000000) OR (color2 !== 0x000000) OR (color3 !== 0x000000)
- Break ;If not black, loading screen gone.
- }
- Loop {
- if Clipboard contains %Keywords% ;Determine post-save delay for grass fade in based on save name/keywords
- sleep 1750 ;1750 long delay
- else sleep 450 ;Short delay (interior save or holds). 450 for Boneyard.
- loop {
- if winexist("ahk_class Skyrim Special Edition") { ;Check if Skyrim crashed.
- Break 2
- } else {
- msgbox Skyrim not detected ;Resume after msgbox is removed. Crashed=1 for Restart jump later.
- sleep 3000
- Goto Restart
- }
- }
- }
- SendInput {' down}
- sleep 10
- SendInput {' up}
- }
- f10:: ;Take screenshots for each save game can see currently.
- WinActivate Skyrim ahk_class Skyrim Special Edition
- FileList := "" , Count = 0
- Loop, %SaveIn%\*.ess
- Count++
- Loop Files, %SaveIn%\*.ess
- FileList .= A_LoopFileName "`n"`
- Sort, FileList, P5 N
- sleep 700 ;100? 300 maybe overkill
- Loop % Count {
- File := StrSplit(FileList,"`n"),File%A_Index% := File[A_Index]
- Clipboard := "load " Splitpath(File%A_Index%).nne
- Load()
- }
- WinActivate ahk_exe explorer.exe
- Exit
- f5::
- WinMove, C:\Users\Erica\AppData\Local\ModOrganizer\Skyrim Special Edition\mods\zzz\textures,,,,435,1566
- WinMove, E:\zSkyrimTextureWork\Skyrim PNG Originals,,,,635,1566
- exit
- f1:: ;Renames screenshots in screenshot folder based on clipboard.
- f2:: ;Include se tag.
- storedname := "", Count = 0
- Loop Files, %ScreenshotPath%\*.png
- storedName .= A_LoopFileName "`n"`, path := StrSplit(storedName,"`n") ;Split long list in storedpath.
- Sort, storedName, P5 N
- Loop, %ScreenshotPath%\*.png
- Count++
- Loop % Count {
- Name := path[A_Index]
- If (A_ThisHotkey = "f1") {
- FileMove, %ScreenshotPath%\%Name%, %ScreenshotPath%\%Clipboard%%A_Space%%A_Index%.png
- } Else FileMove, %ScreenshotPath%\%Name%, %ScreenshotPath%\%Clipboard%%A_Space%%A_Index%%A_Space%se.png
- }
- Winactivate ahk_exe ABIC.exe
- sleep 500 ;50
- PixelGetColor, Compression, 890, 246 ;If color is 0xD77800, slider is at 80%
- if (A_ThisHotkey = "f1" ) && (Compression = 0xD77800) ; Told to compress normal and slider is at 80%, so we move to 10%.
- Send {Click 877, 175 Down}{Click 372, 175 Up}
- if (A_ThisHotkey = "f2") && (Compression != 0xD77800) ;Told to compress non-normal. Slider is at 10%, moving to 80%.
- Send {Click 372, 175 Down}{Click 877, 175 Up}
- send {click, 360 312}{click, 116 311}{click, 227 361};Better to clear list here since dunno how long conversion takes.
- sleep 325 ;Is 300 spotty? 350 seems fine?
- send {ctrl down}{a}{ctrl up}{enter}
- sleep 25
- click 329 219
- Exit
- f3:: ;Renames save file to include texture the save tests, based on clipboard.
- Loop Files, %SaveFolder%\*.ess
- {
- StringReplace, New, A_LoopFileName, _00000000_0, _%Clipboard%_00000000_0
- FileMove, %SaveFolder%\%A_LoopFileName%, %SaveFolder%\%new%
- FileDelete, %SaveFolder%\*.skse ;While we're at it, delete any SKSE cosave files.
- }
- Exit
- ]:: ;Brings all folders to front, displaying them.
- WinGet, id, list, ahk_class CabinetWClass
- loop 2 {
- Loop, 10 {
- this_id := id%A_Index%
- WinActivate, ahk_id %this_id%
- }
- }
- Exit
- [:: ;Starts Skyrim work related programs/folders.
- Process, Exist, ModOrganizer.exe
- If ErrorLevel = 0
- run C:\Reprise\MO2\ModOrganizer.exe
- Process, Exist, Notepad++.exe
- If ErrorLevel = 0
- run C:\Program Files\Notepad++\notepad++.exe
- Process, Exist, ABIC.exe
- If ErrorLevel
- Exit
- run C:\Users\Erica\Documents\Archived Documents\Skyrim Modding Folders\ABIC.exe
- run E:\Bethesda Mods\Screenshot Comparison\Normal Stuff
- run C:\Users\Erica\Documents\My Games\Skyrim Special Edition\Saves
- run C:\Reprise\Steam\SteamApps\common\Skyrim Special Edition\Screenshots
- sleep 750 ;1000 is fine, 500 fail? 750 seems fine
- WinMove, E:\Bethesda Mods\Screenshot Comparison\Normal Stuff,,-16+X,380+Y,635,1566
- WinMove, C:\Users\Erica\Documents\My Games\Skyrim Special Edition\Saves,,317+X,380+Y,635,1566
- WinMove, C:\Reprise\Steam\SteamApps\common\Skyrim Special Edition\Screenshots,,750+X,380+Y,635,1566
- run E:\zSkyrimTextureWork\Skyrim SE\textures
- run C:\Users\Erica\AppData\Local\ModOrganizer\Skyrim Special Edition\mods\zzz\textures
- run E:\zSkyrimTextureWork\Skyrim PNG Originals
- sleep 400 ;400 is fine
- WinMove, E:\zSkyrimTextureWork\Skyrim SE\textures,,1083+X,380+Y,635,1566
- WinMove, C:\Users\Erica\AppData\Local\ModOrganizer\Skyrim Special Edition\mods\zzz\textures,,1416+X,380+Y,635,1566
- WinMove, E:\zSkyrimTextureWork\Skyrim PNG Originals,,1749+X,380+Y,635,1566
- sleep 3200
- WinMove, ahk_class Notepad++,,600+NX,160+NY
- Winactivate, ahk_exe ModOrganizer.exe
- WinMove, ahk_exe ModOrganizer.exe,,950+MONumber,250+MONumber
- Exit
- Alt & Escape::
- reload
- Exit
- Alt & V:: ;At 60 nits. Go to 35nits and apply C2 profile.
- send {alt down}{h down}{alt up}{h up} ;Activating ColorControl's hotkey to change brightness to 35nits.
- run colorcpl.exe ;Open Color Management to switch ICC profile
- sleep 70
- winactivate Color Management
- send {tab}{tab}{tab}{up}{down}{down}{tab}{tab}{tab}{enter}
- sleep 40
- process,close,colorcpl.exe
- exit
- Alt & B:: ;At 35 nits. Go to 60nits and apply Cowabunga profile.
- send {alt down}{k down}{alt up}{k up} ;Activating ColorControl's hotkey to change brightness to 60nits.
- run colorcpl.exe ;Open Color Management to switch ICC profile
- sleep 70
- winactivate Color Management
- send {tab}{tab}{tab}{up}{down}{down}{tab}{tab}{tab}{enter}
- sleep 40
- process,close,colorcpl.exe
- exit
- #IfWinActive ahk_class Skyrim Special Edition
- ,:: ;Instant noclip
- NoClip()
- Exit
- NoClip() {
- sendinput, {~ down}
- sleep 30
- sendinput, {~ up}
- sendevent {Click, 200 100 0}{click}{click}
- sendevent, tcl
- sleep 10
- sendinput, {enter down}{enter up}
- sleep 10
- sendinput, {~ down}
- sleep 30
- sendinput, {~ up}
- }
- DllCall("QueryPerformanceFrequency", "Int64*", freq)
- DllCall("QueryPerformanceCounter", "Int64*", CounterBefore)
- DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
- MsgBox % "Elapsed QPC time is " . (CounterAfter - CounterBefore) / freq * 1000 " ms"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement