added auto update checks option and functionality
This commit is contained in:
@@ -174,6 +174,29 @@ if(Status){
|
||||
|
||||
; Select each Secondary Platform checkbox
|
||||
; ------------------------------------------------
|
||||
IniRead, RumbleSecondaryPlatformsList, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatforms, %A_Space%
|
||||
|
||||
if(RumbleSecondaryPlatformsList = ""){
|
||||
; if variable is empty, get all items in the list and write them to .ini file
|
||||
Loop, 10 {
|
||||
|
||||
IndexPlusOne := A_index + 1
|
||||
Xpath = (//div[@class='flex shrink-0 items-center gap-x-4'])[%A_index%]
|
||||
XpathCheckbox = (//div[@class='relative shrink-0'])[%IndexPlusOne%]
|
||||
|
||||
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
||||
|
||||
RumbleSecondaryPlatformsList .= SecondaryPlatformCheckboxName . "--"
|
||||
|
||||
if(SecondaryPlatformCheckboxName = "Add new destination" OR SecondaryPlatformCheckboxName = ""){
|
||||
Break
|
||||
}
|
||||
}
|
||||
IniWrite, %RumbleSecondaryPlatformsList%, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatformsList
|
||||
MsgBox 0x40, Rumble Secondary Platforms List Generated, Rumble Secondary Platforms List was genearted and all the available options were added to it.`n`nPlease edit the settings.ini file and remove any platforms you do not need selected from the follwoing KEY:`n`n[%ScriptSettingsSection%]`nRumbleSecondaryPlatformsList=
|
||||
}
|
||||
|
||||
|
||||
Loop, 10 {
|
||||
|
||||
IndexPlusOne := A_index + 1
|
||||
@@ -187,6 +210,9 @@ Loop, 10 {
|
||||
Break
|
||||
}
|
||||
|
||||
if(!InStr(RumbleSecondaryPlatformsList,SecondaryPlatformCheckboxName))
|
||||
Continue
|
||||
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
Message = Failed to check off the checkbox for: %SecondaryPlatformCheckboxName%
|
||||
@@ -261,11 +287,6 @@ Loop, 5 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Xpath = (//h2[@class='video-title'])[1]
|
||||
|
||||
RumbleURLSlug := GetHTMLValueFromXpathOuterHTML(XPATH, "href")
|
||||
|
||||
Reference in New Issue
Block a user