major code cleanup organization and restructuring

main
Yuriy 8 months ago
parent d546628d8a
commit d01ce11347

@ -6,13 +6,20 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, ToolTip, Screen
CoordMode, Mouse, Screen
FileEncoding, UTF-8-RAW ; Needed for special symbols that are used in video descritions
; Only Set tool tray icon if this is the source .ahk script.
; The .exe has the icon compiled into it
if(InStr(A_ScriptFullPath, ".ahk")){
try Menu, Tray, Icon, %A_ScriptDir%\Assets\FreedomainVideo.ico
}
; Parameter passed in to script
; ------------------------------------------------
PassedParameter = %1%
; Add menus to the toolbar icon
; Customize the Toolbar Icon Menu
; ------------------------------------------------
Menu, tray, NoStandard
Menu, Tray, Add, Exit, KillScript
@ -23,20 +30,12 @@ Menu, Tray, Add, Open New Project, ReloadScript
Menu, Tray, Add, Restart with Last Project, RetryUpload
Menu, Tray, Default, Restart with Last Project
global ScriptNameav
global ScriptVersion
global FullScriptName
; Track how long sections of code take to run
UStartTime := A_TickCount ; start time
; Included Files - These have to be included at the top for the Global variables to get registered early?
; Included FIles and Libraries
; ------------------------------------------------
; These have to be included at the top for the Global variables to get registered early
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\General-Functions.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Selenium-Functions.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Chrome-Functions.ahk
@ -51,6 +50,9 @@ UStartTime := A_TickCount ; start time
;---Global Variables---
;------------------------------------------------
global ScriptNameav
global ScriptVersion
global FullScriptName
global LBRYResolveAPICommand
global LBRYPermanentURL
global VideoTitle
@ -107,17 +109,14 @@ FileCreateDir, %ErrorLoggingFolder%
global SettingsIniFilepath
SettingsIniFilepath := A_ScriptDir . "\Settings.ini"
global ChangelogIniFilepath
ChangelogIniFilepath := A_ScriptDir . "\Lib\FreedomScriptsChangelogINI"
global ScriptSettingsSection
ScriptSettingsSection := "VideoUploader"
FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,Video-Uploader, Version, 0.0
IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,Video-Uploader, Name, "Video Uploader"
ScriptName = Freedomain Video Uploader
FullScriptName := ScriptName . " - " . ScriptVersion
@ -482,341 +481,9 @@ if(PassedParameter = "ShowResults"){
}
;---GUI Variables---
;------------------------------------------------
GuiHeight = 800
GuiWidth = 1366
GuiFontSize = 10
ButtonHeights := 30
MarginSpace := 10
MarginSpaceDoubled := MarginSpace * 2
MarginSpaceTripled := MarginSpace * 3
EditBoxWidths := (GuiWidth / 100) * 60
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSpace * 3)
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSpace
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSpaceDoubled
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSpace / 2)
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSpace * 2)
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
DescriptionCharCountXPos := EditBoxWidths - 40
PageTwoXStartPos := EditBoxWidths + 50
CopyButtonWidths := 150
ResultEditBoxXPos := CopyButtonWidths + MarginSpace + 5
ResultEditBoxWidths := EditBoxWidths - CopyButtonWidths
ResultEditBoxHalfWidths := (ResultEditBoxWidths / 2) - (MarginSpace /2)
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidths / 4)
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
ResultEditBoxThirdsWidths := (ResultEditBoxWidths / 3) - (MarginSpace /3)
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
ErrorLogEditBoxXPos := ResultEditBoxWidths + CopyButtonWidths + 30
ErrorLogEditBoxHeight := GuiHeight - (MarginSpace * 20) - (ButtonHeights * 2)
ErrorLogEditBoxWidth := GuiWidth - ErrorLogEditBoxXPos - (MarginSpace * 12)
ButtonWidths := 150
ButtonXPos := GuiWidth - ButtonWidths - 15
SubmitButtonYLocation := GuiHeight - 50
SubmitButtonXLocation := GuiWidth - 90
CancelButtonXLocation := GuiWidth - 180
EditBoxHeight := 25
ThumbnailPreviewWidth := 300
PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
; Size of Description Edit Box and the location of the checkboxes underneath them
VideoDescriptionEditBoxHeight = 100
CheckboxesStartYPos := 630
FilePathEditBoxWidths := EditBoxWidths - MarginSpace - 70
SelectFileButtonWidths := 30
ButtonStartYPos := CheckboxesStartYPos + 10
MarginSquared := MarginSpace * 2
if(DevMode){
MainButtonHeight := 30
SecondaryButtonHeights := 30
}
else, {
MainButtonHeight := 30
SecondaryButtonHeights := 35
}
; -------------------------------GUI-------------------------------
Gui, Font, s%GuiFontSize%
Gui, Margin, %MarginSpace%, %MarginSpace%
; Video Title
Gui, Font, Bold
Gui, Add, Text,, Show Title
Gui, Add, Text, x%ColumnOneHalfWidthXPos% yp+0,Odysee URL Slug
Gui, Add, Text, x%PodcastNumberTextXPos% yp+0,Podcast #
Gui, Font, Normal
Gui, Add, Edit, y+5 x%MarginSpace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
Gui, Add, Edit, yp+0 x+%Marginspace% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
Gui, Add, Edit, yp+0 x+%Marginspace% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
; LBRY URL
Gui, Font, Bold
Gui, Add, Text, x%Marginspace%,Video Tags (Comma Seperated)
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
Gui, Font, Normal
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
; Video Description
Gui, Font, Bold
if(NoOriginalVideoDescription)
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
else,
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
if(TestingMode)
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
if(DevMode)
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
Gui, Font, Normal
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
gui, font, s8
Gui, font, Bold
if(DescriptionCharCount > 3000){
Gui, Add, Edit,cRed w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
}
else,
Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
Gui, Font, Normal
Gui, Add,Text, yp+3 xp-310, (Platform Char. Limits: DM+Bitchute = 3K, Odysee,Brighteon = 5K)
Gui, Font, s%GuiFontSize%
Gui, font, Bold
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
; Video Filepath
Gui, Font, Bold
Gui, Add, Text,xp+5 yp+15,Video Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
; Video Thumbnail Filepath
Gui, Font, Bold
if(NoOriginalVideoThumbFilepath)
Gui, Add, Text, x%MarginSquared% CRed y+15,Video Thumbnail Filepath
else,
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoThumbFilepath,%VideoThumbFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
; WAV Audio File Filepath
Gui, Font, Bold
if(WavAudioFilepath = "")
Gui, Add, Text,cRed x%MarginSquared% y+15,WAV Filepath
else, { ; change text depending on if WAV or FLAC file
if(InStr(WavFilepath, ".flac"))
Gui, Add, Text,x%MarginSquared% y+15,FLAC Filepath
else,
Gui, Add, Text,x%MarginSquared% y+15,WAV Filepath
}
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vWavAudioFilepath,%WavAudioFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectWAVFilepath, Select
Gui, Font, Bold
if(MP3AudioFilepath = "")
Gui, Add, Text,cRed x%MarginSquared% y+15,Podcast MP3 Filepath
else,
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vMP3AudioFilepath,%MP3AudioFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectMP3Filepath, Select
; Submit Button
Gui, Font, s%GuiFontSize%
gui, Font, Bold
; if(DevMode)
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Close
; else,
; Script Update Button
if(UpdateAvailable){
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Update Available!
; GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
}
else, {
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Up-to-Date
; Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% vUpdateAvailable hwndIcon, Script is Up-to-Date
; GuiButtonIcon(Icon, "shell32.dll", 239, "s20 a1 r2")
}
; Gui, Font, s20
; Gui, Font, Bold
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
Gui, Font, s%GuiFontSize%
; Chrome Update Button
if(ChromeUpdateAvailable){
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available!
}
else, {
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Up-to-Date
}
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Exit
; GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
if(DevMode)
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
else,
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder, Open Project Folder
if(DevMode){
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
}
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
LineSplitXPosition := PageTwoXStartPos - ( MarginSpace * 2)
gui, add, text, x%LineSplitXPosition% y20 h500 0x11 ; 0x11 is a "line" ; refer to here: https://autohotkey.com/board/topic/50910-draw-line-gui/
; Thumbnail Preview
Gui, Font, Normal
gui, Font, s4
; Miscellaneous Settings
DevModToggleButton := PageTwoXStartPos + 160
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
Gui, Add, Button, x+5 y5 w50 h10 gToggleTestingMode, Testing Mode
Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
; Settings Section
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
; -------------------------------PLATFORMS-------------------------------
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
; Msgbox % "LocalsURL: " LocalsURL
; if(VideoFileSizeInMB < 1792)
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus% gUpdateVars, BitChute
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
; msgbox, checking grab url
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus% gUpdateVars, Locals (Grab URL)
LocalsGrabURL := 1
Locals := 0
}
else, {
; msgbox, checking locals
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals
LocalsGrabURL := 0
Locals := 1
}
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
if(VideoFileSizeInMB < 50)
Gui, Add, Checkbox, vTelegram x+%MarginSpaceTripled% yp+0 Checked%TelegramCheckStatus% gUpdateVars, Telegram (>50 MB)
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeAudioThumb Checked%OdyseeAudioThumbCheckStatus%, Thumbnail
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
if(VideoTotalBitrate > 300000)
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
else,{
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
}
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
; Gui, Font, s12
gui, Font, Bold
Gui, Add, GroupBox, r6.5 y+%MarginSpaceTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
gui, Font, Normal
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
gui, Font, Normal
gui, font, s7
Gui, Add, StatusBar,Center, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
; Show GUI to the user
Gui, +Resize +MaximizeBox
if(XPosition and YPosition)
Gui, Show, x%XPosition% y%YPosition%, %FullScriptName% - Upload Settings - %BodyTextFilePath%
else,
Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
ControlFocus, Edit4, %FullScriptName%
ToolTip
; Main GUI Window
; ------------------------------------------------
#include %A_scriptDir%\Modules\GUI-Main-Window.ahk
; Write current project to ini file for easy reloading
@ -827,14 +494,9 @@ URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
;---Check for Updates---
;------------------------------------------------
; msgbox, checking for updates
if(AutoUpdateCheck AND !UpdateAvailable){
Message = Checking for Updates
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; DevModeMsgBox("checking for updates")
; msgbox, checkin for update
; DevModeMsgBox(GitReleasesAPIURL)
; UpdateAvailable :=
if(CheckForUpdates(GitReleasesAPIURL))
GuiControl,,UpdateAvailable, Uploader Update Available!
@ -846,7 +508,6 @@ if(AutoUpdateCheck AND !UpdateAvailable){
}
}
; calculate run time and convert to seconds
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
@ -988,37 +649,9 @@ if(!status){
Return
/*
*/
; now defunt, safe to remove
CreateDescriptionForVideosPosting:
; msgbox, here
Gui, VideoDescriptionTrimmer:New,
Gui, Font, s%GuiFontSize%
Gui, Add, Text,, Discord and Telegram have a maximum API post length of 2000 Characters `nwhich the curent description exceeds.`nPlease Trim down the description and then click submit.
Gui, Font, s%GuiFontSize%
Gui, Add, Edit, w800 h500 gUpdateVars vVideoDescriptionForVideosChannel, %VideoDescription%
Gui, Add, Button, gSubmitDescriptionForVideosChannel, Submit
gui, Show,w820, Video Description Trimmer
; msgbox
Return
SubmitDescriptionForVideosChannel:
Gui, Submit
; msgbox, submitted
if(CurrentSocialMediaPosting = "Discord")
Goto, SubmitDescriptionForDiscordVideosChannel
if(CurrentSocialMediaPosting = "Telegram")
Goto, SubmitDescriptionForTelegramVideosChannel
if(CurrentSocialMediaPosting = "Telegram Video")
goto, SubmitDescriptionForTelegramVideoUpload
Return
CreateDescriptionForSocialMedia(){
@ -1171,13 +804,16 @@ JSVideoDescription := FormatTextToJSText(VideoDescription)
; -------------------------------/Log Info To Text-------------------------------
; Cleanup Tag Formatting
; ------------------------------------------------
; @todo: note: it would be better to replace accented chars w/ their pure latin equivalents but that seems a bit
; beyond the scope of this change. here's a link talking about how to do that tho
; https://www.autohotkey.com/boards/viewtopic.php?t=61626
; Create an array out of the keywords to be used in different places
VideoTagsArray := []
PodcastTagsArray := []
ArrayOfVideoTags := []
ArrayOfPodcastTags := []
; VIDEO Tags
For index, val in StrSplit(VideoTags, ",") {
@ -1186,7 +822,7 @@ For index, val in StrSplit(VideoTags, ",") {
; and remove any chars that are not a letter, number, or space (i = case-insensitive)
val := RegexReplace(val, "i)[^a-z0-9 ]", "")
VideoTagsArray.InsertAt(index, val)
ArrayOfVideoTags.InsertAt(index, val)
}
; PODCAST Tags
@ -1196,32 +832,32 @@ For index, val in StrSplit(PodcastTags, ",") {
; and remove any chars that are not a letter, number, or space (i = case-insensitive)
val := RegexReplace(val, "i)[^a-z0-9 ]", "")
PodcastTagsArray.InsertAt(index, val)
ArrayOfPodcastTags.InsertAt(index, val)
}
; update VideoTags with sanitized keywords list
VideoTags := Join(",", VideoTagsArray*)
VideoTags := Join(",", ArrayOfVideoTags*)
; update PodcastTags with sanitized keywords list
PodcastTags := Join(",", PodcastTagsArray*)
PodcastTags := Join(",", ArrayOfPodcastTags*)
; // Cleanup Tag Formatting
; ------------------------------------------------
; Call each submodule one by one
; if errors occur then an upload for that site will be stopped and the next upload will then proceed
if(Telegram)
gosub, TelegramVideoUpload
; Upload to Sites
; ------------------------------------------------
; Call each submodule one by one
; if errors occur then an upload for that site will be stopped and the next upload will then proceed
if(Locals)
gosub, LocalsUpload
if(BitChute)
Gosub, BitChuteUpload
if(OdyseeVideo){
LBRYUploadType := "Video"
Gosub, LBRYVideoUpload
@ -1235,16 +871,13 @@ if(OdyseeAudio){
if(Rumble)
Gosub, RumbleUpload
if(Brighteon)
Gosub, BrighteonUpload
if(DailyMotion)
Gosub, DailyMotionUpload
; grab the LBRY Video/Audio URLs
if(OdyseeVideo){
LBRYUploadType := "Video"
@ -1258,6 +891,10 @@ if(OdyseeAudio){
if(LocalsGrabURL){
Gosub, LocalsGrabURL
}
; // Upload to Sites
; ------------------------------------------------
if(URLOfLastErrorPage != ""){
@ -1284,26 +921,10 @@ Message = %Message%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
DisplayResults:
/*
; i forget why i have it get the window position here
WinGetPos, XPosition, YPosition, , , A
Msgbox % "XPosition: " XPosition "`n" "YPosition: " YPosition
if(XPosition > 0 and YPosition > 0){ ; if gui doesn't exist, both are set to -8
; Msgbox % "XPosition: " XPosition
; Msgbox % "YPosition: " YPosition
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
}
*/
; Read Info for Results Window GUI
; ------------------------------------------------
DisplayResults:
Tooltip ; Remove all tooltips
Gui, Destroy ; destroy GUI in case we're going from the main screen to results without uploading.
@ -1347,99 +968,9 @@ if(PodcastNumber = "") {
}
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
; Gui, Add, Text,x10 y+10, Podcast #:
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastNumber, Podcast #
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastNumber, %PodcastNumber%
Gui, Font, Bold
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidths% gUpdateVars , %BitChuteURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidths% gUpdateVars , %BrighteonURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidths% gUpdateVars , %DailyMotionURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidths% gUpdateVars, %OdyseeVideoURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidths% gUpdateVars , %OdyseeAudioURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidths% gUpdateVars , %RumbleURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidths% gUpdateVars, %LocalsURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoTags vVideoTagsEdit, Video Tags
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidths% gUpdateVars , %VideoTags%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTags, Podcast Tags
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidths% gUpdateVars , %Podcasttags%
Gui, Font, Bold
Gui, Add, Button, x%Marginspace% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Description
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h50 vVideoDescription w%ResultEditBoxWidths% gUpdateVars , %VideoDescription%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gUpdateINI, Save Modified Links
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gUploadPodcast, Upload Podcast
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxThirdsWidths% gPostToDiscord vPostToDiscordButton, Post to Discord
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gPostToTelegram vPostToTelegramButton, Post to Telegram
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gStartSocialMediaPoster, Start Social Media Poster
Gui, Font, Bold
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxHalfWidths%gSendErrorLoggingThroughTelegram, Send Errorlog Through Telegram
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gRetryUpload, Try Failed Again
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gOpenLBRYBlobFilesFolder %ButtonWidths% , Open LBRY Blob Files Folder
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gCancelPost %ButtonWidths% , Close
; Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gKillScript %ButtonWidths% , Close
; gui, Add, Text, y+10
Gui, Font, s%GuiFontSize%
Gui, Add, Button, x%ErrorLogEditBoxXPos% w%ErrorLogEditBoxWidth% y%MarginSpace% h%ButtonHeights%, Error Log
Gui, Add, Edit,x%ErrorLogEditBoxXPos% h%ErrorLogEditBoxHeight% w%ErrorLogEditBoxWidth% y+10, %ErrorLogVar%
gui, font, Normal
gui, font, s7
Gui, Add, StatusBar,, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
Gui, +Resize +MaximizeBox
OriginalVideoDescription := VideoDescription
OriginalPodcastTags := PodcastTags
if(XPosition and YPosition)
Gui, Show,x%XPosition% y%YPosition%,%FullScriptName% - Upload Results
else,
Gui, Show,,%FullScriptName% - Upload Results
; Show Results GUI Window
; ------------------------------------------------
#include %A_scriptDir%\Modules\GUI-Results-Window.ahk
SaveCurrentChromeVersionToIniFile()
@ -1481,10 +1012,13 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
Return
/*
Sublime Indent Reset
*/
; -------------------------------CopyThis-------------------------------
; Copy Info from GUI to Clipboard
; ------------------------------------------------
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
CopyPodcastNumber:
Clipboard := PodcastNumber
SaveOrPostProgress(Message:=PodcastNumber "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
@ -1617,39 +1151,7 @@ ExitApp
SendErrorLoggingThroughTelegram:
Message = Uploading Errorlog to FDRBotTesting Telegram Server.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; Credentials to FDRBotTesting Channel
IniRead, TelegramErrorLogBotToken, %SettingsIniFilepath%, General, TelegramErrorLogBotToken, %A_Space%
IniRead, TelegramErrorLogBotChatID, %SettingsIniFilepath%, General, TelegramErrorLogBotChatID, %A_Space%
if(TelegramErrorLogBotToken = "" or TelegramErrorLogBotChatID = ""){
Message = TelegramErrorLogBotToken and/or TelegramErrorLogBotChatID are blank. Please add them to Settings.ini under: `n`n[General]`nTelegramErrorLogBotToken=`nTelegramErrorLogBotChatID=
}
Status := SendTelegramFile(TelegramErrorLogBotToken, TelegramErrorLogBotChatID, ErrorLoggingFilePath, caption := "" )
if(InStr(Status, "error_code")){
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it manually.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
Message = Telegram Error: %Status%
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
ToolTip
Return
}
Message = ErrorLog was successfully uploaded to the FDRBotTesting Telegram Server.`nThank You!
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
sleep, 5000
ToolTip
msgbox, I don't do nothin atm
Return
@ -1657,63 +1159,42 @@ Return
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-To-Telegram.ahk
; Post-Video-To-Telegram
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-Video-To-Telegram.ahk
; Post-To-Discord
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-To-Discord.ahk
; BitChute
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Bitchute-Upload.ahk
; Brighteon
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Brighteon-Upload.ahk
; DailyMotion
;------------------------------------------------
#Include %A_ScriptDir%\Modules\DailyMotion-Upload.ahk
; LBRY
;------------------------------------------------
#Include %A_ScriptDir%\Modules\LBRY-Upload.ahk
; Rumble
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Rumble-Upload.ahk
; Locals
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Locals-Upload.ahk
; Podcast
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Podcast-Upload.ahk
; Miscellaneous-Functions
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
OnMsgBoxConfirmChromiumOverwrite() {
DetectHiddenWindows, On
Process, Exist
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
ControlSetText Button1, Cancel
ControlSetText Button2, Yes
}
}

@ -0,0 +1,337 @@
;---GUI Variables---
;------------------------------------------------
GuiHeight = 800
GuiWidth = 1366
GuiFontSize = 10
ButtonHeights := 30
MarginSpace := 10
MarginSpaceDoubled := MarginSpace * 2
MarginSpaceTripled := MarginSpace * 3
EditBoxWidths := (GuiWidth / 100) * 60
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSpace * 3)
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSpace
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSpaceDoubled
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSpace / 2)
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSpace * 2)
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
DescriptionCharCountXPos := EditBoxWidths - 40
PageTwoXStartPos := EditBoxWidths + 50
CopyButtonWidths := 150
ResultEditBoxXPos := CopyButtonWidths + MarginSpace + 5
ResultEditBoxWidths := EditBoxWidths - CopyButtonWidths
ResultEditBoxHalfWidths := (ResultEditBoxWidths / 2) - (MarginSpace /2)
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidths / 4)
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
ResultEditBoxThirdsWidths := (ResultEditBoxWidths / 3) - (MarginSpace /3)
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
ErrorLogEditBoxXPos := ResultEditBoxWidths + CopyButtonWidths + 30
ErrorLogEditBoxHeight := GuiHeight - (MarginSpace * 20) - (ButtonHeights * 2)
ErrorLogEditBoxWidth := GuiWidth - ErrorLogEditBoxXPos - (MarginSpace * 12)
ButtonWidths := 150
ButtonXPos := GuiWidth - ButtonWidths - 15
SubmitButtonYLocation := GuiHeight - 50
SubmitButtonXLocation := GuiWidth - 90
CancelButtonXLocation := GuiWidth - 180
EditBoxHeight := 25
ThumbnailPreviewWidth := 300
PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
; Size of Description Edit Box and the location of the checkboxes underneath them
VideoDescriptionEditBoxHeight = 100
CheckboxesStartYPos := 630
FilePathEditBoxWidths := EditBoxWidths - MarginSpace - 70
SelectFileButtonWidths := 30
ButtonStartYPos := CheckboxesStartYPos + 10
MarginSquared := MarginSpace * 2
if(DevMode){
MainButtonHeight := 30
SecondaryButtonHeights := 30
}
else, {
MainButtonHeight := 30
SecondaryButtonHeights := 35
}
; -------------------------------GUI-------------------------------
Gui, Font, s%GuiFontSize%
Gui, Margin, %MarginSpace%, %MarginSpace%
; Video Title
Gui, Font, Bold
Gui, Add, Text,, Show Title
Gui, Add, Text, x%ColumnOneHalfWidthXPos% yp+0,Odysee URL Slug
Gui, Add, Text, x%PodcastNumberTextXPos% yp+0,Podcast #
Gui, Font, Normal
Gui, Add, Edit, y+5 x%MarginSpace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
Gui, Add, Edit, yp+0 x+%Marginspace% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
Gui, Add, Edit, yp+0 x+%Marginspace% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
; LBRY URL
Gui, Font, Bold
Gui, Add, Text, x%Marginspace%,Video Tags (Comma Seperated)
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
Gui, Font, Normal
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
; Video Description
Gui, Font, Bold
if(NoOriginalVideoDescription)
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
else,
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
if(TestingMode)
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
if(DevMode)
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
Gui, Font, Normal
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
gui, font, s8
Gui, font, Bold
if(DescriptionCharCount > 3000){
Gui, Add, Edit,cRed w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
}
else,
Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
Gui, Font, Normal
Gui, Add,Text, yp+3 xp-310, (Platform Char. Limits: DM+Bitchute = 3K, Odysee,Brighteon = 5K)
Gui, Font, s%GuiFontSize%
Gui, font, Bold
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
; Video Filepath
Gui, Font, Bold
Gui, Add, Text,xp+5 yp+15,Video Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
; Video Thumbnail Filepath
Gui, Font, Bold
if(NoOriginalVideoThumbFilepath)
Gui, Add, Text, x%MarginSquared% CRed y+15,Video Thumbnail Filepath
else,
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoThumbFilepath,%VideoThumbFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
; WAV Audio File Filepath
Gui, Font, Bold
if(WavAudioFilepath = "")
Gui, Add, Text,cRed x%MarginSquared% y+15,WAV Filepath
else, { ; change text depending on if WAV or FLAC file
if(InStr(WavFilepath, ".flac"))
Gui, Add, Text,x%MarginSquared% y+15,FLAC Filepath
else,
Gui, Add, Text,x%MarginSquared% y+15,WAV Filepath
}
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vWavAudioFilepath,%WavAudioFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectWAVFilepath, Select
Gui, Font, Bold
if(MP3AudioFilepath = "")
Gui, Add, Text,cRed x%MarginSquared% y+15,Podcast MP3 Filepath
else,
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vMP3AudioFilepath,%MP3AudioFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectMP3Filepath, Select
; Submit Button
Gui, Font, s%GuiFontSize%
gui, Font, Bold
; if(DevMode)
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Close
; else,
; Script Update Button
if(UpdateAvailable){
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Update Available!
; GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
}
else, {
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Up-to-Date
; Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% vUpdateAvailable hwndIcon, Script is Up-to-Date
; GuiButtonIcon(Icon, "shell32.dll", 239, "s20 a1 r2")
}
; Gui, Font, s20
; Gui, Font, Bold
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
Gui, Font, s%GuiFontSize%
; Chrome Update Button
if(ChromeUpdateAvailable){
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available!
}
else, {
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Up-to-Date
}
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Exit
; GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
if(DevMode)
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
else,
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder, Open Project Folder
if(DevMode){
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
}
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
LineSplitXPosition := PageTwoXStartPos - ( MarginSpace * 2)
gui, add, text, x%LineSplitXPosition% y20 h500 0x11 ; 0x11 is a "line" ; refer to here: https://autohotkey.com/board/topic/50910-draw-line-gui/
; Thumbnail Preview
Gui, Font, Normal
gui, Font, s4
; Miscellaneous Settings
DevModToggleButton := PageTwoXStartPos + 160
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
Gui, Add, Button, x+5 y5 w50 h10 gToggleTestingMode, Testing Mode
Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
; Settings Section
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
; -------------------------------PLATFORMS-------------------------------
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
; Msgbox % "LocalsURL: " LocalsURL
; if(VideoFileSizeInMB < 1792)
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus% gUpdateVars, BitChute
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
; msgbox, checking grab url
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus% gUpdateVars, Locals (Grab URL)
LocalsGrabURL := 1
Locals := 0
}
else, {
; msgbox, checking locals
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals
LocalsGrabURL := 0
Locals := 1
}
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
if(VideoFileSizeInMB < 50)
Gui, Add, Checkbox, vTelegram x+%MarginSpaceTripled% yp+0 Checked%TelegramCheckStatus% gUpdateVars, Telegram (>50 MB)
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeAudioThumb Checked%OdyseeAudioThumbCheckStatus%, Thumbnail
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
if(VideoTotalBitrate > 300000)
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
else,{
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
}
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
; Gui, Font, s12
gui, Font, Bold
Gui, Add, GroupBox, r6.5 y+%MarginSpaceTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
gui, Font, Normal
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
gui, Font, Normal
gui, font, s7
Gui, Add, StatusBar,Center, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
; Show GUI to the user
Gui, +Resize +MaximizeBox
if(XPosition and YPosition)
Gui, Show, x%XPosition% y%YPosition%, %FullScriptName% - Upload Settings - %BodyTextFilePath%
else,
Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
ControlFocus, Edit4, %FullScriptName%
ToolTip
Return

@ -0,0 +1,94 @@
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
; Gui, Add, Text,x10 y+10, Podcast #:
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastNumber, Podcast #
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastNumber, %PodcastNumber%
Gui, Font, Bold
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidths% gUpdateVars , %BitChuteURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidths% gUpdateVars , %BrighteonURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidths% gUpdateVars , %DailyMotionURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidths% gUpdateVars, %OdyseeVideoURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidths% gUpdateVars , %OdyseeAudioURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidths% gUpdateVars , %RumbleURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidths% gUpdateVars, %LocalsURL%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoTags vVideoTagsEdit, Video Tags
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidths% gUpdateVars , %VideoTags%
Gui, Font, Bold
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTags, Podcast Tags
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidths% gUpdateVars , %Podcasttags%
Gui, Font, Bold
Gui, Add, Button, x%Marginspace% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Description
Gui, Font, Normal
Gui, Add, Edit, x+5 yp+0 h50 vVideoDescription w%ResultEditBoxWidths% gUpdateVars , %VideoDescription%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gUpdateINI, Save Modified Links
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gUploadPodcast, Upload Podcast
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxThirdsWidths% gPostToDiscord vPostToDiscordButton, Post to Discord
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gPostToTelegram vPostToTelegramButton, Post to Telegram
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gStartSocialMediaPoster, Start Social Media Poster
Gui, Font, Bold
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxHalfWidths% gSendErrorLoggingThroughTelegram,
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gRetryUpload, Try Failed Again
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gOpenLBRYBlobFilesFolder %ButtonWidths% , Open LBRY Blob Files Folder
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gCancelPost %ButtonWidths% , Close
; Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gKillScript %ButtonWidths% , Close
; gui, Add, Text, y+10
Gui, Font, s%GuiFontSize%
Gui, Add, Button, x%ErrorLogEditBoxXPos% w%ErrorLogEditBoxWidth% y%MarginSpace% h%ButtonHeights%, Error Log
Gui, Add, Edit,x%ErrorLogEditBoxXPos% h%ErrorLogEditBoxHeight% w%ErrorLogEditBoxWidth% y+10, %ErrorLogVar%
gui, font, Normal
gui, font, s7
Gui, Add, StatusBar,, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
Gui, +Resize +MaximizeBox
OriginalVideoDescription := VideoDescription
OriginalPodcastTags := PodcastTags
if(XPosition and YPosition)
Gui, Show,x%XPosition% y%YPosition%,%FullScriptName% - Upload Results
else,
Gui, Show,,%FullScriptName% - Upload Results

@ -0,0 +1,340 @@
DisplayMainGUI:
;---GUI Variables---
;------------------------------------------------
GuiHeight = 800
GuiWidth = 1366
GuiFontSize = 10
ButtonHeights := 30
MarginSpace := 10
MarginSpaceDoubled := MarginSpace * 2
MarginSpaceTripled := MarginSpace * 3
EditBoxWidths := (GuiWidth / 100) * 60
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSpace * 3)
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSpace
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSpaceDoubled
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSpace / 2)
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSpace * 2)
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
DescriptionCharCountXPos := EditBoxWidths - 40
PageTwoXStartPos := EditBoxWidths + 50
CopyButtonWidths := 150
ResultEditBoxXPos := CopyButtonWidths + MarginSpace + 5
ResultEditBoxWidths := EditBoxWidths - CopyButtonWidths
ResultEditBoxHalfWidths := (ResultEditBoxWidths / 2) - (MarginSpace /2)
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidths / 4)
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
ResultEditBoxThirdsWidths := (ResultEditBoxWidths / 3) - (MarginSpace /3)
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
ErrorLogEditBoxXPos := ResultEditBoxWidths + CopyButtonWidths + 30
ErrorLogEditBoxHeight := GuiHeight - (MarginSpace * 20) - (ButtonHeights * 2)
ErrorLogEditBoxWidth := GuiWidth - ErrorLogEditBoxXPos - (MarginSpace * 12)
ButtonWidths := 150
ButtonXPos := GuiWidth - ButtonWidths - 15
SubmitButtonYLocation := GuiHeight - 50
SubmitButtonXLocation := GuiWidth - 90
CancelButtonXLocation := GuiWidth - 180
EditBoxHeight := 25
ThumbnailPreviewWidth := 300
PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
; Size of Description Edit Box and the location of the checkboxes underneath them
VideoDescriptionEditBoxHeight = 100
CheckboxesStartYPos := 630
FilePathEditBoxWidths := EditBoxWidths - MarginSpace - 70
SelectFileButtonWidths := 30
ButtonStartYPos := CheckboxesStartYPos + 10
MarginSquared := MarginSpace * 2
if(DevMode){
MainButtonHeight := 30
SecondaryButtonHeights := 30
}
else, {
MainButtonHeight := 30
SecondaryButtonHeights := 35
}
; -------------------------------GUI-------------------------------
Gui, Font, s%GuiFontSize%
Gui, Margin, %MarginSpace%, %MarginSpace%
; Video Title
Gui, Font, Bold
Gui, Add, Text,, Show Title
Gui, Add, Text, x%ColumnOneHalfWidthXPos% yp+0,Odysee URL Slug
Gui, Add, Text, x%PodcastNumberTextXPos% yp+0,Podcast #
Gui, Font, Normal
Gui, Add, Edit, y+5 x%MarginSpace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
Gui, Add, Edit, yp+0 x+%Marginspace% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
Gui, Add, Edit, yp+0 x+%Marginspace% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
; LBRY URL
Gui, Font, Bold
Gui, Add, Text, x%Marginspace%,Video Tags (Comma Seperated)
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
Gui, Font, Normal
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
; Video Description
Gui, Font, Bold
if(NoOriginalVideoDescription)
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
else,
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
if(TestingMode)
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
if(DevMode)
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
Gui, Font, Normal
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
gui, font, s8
Gui, font, Bold
if(DescriptionCharCount > 3000){
Gui, Add, Edit,cRed w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
}
else,
Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
Gui, Font, Normal
Gui, Add,Text, yp+3 xp-310, (Platform Char. Limits: DM+Bitchute = 3K, Odysee,Brighteon = 5K)
Gui, Font, s%GuiFontSize%
Gui, font, Bold
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
; Video Filepath
Gui, Font, Bold
Gui, Add, Text,xp+5 yp+15,Video Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
; Video Thumbnail Filepath
Gui, Font, Bold
if(NoOriginalVideoThumbFilepath)
Gui, Add, Text, x%MarginSquared% CRed y+15,Video Thumbnail Filepath
else,
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoThumbFilepath,%VideoThumbFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
; WAV Audio File Filepath
Gui, Font, Bold
if(WavAudioFilepath = "")
Gui, Add, Text,cRed x%MarginSquared% y+15,WAV Filepath
else, { ; change text depending on if WAV or FLAC file
if(InStr(WavFilepath, ".flac"))
Gui, Add, Text,x%MarginSquared% y+15,FLAC Filepath
else,
Gui, Add, Text,x%MarginSquared% y+15,WAV Filepath
}
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vWavAudioFilepath,%WavAudioFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectWAVFilepath, Select
Gui, Font, Bold
if(MP3AudioFilepath = "")
Gui, Add, Text,cRed x%MarginSquared% y+15,Podcast MP3 Filepath
else,
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
Gui, Font, Normal
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vMP3AudioFilepath,%MP3AudioFilepath%
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectMP3Filepath, Select
; Submit Button
Gui, Font, s%GuiFontSize%
gui, Font, Bold
; if(DevMode)
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Close
; else,
; Script Update Button
if(UpdateAvailable){
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Update Available!
; GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
}
else, {
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Up-to-Date
; Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% vUpdateAvailable hwndIcon, Script is Up-to-Date
; GuiButtonIcon(Icon, "shell32.dll", 239, "s20 a1 r2")
}
; Gui, Font, s20
; Gui, Font, Bold
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
Gui, Font, s%GuiFontSize%
; Chrome Update Button
if(ChromeUpdateAvailable){
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available!
}
else, {
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Up-to-Date
}
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Exit
; GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
if(DevMode)
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
else,
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder, Open Project Folder
if(DevMode){
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
}
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
LineSplitXPosition := PageTwoXStartPos - ( MarginSpace * 2)
gui, add, text, x%LineSplitXPosition% y20 h500 0x11 ; 0x11 is a "line" ; refer to here: https://autohotkey.com/board/topic/50910-draw-line-gui/
; Thumbnail Preview
Gui, Font, Normal
gui, Font, s4
; Miscellaneous Settings
DevModToggleButton := PageTwoXStartPos + 160
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
Gui, Add, Button, x+5 y5 w50 h10 gToggleTestingMode, Testing Mode
Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
; Settings Section
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
; -------------------------------PLATFORMS-------------------------------
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
; Msgbox % "LocalsURL: " LocalsURL
; if(VideoFileSizeInMB < 1792)
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus% gUpdateVars, BitChute
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
; msgbox, checking grab url
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus% gUpdateVars, Locals (Grab URL)
LocalsGrabURL := 1
Locals := 0
}
else, {
; msgbox, checking locals
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals
LocalsGrabURL := 0
Locals := 1
}
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
if(VideoFileSizeInMB < 50)
Gui, Add, Checkbox, vTelegram x+%MarginSpaceTripled% yp+0 Checked%TelegramCheckStatus% gUpdateVars, Telegram (>50 MB)
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeAudioThumb Checked%OdyseeAudioThumbCheckStatus%, Thumbnail
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
if(VideoTotalBitrate > 300000)
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
else,{
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
}
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
; Gui, Font, s12
gui, Font, Bold
Gui, Add, GroupBox, r6.5 y+%MarginSpaceTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
gui, Font, Normal
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
gui, Font, Normal
gui, font, s7
Gui, Add, StatusBar,Center, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
; Show GUI to the user
Gui, +Resize +MaximizeBox
if(XPosition and YPosition)
Gui, Show, x%XPosition% y%YPosition%, %FullScriptName% - Upload Settings - %BodyTextFilePath%
else,
Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
ControlFocus, Edit4, %FullScriptName%
ToolTip
Return

@ -91,7 +91,7 @@ if(LBRYURLSlug = "" OR LBRYURLSlug = "_Audio"){
; loops through array and creates a string of: --tags="tag1" --tags="tag2" --tags="tag3" so that it can be passed to lbrynet
Loop % KeywordsArray.Length(){
LBRYTags .= "--tags=" . SingleQuotationmark VideoTagsArray[A_Index] . SingleQuotationmark . " "
LBRYTags .= "--tags=" . SingleQuotationmark ArrayOfVideoTags[A_Index] . SingleQuotationmark . " "
}
; Msgbox % "FilePathForLBRYAPI: " FilePathForLBRYAPI

@ -1,5 +1,15 @@
; -------------------------------Functions-------------------------------
OnMsgBoxConfirmChromiumOverwrite() {
DetectHiddenWindows, On
Process, Exist
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
ControlSetText Button1, Cancel
ControlSetText Button2, Yes
}
}
; https://www.autohotkey.com/docs/v2/Functions.htm#Variadic
Join(sep, params*) {
For index, param in params

@ -1,2 +1,3 @@
[Video-Uploader]
Version=3.29
Version=3.31
Name=Freedomain Video Uploader
Loading…
Cancel
Save