Last active
March 8, 2025 12:46
-
-
Save iAnanich/078f272a125c8cb85480d1a139cc31ce to your computer and use it in GitHub Desktop.
Elite Dangerous: PowerPlay systems scout AutoHotKey script
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
#Requires AutoHotkey v2.0 | |
; = = = Introduction: = = = | |
; To begin: open GalMap, focus on the search bar. | |
; Previously make sure that system's will display Powerplay info. | |
; Script will begin working when you it Ctrl+F6 | |
; Edit list of system names below (follow the format - systems enclosed in double quotes " and comma , between them) | |
; One of the ways to get systems to monitor is Spansh, so here's example: https://spansh.co.uk/systems/search/CB29DC2A-F8E7-11EF-ABF7-A8FA2C4A4B3A/1 | |
; It's up to you to decide which systems to get info about and how to act on it. | |
; == == == ~~~ ~~~ ~~~ == == == | |
; Support me: | |
; Leave a tip on Ko-Fi: https://ko-fi.com/iananich/tip | |
; Donate in crypto: | |
; ETH 0xaD64CDFb54101EEFd822bd2E65BEa736Db914ed0 | |
; BTC 1657cDbmW4tuVXHtUzjPjv2qziCWqxL67B | |
; == == == ~~~ ~~~ ~~~ == == == | |
; ------------------------- | |
; Configuration Parameters | |
; ------------------------- | |
; list of system names | |
systemNames := [ | |
; For intends of showing example... | |
; Start with lore systems | |
"Sol", ; is not invovled in PowerPlay | |
; PowerPlay headquarters | |
"Cubeo", | |
"Harma", | |
"Kamadhenu", | |
"Eotienses", | |
"Gateway", | |
"Rhea", | |
"Nanomam", | |
"Lembava", | |
"Tionisla", | |
"Polevnic", | |
"Clayakarma", | |
"Synteini", | |
; --- | |
; example search on Spansh: https://spansh.co.uk/systems/search/CB29DC2A-F8E7-11EF-ABF7-A8FA2C4A4B3A/1 | |
; some stronghold systems for example | |
"Inti", | |
"Aeternitas", | |
"Sol", | |
"Amenta", | |
"Achenar", | |
"Omicron Gruis", | |
"Buricasses", | |
"Lugh", | |
"Alioth", | |
"Sekh", | |
"Eta-1 Pictoris", | |
"BD+49 1280", | |
"Rhea", | |
"Synteini", | |
"Miquit", | |
"LTT 1289", | |
"Nunus", | |
"Zhao", | |
"LHS 142", | |
"Laksak", | |
"Facece", | |
"Scirth", | |
"41 Lambda Hydrae", | |
"Serktomes", | |
"Teaka", | |
] | |
beepEnabled := true ; Toggle: if true, beep when a popup appears. | |
skipPopup := false ; Toggle: if true, skip the interactive popup and use timeout. | |
takeScreenshot := false ; Toggle: if true, will take screenshot of each encountered system. | |
searchWait := 1000 ; Time (in ms) to wait for the GalMap to search for system. | |
selectedTimeout := 2000 ; Time (in ms) to wait instead of popup if skipPopup is enabled. | |
enterKeyDelay := 50 ; ms delay to simulate key-up after enter. | |
popupWidth := 300 | |
global popupDone := false ; used to signal when GUI popup is closed | |
; ------------------------- | |
; Wait for Activation (Ctrl+F6) | |
; When Ctrl+F6 is pressed, run the main routine. | |
; ------------------------- | |
^F6:: { | |
Main() | |
return | |
} | |
; ------------------------- | |
; Main Routine | |
; ------------------------- | |
Main() { | |
global systemNames, beepEnabled, skipPopup, selectedTimeout, enterKeyDelay, popupWidth, popupDone | |
totalNames := systemNames.Length | |
enteredCount := 0 | |
for index, currentName in systemNames { | |
; --- Type the name --- | |
SendText(currentName) | |
Sleep(searchWait) ; wait for GalMap to find the system by name | |
SendInput("{Down down}") | |
Sleep(enterKeyDelay) | |
SendInput("{Down up}") | |
Sleep(50) ; minor pause between keys | |
SendInput("{Space down}") | |
Sleep(enterKeyDelay) | |
SendInput("{Space up}") | |
enteredCount++ | |
if takeScreenshot | |
SendInput("{F12 down}") | |
Sleep(enterKeyDelay) | |
SendInput("{F12 up}") | |
; --- Show Popup or wait --- | |
if skipPopup { | |
Sleep selectedTimeout | |
} | |
else { | |
if beepEnabled | |
SoundBeep(900, 200) | |
nextName := (index < totalNames) ? systemNames[index + 1] : "<none>" | |
lastName := (index > 1) ? systemNames[index - 1] : "<none>" | |
popupText := Format("Current system: {1}`n`nNext system: {2}`nPrevious system: {3}`nSystems scouted: {4} out of {5}`n`nDouble click 'Stop' to interrupt.`nPress Proceed to continue...", currentName, nextName, lastName, enteredCount, totalNames) | |
; Reset the signal. | |
popupDone := false | |
; Create the GUI. | |
guiObj := Gui("+AlwaysOnTop") | |
guiObj.Add("Text", "x10 y10 w" popupWidth " h100", popupText) | |
guiObj.AddButton("x+20 y+10", "Proceed").OnEvent("Click", ProceedButton) | |
guiObj.AddButton("x+20 y+10", "Stop").OnEvent("DoubleClick", StopButton) | |
guiObj.Show("AutoSize Center") | |
; Wait until the user clicks the Proceed button. | |
while !popupDone { | |
Sleep(100) | |
} | |
guiObj.Destroy() | |
} | |
; Move map circle to reset focus (from PP info) | |
SendInput("{W down}") | |
Sleep(enterKeyDelay) | |
SendInput("{W up}") | |
; Repeat, since often needs arrowup twice | |
Sleep(enterKeyDelay) | |
SendInput("{Left down}") | |
Sleep(enterKeyDelay) | |
SendInput("{Left up}") | |
; Back to search field | |
Sleep(enterKeyDelay) | |
SendInput("{Right down}") | |
Sleep(enterKeyDelay) | |
SendInput("{Right up}") | |
; clean search box: 2 consecutive Space | |
Sleep(enterKeyDelay) | |
SendInput("{Space down}") | |
Sleep(enterKeyDelay) | |
SendInput("{Space up}") | |
Sleep(enterKeyDelay) | |
SendInput("{Space down}") | |
Sleep(enterKeyDelay) | |
SendInput("{Space up}") | |
} | |
; --- All names processed. Show final popup --- | |
if !skipPopup { | |
finalText := Format("All done! {1} names were entered.", enteredCount) | |
finalGui := Gui("+AlwaysOnTop") | |
finalGui.Add("Text", "x10 y10", finalText) | |
finalGui.AddButton("x+20 y+10", "Finish").OnEvent("Click", StopButton) | |
finalGui.Show("AutoSize Center") | |
; Wait until the user clicks the Proceed button. | |
while !popupDone { | |
Sleep 100 | |
} | |
finalGui.Destroy() | |
} | |
else { | |
MsgBox("All done! " enteredCount " names were entered.") | |
} | |
ExitApp() | |
} | |
; ------------------------- | |
; GUI Button Handlers | |
; ------------------------- | |
ProceedButton(*) { | |
global popupDone | |
popupDone := true | |
} | |
StopButton(*) { | |
ExitApp() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment