added button for updating chrome, GUI updates

pull/2/head
Yuriy 1 year ago
parent c07e03473d
commit 65e8927a65

@ -97,7 +97,6 @@ global ShowTooltipProgress
global ErrorLogSummary
global DiscordParlerWebhookURL
global ErrorLoggingFilePath
; global TotalTabLoops
global ErrorLogVar
@ -497,6 +496,8 @@ if(PassedParameter = "ShowResults"){
}
;---GUI Variables---
;------------------------------------------------
GuiHeight = 800
@ -507,6 +508,7 @@ ButtonHeights := 30
MarginSpace := 10
MarginSpaceDoubled := MarginSpace * 2
MarginSpaceTripled := MarginSpace * 3
EditBoxWidths := (GuiWidth / 100) * 60
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
@ -593,6 +595,26 @@ if(AutoUpdateCheck AND !UpdateAvailable){
UpdateAvailable := CheckForUpdates(GitReleasesAPIURL)
}
; Initiate Chrome Filepath Variable
; @todo: find a better location for this?
GetChromeFilepath()
; Msgbox % "ChromeFIlepath: " ChromeFIlepath
if(!InStr(ChromeFilepath, A_scriptDir)){
; Chrome portale is not downloaded. Ask user to download it.
msgbox, download newest portable chrome?
LatestVersion := GetLatestChromeStableVersion()
Msgbox % "LatestVersion: " LatestVersion
DownloadURLs := GetDownloadURLOfChromeAndDriver(LatestVersion)
Msgbox % "DownloadURLs: " DownloadURLs
Msgbox % "chromedriverDLURL64: " chromedriverDLURL64
Msgbox % "chromeDLURL64: " chromeDLURL64
}
; DevModeMsgBox(AutoUpdateCheck)
; DevModeMsgBox(UpdateAvailable)
@ -702,33 +724,46 @@ gui, Font, Bold
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Close
; else,
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Exit
GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
; 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,Program 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, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%MainButtonHeight% gStartScript hwndIcon, Upload
GuiButtonIcon(Icon, "shell32.dll", 136, "s20 a1 r2")
if(DevMode)
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% y+%Marginspace% h%SecondaryButtonHeights% gDisplayResults hwndIcon, View Results
else,
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% y+%Marginspace% h%SecondaryButtonHeights% gDisplayResults hwndIcon, View Results
GuiButtonIcon(Icon, "shell32.dll", 210, "s20 a1 r2")
}
; Gui, Font, s20
; Gui, Font, Bold
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder hwndIcon, Open Project Folder
GuiButtonIcon(Icon, "shell32.dll", 267, "s20 a1 r2")
Gui, Font, s%GuiFontSize%
if(UpdateAvailable){
Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% hwndIcon, Update Available - Click to Install
GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
; Chrome Update Button
ChromeUpdateAvailable := 1
if(ChromeUpdateAvailable){
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% gUpdateChrome center,Chrome Update Available
}
else, {
Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% hwndIcon, 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, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% 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
@ -752,6 +787,9 @@ Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
; Gui, Add, Button, x%PageTwoXStartPos% yp+20 w%PageTwoGroupBoxWidth% h15 gCancelPost center,Chrome Update Available
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
; Gui, Add, Text, y%CheckboxesStartYPos% x+80, Miscellaneous Settings:
; Gui, Font, Normal
@ -768,22 +806,24 @@ Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckS
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
; -------------------------------PLATFORMS-------------------------------
Gui, Add, GroupBox,r8 y+15 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
; Gui, Add, Text,y+25 x%PageTwoXStartPos%, ---Platforms----
; Gui, Font, Bold
; 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%, BitChute
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
Gui, Add, Checkbox, xp+10 yp+25 vLocalsGrabURL Checked%LocalsCheckStatus%, Locals (Grab URL)
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus%, Locals (Grab URL)
}
else, {
Gui, Add, Checkbox, xp+10 yp+25 vLocals Checked%LocalsCheckStatus%, Locals
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus%, Locals
}
; if(VideoFileSizeInMB < 1792)
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vBitChute Checked%BitChuteCheckStatus%, BitChute
if(VideoFileSizeInMB < 50)
Gui, Add, Checkbox, vTelegram x+%MarginSpaceDoubled% Checked%TelegramCheckStatus%, Telegram
@ -801,7 +841,7 @@ Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus%
; Gui, Font, s12
gui, Font, Bold
Gui, Add, GroupBox, r6.5 y+15 vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
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%
@ -949,6 +989,10 @@ UpdateScript()
; @todo: Save any changes made to the script before installing update
Return
UpdateChrome:
Return
; now defunt, safe to remove
CreateDescriptionForVideosPosting:
; msgbox, here
@ -1166,9 +1210,6 @@ VideoTags := StrReplace(VideoTags, " ",",")
KeywordsArray := StrSplit(VideoTags,",")
; Initiate Chrome Filepath Variable
; @todo: find a better location for this?
GetChromeFilepath()
if(Facebook){
UploadedToSites .= "Facebook,"
@ -1507,15 +1548,6 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
Return
; Post-To-Telegram
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-To-Telegram.ahk
; Post-To-Discord
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-To-Discord.ahk
; -------------------------------CopyThis-------------------------------
CopyPodcastNumber:
@ -1784,6 +1816,16 @@ AddToTotalVideosUploadedCount()
Return
; Post-To-Telegram
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-To-Telegram.ahk
; Post-To-Discord
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Post-To-Discord.ahk
; BitChute
;------------------------------------------------
#Include %A_ScriptDir%\Modules\Bitchute-Upload.ahk

@ -1 +1 @@
Subproject commit c6cf2a408a2b7d08c400ac71ebbcdb395959c4f0
Subproject commit 74e67e5ab9c21511e42290cfac3dbb837cea5c32
Loading…
Cancel
Save