Compare commits

..

No commits in common. 'main' and '3.52' have entirely different histories.
main ... 3.52

@ -25,7 +25,7 @@ VersionIniFP = %A_ScriptDir%\Version.ini
; Generate a new errorlog text file each run
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
ErrorLogFilepath = %A_ScriptDir%\Lib\ErrorLogging\Compiler_%TodayDate%.txt
ErrorLogTextFile = %A_ScriptDir%\Lib\ErrorLogging\Compiler_%TodayDate%.txt
; Read Credential token from Windows Credential Manager using WindowCredentialManager.ahk
@ -83,7 +83,7 @@ if(!FileExist(icopath)){
; run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
Command = "C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%"
Results := RunCMD(Command)
LogToErrorLogFile(Results, ErrorLogFilepath)
LogToErrorLogFile(Results, ErrorLogTextFile)
if(!InStr(Results, "Successfully")){
Msgbox, Error, Compilation failed with the following error:`n`n%Results%
@ -104,11 +104,10 @@ ReleaseTag := VersionNumber
Command = Powershell "%CreateReleasePS1Filepath%" "%CreateReleaseAPIURL%" "%ReleaseName%" "%ReleaseTag%" "'%ReleaseBody%'"
Message = PowerShell Command to Create Release:`n%Command%
LogToErrorLogFile(Message, ErrorLogFilepath)
LogToErrorLogFile(Message, ErrorLogTextFile)
Results := RunCMD(Command)
Message = API Returned:`n%Results%
LogToErrorLogFile(Message, ErrorLogFilepath)
LogToErrorLogFile(Results, ErrorLogTextFile)
; Pull out the release ID Number, needed for attaching a file to the release
@ -117,15 +116,8 @@ SplitText2 = `;
ReleaseID := StrSplit(Results, SplitText)[2]
ReleaseID := StrSplit(ReleaseID, SplitText2)[1]
if(ReleaseID = ""){
Message = Failed to Grab Release ID`nPlease See Errorlog for Details:`n%ErrorLogFilepath%
LogToErrorLogFile(Message, ErrorLogFilepath)
Msgbox, %Message%
Return
}
Message = ReleaseID: %ReleaseID%
LogToErrorLogFile(Message, ErrorLogFilepath)
LogToErrorLogFile(Message, ErrorLogTextFile)
@ -137,11 +129,10 @@ AttachAssetToReleaseAPIURL = %AttachAssetToReleaseAPIURL%/%ReleaseID%/assets
; Strings with spaces in them need to be surrounted by a single quote and double quote, eg: "'spaced string'"
Command = Powershell "%AttachAssetToReleasePS1Filepath%" "%AttachAssetToReleaseAPIURL%" "%GiteaToken%" "'%ExeProgramName%'" "'%Exefilepath%'"
LogToErrorLogFile(Command, ErrorLogFilepath)
LogToErrorLogFile(Command, ErrorLogTextFile)
Results := RunCMD(Command)
Message = API Returned: %Results%
LogToErrorLogFile(Message, ErrorLogFilepath)
LogToErrorLogFile(Results, ErrorLogTextFile)
ExitApp
@ -160,5 +151,5 @@ ExitApp
;---FUNCTIONS-----------------------------------------------------------------------
LogToErrorLogFile(Text, TextFileFilepath){
FileAppend, `n%Text%`n, %TextFileFilepath%
FileAppend, %Text%`n, %TextFileFilepath%
}

@ -615,13 +615,6 @@ UpdateScript()
; @todo: Save any changes made to the script before installing update
Return
PostToDiscordAndTelegram:
gosub, PostToDiscord
gosub, PostToTelegram
Return
/*
*/

@ -461,8 +461,8 @@ Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButto
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gRetryUpload, Try Failed Again
Gui, Add, Button, x%MarginSize% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToDiscordAndTelegram vPostToDiscordTelegramButton, Post to Discord/Telegram
; Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToTelegram vPostToTelegramButton, Post to Telegram
Gui, Add, Button, x%MarginSize% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToDiscord vPostToDiscordButton, Post to Discord
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToTelegram vPostToTelegramButton, Post to Telegram
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gStartSocialMediaPoster, Start Social Media Poster
; Row 3

@ -86,9 +86,7 @@ if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(VideoLinks)) > 2000){
else,
DiscordVideoDescription := VideoDescription
Message = VideoLinks variable contents:
Message := "**" . VideoTitle . "**" . "`n" . DiscordVideoDescription . "`n`n" . VideoLinks
Message := "**" . VideoTitle . "**" . "`n" . VideoLinks . "`n" . DiscordVideoDescription
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
Message = API Response:`n%Status%
@ -96,7 +94,7 @@ SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
GuiControl,, PostToDiscordTelegramButton, Discord - Posted Successfully
GuiControl,, PostToDiscordButton, Discord - Posted Successfully
sleep, 2000
ToolTip

@ -167,7 +167,7 @@ else, {
Message = Video Links Posted to Telegram Successfully
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
GuiControl,, PostToDiscordTelegramButton, Telegram - Posted Successfully
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
ToolTip
CurrentSite :=

@ -124,32 +124,51 @@ Loop, 5 { ; Attempt to input video description a couple of times
Xpath = (//input[@placeholder='- Primary category -'])[1]
try, driver.FindElementByXPath(Xpath).SendKeys("Podcasts").SendKeys(driver.Keys.ENTER)
/*
; Skip the channel selection for now
; Rumble now has a "Set this channel as default" checkbox
Message = Selecting Channel
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
; Get list of channels and select the second one in the list
; First is the user profile
; Second is the Normal Channel
Xpath = (//fieldset[@id='channelId'])[1]
Try Channels := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
UploadChannelName := StrSplit(Channels, "`n")[2]
; @todo replace with regex
js = return document.querySelector("#channelId").innerHTML;
try, ChannelIDNumber := driver.executeScript(js)
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
ChannelIDNumber := StrSplit(ChannelIDNumber, "option value=")
ChannelIDNumber := ChannelIDNumber[3]
SingleQuote = "
ChannelIDNumber := StrSplit(ChannelIDNumber, "data-private")
ChannelIDNumber := ChannelIDNumber[1]
ChannelIDNumber := StrReplace(ChannelIDNumber, SingleQuote, "")
ChannelIDNumber := StrReplace(ChannelIDNumber, " ", "")
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
if(!UploadChannelName){
Message = Failed to Grab Upload Channel Name
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
; js = return document.querySelector("#channelId").value;
; try, ChannelIDNumber := driver.executeScript(js)
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
if(ChannelIDNumber = ""){
Message = ChannelIDNumber is blank. Unable to select Upload Channel
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
SaveDriverURLOFErrorPage()
Return
}
Xpath = (//label[normalize-space()='%UploadChannelName%'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
; //option[@value='762377'] ; freedomain
Xpath = //option[@value='%ChannelIDNumber%']
try driver.FindElementByXPath(Xpath).click()
catch e {
Message = Failed to click on Channel using %ChannelIDNumber%.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
SaveDriverURLOFErrorPage()
Return
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
}
*/
; Input Tags
Message = Inputting Tags

@ -1,3 +1,3 @@
[Video-Uploader]
Version=3.53
Version=3.48
Name=Freedomain Video Uploader
Loading…
Cancel
Save