Last active
November 24, 2021 23:41
-
-
Save DarsoX/a2d0e3a5d990caeb473380bad3e33f19 to your computer and use it in GitHub Desktop.
garant_wish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $logLocation = "%userprofile%\AppData\LocalLow\miHoYo\Genshin Impact\output_log.txt"; | |
| $path = [System.Environment]::ExpandEnvironmentVariables($logLocation); | |
| if (-Not [System.IO.File]::Exists($path)) { | |
| Write-Host "Cannot find the log file! Make sure to open the wish history first!" -ForegroundColor Red | |
| exit | |
| } | |
| $logs = Get-Content -Path $path | |
| $match = $logs -match "^OnGetWebViewPageFinish.*log$" | |
| if (-Not $match) { | |
| Write-Host "Cannot find the wish history url! Make sure to open the wish history first!" -ForegroundColor Red | |
| exit | |
| } | |
| [string] $wishHistoryUrl = $match -replace 'OnGetWebViewPageFinish:', '' | |
| Write-Host $wishHistoryUrl | |
| Set-Clipboard -Value $wishHistoryUrl | |
| Write-Host 'CKOPIROBAHO! Return to Genshin Impact Bot and activate the link.' -ForegroundColor Magenta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment