added Rumble RTMP input, gui additions

This commit is contained in:
2024-05-11 00:58:30 -04:00
parent 44b343a0a7
commit a73eaf0e17
2 changed files with 115 additions and 13 deletions

View File

@@ -0,0 +1,73 @@
RumbleSetRTMP:
;------------------------------------------------
CurrentSite := "Rumble Studio"
Message = Inputting Custom RTMP Settings into Rumble Studio
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Status := NavigateFromBaseURLTo("https://studio.rumble.com/settings/connections")
if(Status)
Return
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
CheckForAlerts()
IniRead, LocalsRTMPURL, %PostStatusesFilepath%, Livestream,LocalsRTMPURL, %A_Space%
IniRead, LocalsRTMPKey, %PostStatusesFilepath%, Livestream,LocalsRTMPKey, %A_Space%
if(LocalsRTMPURL = ""){
Message = Skipping. No LocalsRTMPURL in Status.ini file
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Loop, 10 {
; IndexPlusOne := A_index + 1
IndexMinusOne := A_index - 1
Xpath = (//div[@class='flex shrink-0 items-center gap-x-4'])[%A_index%]
XpathCheckbox = (//img[@alt='More options'])[%IndexMinusOne%]
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
; Msgbox % "SecondaryPlatformCheckboxName: " SecondaryPlatformCheckboxName
if(SecondaryPlatformCheckboxName = "LOCALS RTMP USE"){
Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click into 3 dot menu for -LOCALS RTMP USE-
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
; click Edit RTMP in the popup menu
Xpath = (//span[normalize-space()='Edit RTMP'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click into 3 dot menu for -LOCALS RTMP USE-
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
; Input New RTMP Info
XpathRTMP = (//input[@placeholder='Enter the RTMP URL'])[1]
XpathStreamkey = (//input[@placeholder='Enter the stream key'])[1]
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathRTMP,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsRTMPURL)
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathStreamkey,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsRTMPKey)
; click save button
Xpath = (//button[@class='rounded-full px-6 py-2 bg-primary/50 pointer-events-none'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to Click Save Button
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
}