gui updates and cleanup

pull/2/head
Yuriy 2 years ago
parent aa47223d29
commit 94c4c0dc86

@ -29,10 +29,13 @@ global ScriptVersion
global FullScriptName global FullScriptName
ScriptName = Freedomain Video Uploader ScriptName = Freedomain Video Uploader
ScriptVersion = 3.16 ScriptVersion = 3.18
FullScriptName := ScriptName . " - " . ScriptVersion FullScriptName := ScriptName . " - " . ScriptVersion
; UStartTime := A_TickCount ; start time
;---ToDo--- ;---ToDo---
;------------------------------------------------ ;------------------------------------------------
@ -681,12 +684,15 @@ Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectMP3Filepath, Select
; Submit Button ; Submit Button
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
gui, Font, Bold gui, Font, Bold
if(DevMode)
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, Close
; if(DevMode)
; 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") GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%MainButtonHeight% gStartScript hwndIcon, Upload Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%MainButtonHeight% gStartScript hwndIcon, Upload
GuiButtonIcon(Icon, "shell32.dll", 136, "s20 a1 r2") GuiButtonIcon(Icon, "shell32.dll", 136, "s20 a1 r2")
@ -694,27 +700,26 @@ if(DevMode)
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% y+%Marginspace% h%SecondaryButtonHeights% gDisplayResults hwndIcon, View Results Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% y+%Marginspace% h%SecondaryButtonHeights% gDisplayResults hwndIcon, View Results
else, else,
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% y+%Marginspace% h%SecondaryButtonHeights% gDisplayResults hwndIcon, View Results Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% y+%Marginspace% h%SecondaryButtonHeights% gDisplayResults hwndIcon, View Results
GuiButtonIcon(Icon, "shell32.dll", 210, "s30 a1 r2") GuiButtonIcon(Icon, "shell32.dll", 210, "s20 a1 r2")
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder hwndIcon, Open Project Folder Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder hwndIcon, Open Project Folder
GuiButtonIcon(Icon, "shell32.dll", 267, "s30 a1 r2") GuiButtonIcon(Icon, "shell32.dll", 267, "s20 a1 r2")
if(UpdateAvailable) if(UpdateAvailable){
Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% hwndIcon, Update Available - Click to Install Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% hwndIcon, Update Available - Click to Install
else, GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% hwndIcon, Program is Up-to-Date }
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 ; Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% vUpdateAvailable hwndIcon, Script is Up-to-Date
GuiButtonIcon(Icon, "shell32.dll", 239, "s30 a1 r2") GuiButtonIcon(Icon, "shell32.dll", 239, "s20 a1 r2")
}
if(DevMode){ 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 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gCompileScript, Compile
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gUploadFiles, UploadWinscp
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gToggleTestingMode, Toggle TestingMode
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gToggleDevMode, Toggle DevMode
} }
@ -812,6 +817,10 @@ if(SkipToDBInfo){
; Write current project to ini file for easy reloading ; Write current project to ini file for easy reloading
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
; calculate run time and convert to seconds
; URunTime := round(((A_TickCount - UStartTime) / 1000), 2)
; Msgbox % "URunTime: " URunTime
Return Return
@ -878,19 +887,7 @@ OpenGiteaPage:
run, https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader run, https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader
Return Return
CompileScript:
IniWrite, %changelog%, %ChangelogIniFilepath%, %ScriptSettingsSection%, Changelog
IniWrite, %ScriptVersion%, %ChangelogIniFilepath%, %ScriptSettingsSection%, ScriptVersion
IniWrite, %UpdateURL%, %ChangelogIniFilepath%, %ScriptSettingsSection%, UpdateURL
run, "C:\Users\yuriy\Syncthing\Freedomain\Uploaders\Lib\Releases\Compile Scripts to EXE.ahk" VideoUploader Production
; msgbox, this does nothign yet
Return
UploadFiles:
; @todo remove this
Return
SelectVideoFilepath: SelectVideoFilepath:
FileSelectFile, VideoFilepath,, %FileDir%, Select Video File FileSelectFile, VideoFilepath,, %FileDir%, Select Video File

Loading…
Cancel
Save