@ -64,6 +64,8 @@ global FullScriptName
global PostStatusesFilepath
global PostStatusesFilepath
global ErrorLoggingDirectory
global ErrorLoggingDirectory
global ConfirmBeforeSubmit
global DiscordErrorLoggingWebhookBotURL
global DiscordErrorLoggingWebhookBotURL
global DiscordVideosWebhookURL
global DiscordVideosWebhookURL
global VideoFolderDir
global VideoFolderDir
@ -104,12 +106,14 @@ FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Version, 0.0
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Version, 0.0
; IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Name, %ScriptSettingsSection%
; IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Name, %ScriptSettingsSection%
global ScriptName := "Freedomain Livestream Scheduler"
global ScriptName
global ScriptAbbreviatedName := "FLS" ; used for error logging
ScriptName := "Freedomain Livestream Scheduler"
global ScriptAbbreviatedName
ScriptAbbreviatedName := "FLS" ; used for error logging
FullScriptName := ScriptName . " - " . ScriptVersion
FullScriptName := ScriptName . " - " . ScriptVersion
; Msgbox % "FullScriptName: " FullScriptName
global GitReleasesAPIURL
global GitReleasesAPIURL
GitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/livestream-scheduler/releases
GitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/livestream-scheduler/releases
@ -172,13 +176,20 @@ if(ErrorLogToDiscord){
; GUI Variables
; GUI Variables
; ------------------------------------------------
; ------------------------------------------------
GuiFontSize = 15
MarginSize := 10
MarginSize := 10
MarginSizeDoubled := MarginSize * 2
MarginSizeDoubled := MarginSize * 2
ButtonHeights := 30
ButtonHeights := 30
ThumbnailPreviewWidth := 200
ThumbnailPreviewWidth := 150
GuiHeight := 470
VerticalLineHeight := GuiHeight - 100
GuiHeight := 440
; Column One
; Column One
ColumnOneWidth := 500
ColumnOneWidth := 500
@ -187,14 +198,21 @@ ColumnOneEditBoxWidth := ColumnOneWidth - (MarginSize * 2)
ColumnOneEditBoxHalfWidth := (ColumnOneEditBoxWidth / 2) + 5
ColumnOneEditBoxHalfWidth := (ColumnOneEditBoxWidth / 2) + 5
GuiFontSize = 15
; Column Two
; Column Two
ColumnTwoXPosition := ColumnOneWidth + (MarginSize * 2)
ColumnTwoXPosition := ColumnOneWidth + (MarginSize * 2)
ColumnTwoVerticalLineXPosition := ColumnTwoXPosition - (MarginSize * 2)
ColumnTwoEditBoxWidth := 200
ColumnTwoEditBoxWidth := 200
ColumnTwoEditBoxHalfWidth := ColumnTwoEditBoxWidth / 2
ColumnTwoEditBoxHalfWidth := ColumnTwoEditBoxWidth / 2
; Column Three
ColumnThreeXPosition := ColumnTwoXPosition + ColumnTwoEditBoxWidth + (MarginSizeDoubled * 2)
ColumnThreeVerticalLineXPosition := ColumnThreeXPosition - (MarginSize * 2)
ColumnThreeEditBoxWidth := 180
GUIWidth := ColumnThreeXPosition + ColumnThreeEditBoxWidth + MarginSize
; Results Screen
; Results Screen
ResultButtonWidth := 250
ResultButtonWidth := 250
@ -203,87 +221,96 @@ ResultButtonHeights := 30
ResultButtonAndEditWidth := ResultButtonWidth + ResultButtonEditWidth + MarginSize
ResultButtonAndEditWidth := ResultButtonWidth + ResultButtonEditWidth + MarginSize
; START OF GUI
; START OF GUI
; ------------------------------------------------
; ------------------------------------------------
Gui, Margin, %MarginSize%, %MarginSize%
Gui, Font, s%GuiFontSize%
; Gui Color, 0193C4
; Column One
; Column One
;------------------------------------------------
;------------------------------------------------
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
Gui, Font, s8
Gui, Add, Text,x%MarginSize%, Title
Gui, Add, Text,, Title
Gui, Font, s10
Gui, Font, Normal
Gui, Font, Normal
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToFLSTitle, Paste Clipboard
Gui, Font, s%GuiFontSize%
Gui, Font, s%GuiFontSize%
Gui, Add, Edit,w%ColumnOneEditBoxWidth% vLivestreamTitle, %LivestreamTitle%
Gui, Font, Normal
Gui, Add, Edit,x%MarginSize% w%ColumnOneEditBoxWidth% vLivestreamTitle, %LivestreamTitle%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
Gui, Font, s8
Gui, Add, Text,, Description
Gui, Add, Text,, Description
Gui, Font, s10
Gui, Font, Normal
Gui, Font, Normal
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToFLSDescription, Paste Clipboard
Gui, Font, s%GuiFontSize%
Gui, Font, s%GuiFontSize%
Gui, Add, Edit,w%ColumnOneEditBoxWidth% h150 vLivestreamDescription, %LivestreamDescription%
Gui, Font, Normal
Gui, Add, Edit,x%MarginSize% w%ColumnOneEditBoxWidth% h170 vLivestreamDescription, %LivestreamDescription%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
Gui, Font, s8
Gui, Add, Text,, Tags (Comma Seperated)
Gui, Add, Text,, Tags (Comma Seperated)
Gui, Font, s10
Gui, Font, Normal
Gui, Font, Normal
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToFLSTags, Paste Clipboard
Gui, Font, s%GuiFontSize%
Gui, Font, s%GuiFontSize%
Gui, Add, Edit,w%ColumnOneEditBoxWidth% vLivestreamTags, %LivestreamTags%
Gui, Font, Normal
Gui, Add, Edit,x%MarginSize% w%ColumnOneEditBoxWidth% vLivestreamTags, %LivestreamTags%
; Buttons at Bottom of Page
; ------------------------------------------------
; Start with Column one and go across
Gui, Font, Bold
ScheduleButtonWidths := 234
Gui, Font, s8
ScheduleButtonHeight := 50
Gui, Add, Text,, Thumbnail
Gui, Add, Button, x+%MarginSize% yp-3 gSelectThumbnail, Select
Gui, Font, Normal
Gui, Font, s%GuiFontSize%
Gui, Add, Picture, x%MarginSize% w%ThumbnailPreviewWidth% h-1 vThumbnailPreview, %LivestreamThumbnail%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
Gui, Font, S10
Gui, add, text, x0 y+%marginsizeDoubled% w970 0x10
Gui, Add, Button, x%ColumnOneEditBoxHalfWidth% yp-%marginsize% w%ColumnOneEditBoxHalfWidth% h40 gSaveAsTemplate, Save As Template
Gui, Add, Button,gSchedulePost w%ColumnOneEditBoxHalfWidth% gLoadTemplate h40 , Load Template
Gui, Font, Normal
Gui, Add, Button,gSchedulePost w%ColumnOneEditBoxHalfWidth% gLoadPrevious h20 , Load Previous
; Gui, Add, Button, yp+0 x%ColumnOneEditBoxHalfWidth% w%ColumnOneEditBoxHalfWidth%, Text button here
Gui, Add, Button, x%MarginSize% yp+%marginsizeDoubled% w%ColumnTwoEditBoxWidth% h%ScheduleButtonHeight% gLoadPrevious , Load Previous
Gui, Font, Bold
; Gui, Add, Edit,w%ColumnOneEditBoxWidth% h150 vLivestreamDescription, This livestream is happening soon!
; Gui, Font, S10
Gui, Add, Button, x+%marginsize% w%ScheduleButtonWidths% h%ScheduleButtonHeight% gSaveAsTemplate, Save As Template
Gui, Add, Button,x+%marginsize% gSchedulePost h%ScheduleButtonHeight% w%ScheduleButtonWidths% gLoadTemplate, Load Template
Gui, Add, Button, x+%marginsize% gSchedulePost h%ScheduleButtonHeight% w%ScheduleButtonWidths% gSchedulePost, Schedule
; Column Two
; Column Two
; ------------------------------------------------
; ------------------------------------------------
Gui, add, text, x%ColumnTwoVerticalLineXPosition% y%marginSize% h%VerticalLineHeight% 0x11 ;Vertical Line > Etched Gray
Gui, Font, s%GuiFontSize%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
Gui, Add, Text,y0 x%ColumnTwoXPosition%, Settings
; Gui, Add, Text, , Thumbnail
Gui, Add, GroupBox, r2.5 x%ColumnTwoXPosition% y%marginSize% vImageThumbnail w%ColumnTwoEditBoxWidth%,Thumbnail
Gui, Font, s10
Gui, Font, Normal
Gui, Font, Normal
Gui, Font, s8
Gui, Add, Button, xp+120 yp-3 gSelectThumbnail, Select
Gui, Add, Checkbox, vErrorLogToDiscord Checked%ErrorLogToDiscord%, Error Log to Discord
; Gui, Font, Normal
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
; Gui, Font, s%GuiFontSize%
Gui, Add, Checkbox, vAutoUpdateCheck Checked%AutoUpdateCheck%, Auto Update Check
Gui, Add, Picture, x%ColumnTwoXPosition% y+%marginsize% w%ThumbnailPreviewWidth% h-1 vThumbnailPreview, %LivestreamThumbnail%
if(UpdateAvailable){
Gui, Add, Button, cRed w%ColumnTwoEditBoxWidth% gUpdateScript vUpdateAvailable center, Update Available!
}
else, {
Gui, Add, Button, w%ColumnTwoEditBoxWidth% gUpdateScript vUpdateAvailable center, No Updates Available
}
Gui, Font, s%GuiFontSize%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
; Gui, Add, Text, , Settings
Gui, Add, Text, x%ColumnTwoXPosition% yp+100 , Date and Time
Gui, Add, Text, y+%MarginSizeDoubled% , Date and Time
Gui, Font, Normal
Gui, Font, Normal
Gui, Add, DateTime, vLivestreamDate w%ColumnTwoEditBoxWidth%, MM/dd/yyyy
Gui, Add, DateTime, vLivestreamDate w%ColumnTwoEditBoxWidth%, MM/dd/yyyy
@ -311,13 +338,41 @@ Gui, Add, Checkbox,x%ColumnTwoXPosition% y+%marginsize% checked vRumble, Rumble
Gui, Font, S8
Gui, Font, S8
Gui, Add, Checkbox, x+10 yp+5 Checked vInputRumbleCustomRTMP, Input RTMP
Gui, Add, Checkbox, x+10 yp+5 Checked vInputRumbleCustomRTMP, Input RTMP
Gui, add, text, x%ColumnThreeVerticalLineXPosition% y%marginSize% h%VerticalLineHeight% 0x11 ;Vertical Line > Etched Gray
Gui, Font, s15
; Column Three
; ------------------------------------------------
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Font, Bold
Gui, Add, Button, x%ColumnTwoXPosition% y+%marginsizeDoubled% gSchedulePost w%ColumnTwoEditBoxWidth% h60, Schedule
Gui, Add, Text,y0 x%ColumnThreeXPosition%, Settings
; Gui, Font, Normal
Gui, Font, s12
Gui, Font, Normal
Gui, Add, Checkbox, vAutoUpdateCheck Checked%AutoUpdateCheck%, Auto Update Check
Gui, Add, Checkbox, vErrorLogToDiscord Checked%ErrorLogToDiscord%, Error Log to Discord
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Add, Text, y+%MarginSizeDoubled% x%ColumnThreeXPosition%, Updates
Gui, Font, S10
if(UpdateAvailable)
Gui, Add, Button, cRed w%ColumnTwoEditBoxWidth% center vUpdateAvailable gUpdateScript, FLS Update Available!
else,
Gui, Add, Button, w%ColumnThreeEditBoxWidth% center vUpdateAvailable gUpdateScript, FLS Up-to-Date
if(ChromeUpdateAvailable)
Gui, Add, Button, cRed w%ColumnThreeEditBoxWidth% center vChromeUpdateAvailable gUpdateChrome,Chrome Update Available!
else,
Gui, Add, Button, w%ColumnThreeEditBoxWidth% center vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
Gui, Show, h%GuiHeight%, %FullScriptName%
Gui, Show, h%GuiHeight% w%GUIWidth%, %FullScriptName%
@ -413,8 +468,8 @@ ExitApp
SelectThumbnail:
SelectThumbnail:
FileSelectFile, LivestreamThumbnail,
FileSelectFile, LivestreamThumbnail,
; Msgbox % "ThumbnailPreviewWidth: " ThumbnailPreviewWidth
GuiControl, , ThumbnailPreview, *w%ThumbnailPreviewWidth% *h -1 %LivestreamThumbnail%
GuiControl, , ThumbnailPreview, *h130 *w -1 %LivestreamThumbnail%
Return
Return
@ -595,9 +650,7 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
} Else IfMsgBox Cancel, {
} Else IfMsgBox Cancel, {
Return
Return
}
}
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
}
}
run, %SocialMediaPosterFilepath% %StatusFileFilePath%
run, %SocialMediaPosterFilepath% %StatusFileFilePath%
@ -710,7 +763,7 @@ Return
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Update-Function s.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTo s.ahk
; Misc
; Misc