@@ -143,33 +143,61 @@ local function copyFolderSameName(sourceFolder, targetParentFolder)
143143end
144144
145145if not SCRIPT_INSTALLED then
146- copyFolderSameName (currFolder .Path , scriptFolder .. ' Utility/' )
146+ local success = copyFolderSameName (currFolder .Path , scriptFolder .. ' Utility/' )
147+
148+ if success then
149+ local installWindow = disp :AddWindow ({
150+ ID = ' installWindow' ,
151+ WindowTitle = ' Script Installed' ,
152+
153+ ui :VGroup {
154+ ID = ' root' ,
155+ FixedSize = { 400 , 200 },
156+ ui :Label { ID = ' Label1' , Text = ' The Script was Successfully Installed!\n Please Reopen the Script from "Workflow/Scripts/Asher Roland 1000 Subs"' , WordWrap = true , Alignment = { AlignCenter = true }, Weight = 1 , StyleSheet = [[ color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
157+ ui :Button { ID = ' Butt1' , Text = ' Okay!(Close)' , Flat = false , Checkable = false , Weight = 0.15 , StyleSheet = [[ color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
158+ }
159+ })
147160
148- local installWindow = disp : AddWindow ({
149- ID = ' installWindow ' ,
150- WindowTitle = ' Script Installed ' ,
161+ function installWindow . On . installWindow . Close ( ev )
162+ disp : ExitLoop ()
163+ end
151164
152- ui :VGroup {
153- ID = ' root' ,
154- FixedSize = { 400 , 200 },
155- ui :Label { ID = ' Label1' , Text = ' The Script was Successfully Installed!\n Please Reopen the Script from "Workflow/Scripts/Asher Roland 1000 Subs"' , WordWrap = true , Alignment = { AlignCenter = true }, Weight = 1 , StyleSheet = [[ color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
156- ui :Button { ID = ' Butt1' , Text = ' Okay!(Close)' , Flat = false , Checkable = false , Weight = 0.15 , StyleSheet = [[ color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
157- }
158- })
165+ function installWindow .On .Butt1 .Clicked (ev )
166+ disp :ExitLoop ()
167+ end
159168
160- function installWindow .On .installWindow .Close (ev )
161- disp :ExitLoop ()
162- end
169+ installWindow :RecalcLayout ()
170+ installWindow :Show ()
171+ disp :RunLoop ()
172+ installWindow :Hide ()
173+ do return end
174+ else
175+ local installWindow = disp :AddWindow ({
176+ ID = ' installWindow' ,
177+ WindowTitle = ' Script Failed to Install' ,
178+
179+ ui :VGroup {
180+ ID = ' root' ,
181+ FixedSize = { 400 , 200 },
182+ ui :Label { ID = ' Label1' , Text = ' The Script Could NOT be installed! Please manually move the "Asher Roland 1000 Subs" folder to your "Scripts/Utility/" folder' , WordWrap = true , Alignment = { AlignCenter = true }, Weight = 1 , StyleSheet = [[ color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
183+ ui :Button { ID = ' Butt1' , Text = ' Okay!(Close)' , Flat = false , Checkable = false , Weight = 0.15 , StyleSheet = [[ color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
184+ }
185+ })
163186
164- function installWindow .On .Butt1 . Clicked (ev )
165- disp :ExitLoop ()
166- end
187+ function installWindow .On .installWindow . Close (ev )
188+ disp :ExitLoop ()
189+ end
167190
168- installWindow :RecalcLayout ()
169- installWindow :Show ()
170- disp :RunLoop ()
171- installWindow :Hide ()
172- do return end
191+ function installWindow .On .Butt1 .Clicked (ev )
192+ disp :ExitLoop ()
193+ end
194+
195+ installWindow :RecalcLayout ()
196+ installWindow :Show ()
197+ disp :RunLoop ()
198+ installWindow :Hide ()
199+ do return end
200+ end
173201end
174202
175203comp :StartUndo (' RPG' ) -- Save Pre-Game Comp State
0 commit comments