Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Arguments/Parameters #219

Open
jacobmix opened this issue Jan 9, 2025 · 2 comments
Open

[Feature] Arguments/Parameters #219

jacobmix opened this issue Jan 9, 2025 · 2 comments

Comments

@jacobmix
Copy link

jacobmix commented Jan 9, 2025

Having parameters to open PopTracker into a specific pack instantly, try to connect to an AP server, even resize the window.
Using a shortcut or terminal/command to open what you want, how you want. All from a simple icon on your desktop or such.
Example: "poptracker.exe" -PACK "GameOfGames2" -TRACKER "Map Tracker" -APURL "DotOfComs.com:1337" -APPASS "PASSofWORD" -WINW "1065" -WINH "969"
Think it would be neat. Maybe a way to lock or set min/max window size too, window position or boarder, open broadcast, ect.
But that would be just extra functionality. Base implementation should be helpful enough.

@black-sliver
Copy link
Owner

There is already --load-pack <uid> and --pack-variant <variant>.

Auto-connecting to an AP game/slot is kinda hard, but this is already the third request, so probably soon ™️ .

Window size is stored in / restored from the save state, however that is broken in 0.30.0 and will be fixed in 0.30.1, coming soon (tomorrow? This weekend for sure.). I feel like any other scripted window manipulation should be the job of external programs.

@jacobmix
Copy link
Author

Any documentation mentioning this? I thought this might already be a feature, but couldn't find any info on it.
Even when booting from cmd i'm not able to run any kind of help command.

Had a tracker pack that would changed size when you connected to AP with move rando on if it didn't have enough height for the new info added, so just wanted to set the size right so it wouldn't change after connecting. Was expecting to use AHK for that anyway. Just thought to ask if maybe that was included built in.
Here's the AHK script i ended up with btw:

#Requires AutoHotkey >=2.0
;Sleep(3000) 																														; Waits 3 seconds.
;WinGetPos(&X, &Y, &W, &H, "A", , ,) 																								; WinGetPos(&OutX, &OutY, &OutWidth, &OutHeight, WinTitle, WinText, ExcludeTitle, ExcludeText)
;MsgBox("The active window is '" WinGetTitle("A", , ,) "' which is " W " wide, " H " tall, and positioned at X:" X ", Y:" Y ".", ,) ; MsgBox(Text, Title, Options) WinGetTitle(WinTitle, WinText, ExcludeTitle, ExcludeText) "A" is active window.

Run('"<...>\poptracker\poptracker.exe" --load-pack "Jak and Daxter Test" --pack-variant "Map Tracker"', , ,) 					; Run(Target , WorkingDir, Options, &OutputVarPID) "package_uid" for "load-pack" can be found in the manifest.json of the PopTracker pack.
if WinWait("PopTracker - Jak and Daxter, The Precursor Legacy-Map Tracker", , 5, ,) { 												; WinWait(WinTitle, WinText, Timeout, ExcludeTitle, ExcludeText)
	WinRestore(,,,) 																												; WinRestore(WinTitle, WinText, ExcludeTitle, ExcludeText) If each of these is blank or omitted, the Last Found Window will be used.
	WinMove(, , 1065, 969, , , ,) 																									; WinMove(X, Y, Width, Height, WinTitle, WinText, ExcludeTitle, ExcludeText)
	;WinSetStyle("-0xC00000", , , ,) 																								; WinSetStyle(Value , WinTitle, WinText, ExcludeTitle, ExcludeText) "-0xC00000" removes the window's title bar (WS_CAPTION).
} else {
	MsgBox "WinWait timed out." 
}
ExitApp

Anyone is free to use this. Just make sure to change "<...>\poptracker\poptracker.exe".
Also included script to get window title/info at the top. Just copy to new script, and remove the starting ";"s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants