downloader.au3 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181
  1. #NoTrayIcon
  2. #include-once
  3. #include <ButtonConstants.au3>
  4. #include <EditConstants.au3>
  5. #include <GUIConstantsEx.au3>
  6. #include <StaticConstants.au3>
  7. #include <WindowsConstants.au3>
  8. #include <FontConstants.au3>
  9. #include <TrayConstants.au3>
  10. #include <MsgBoxConstants.au3>
  11. #include <Process.au3>
  12. #include <Misc.au3>
  13. #include <Timers.au3>
  14. #include <FileConstants.au3>
  15. #include <WinAPIFiles.au3>
  16. #include "GIFAnimation.au3"
  17. #include <WinAPI.au3>
  18. #include <Sound.au3>
  19. #include <MetroGUI_UDF.au3>
  20. #include <file.au3>
  21. #include <AutoItConstants.au3>
  22. #include <DateTimeConstants.au3>
  23. #include <Date.au3>
  24. #include <String.au3>
  25. #pragma compile(Out, Apagado y Reinicio Automatico RC.exe)
  26. #pragma compile(Icon, C:\Users\manue\Downloads\Capture10.ico)
  27. #pragma compile(Compatibility, Windows 7 / 8/ 8.1/ 10)
  28. #pragma compile(CompanyName, 'Next Generation Technologies of Phoenix.')
  29. #pragma compile(FileVersion, 3.0.2.0, 11.15.2017)
  30. #pragma compile(FileDescription, Este Programa es Gratuito y NO Tiene Garantias.)
  31. $Spanish = False
  32. If _Singleton("Por Manuel Hernandez", 1) = 0 Then
  33. Exit
  34. EndIf
  35. If Not StringRight(@OSLang, 2) = "09" Or Not StringRight(@OSLang, 2) = "0a" Then
  36. MsgBox(0, "Warning", "Sorry!" & @CRLF & "Your System's Languaje is not supported by this application!!", 0)
  37. Exit
  38. EndIf
  39. $laguage = StringRight(@OSLang, 2)
  40. If $laguage = "0a" Then $Spanish = True
  41. Select
  42. Case (@OSVersion = "WIN_10")
  43. Case (@OSVersion = "WIN_8")
  44. Case (@OSVersion = "WIN_81")
  45. Case (@OSVersion = "WIN_7")
  46. Case (@OSVersion = "WIN_VISTA")
  47. Case Else
  48. If $Spanish = True Then
  49. MsgBox($MB_TOPMOST, "Aviso!", "Tu OS es: " & @OSVersion & " el cual no es compatible con esta version del programa :(", 0)
  50. Exit
  51. Else
  52. MsgBox($MB_TOPMOST, "Warning!", "Your OS is: " & @OSVersion & " which is not compatible with this version of the program :(", 0)
  53. Exit
  54. EndIf
  55. ;Else
  56. EndSelect
  57. Global $Abort
  58. Global $Restart
  59. Global $Shutdown
  60. Global $Month = @MON
  61. Global $TimeSplit2[7] = ["cero", "uno", "dos", "tres", "cuatro", "cinco", "seis"]
  62. Global $MonthNumberInDP = ""
  63. Global $InputTime = ""
  64. Global $AlarmTime = ""
  65. Global $Tiempo = ""
  66. Global $timer = ""
  67. Global $Form1 = ""
  68. Global $Form2 = ""
  69. Global $Check1 = ""
  70. Global $Checked = False
  71. Global $Update = False
  72. Global $aAlarmTime = ""
  73. Global $idComboBox = ""
  74. Global $Dia = ""
  75. Global $Hora = ""
  76. Global $Hora2 = ""
  77. Global $ExactDay = ""
  78. Global $ExactYear = ""
  79. Global $ExactMonth = ""
  80. Global $iDateCalc = ""
  81. Global $anosdiff = ""
  82. Global $MesesDff = ""
  83. Global $DiasDiff = ""
  84. Global $Ditails = False
  85. Global $DitailsLabel = ""
  86. Global $Ditailslabel2 = ""
  87. Global $AlarmLabel = ""
  88. Global $Name = ""
  89. Global $Yearslabel = ""
  90. Global $Monthslabel = ""
  91. Global $Dayslabel = ""
  92. Global $Datelabel = ""
  93. Global $aboutLabel = ""
  94. Global $Contactlabel = ""
  95. Global $Updatelabel = ""
  96. Global $Exitlabel = ""
  97. Global $ProductNamelabel = ""
  98. Global $VersionLabel = ""
  99. Global $Label3label = ""
  100. Global $Label4label = ""
  101. Global $Label5label = ""
  102. Global $Label6label = ""
  103. Global $VersionLabellabel = ""
  104. Global $YesNoContactlabel = ""
  105. Global $Warninglabel = ""
  106. Global $Decidedlabel = ""
  107. Global $formulario3label1 = ""
  108. Global $formulario3label2 = ""
  109. Global $formulario3label3 = ""
  110. Global $formulario3label4 = ""
  111. Global $formulario3label5 = ""
  112. Global $formulario3botonlabel = ""
  113. Global $formulario3botonlabel2 = ""
  114. Global $Sendingmessage = ""
  115. Global $messagesent = ""
  116. Global $Utility = ""
  117. Global $EmailError = ""
  118. Global $error = ""
  119. Global $errorCode = ""
  120. Global $Description = ""
  121. Global $Menulabel = ""
  122. Global $select = ""
  123. Global $selecttime = ""
  124. Global $AlarmTimeminutes = ""
  125. Global $selectalarmtime = ""
  126. Global $advertencia = ""
  127. Global $thesystem = ""
  128. Global $thesystem2
  129. Global $Thetimeyouinput = ""
  130. Global $whichisless = ""
  131. Global $youinput = ""
  132. Global $TimeSplit = ""
  133. Global $time = ""
  134. Global $youinput = ""
  135. Global $Which = ""
  136. Global $and = ""
  137. Global $with = ""
  138. Global $Hoursand = ""
  139. Global $minutesand = ""
  140. Global $secondsof = ""
  141. Global $theEstimated = ""
  142. Global $anoo = ""
  143. Global $Mes = ""
  144. Global $Diaa = ""
  145. Global $msgbox = ""
  146. Global $HoraSplit[4]
  147. ; Setting Time Variables
  148. $15s = 15000
  149. $30s = 30000
  150. $45s = 45000
  151. $1m = 60000
  152. $1mm = 90000
  153. $2m = 120000
  154. $3m = 180000
  155. $5m = 300000
  156. $10m = 600000
  157. $15m = 900250
  158. $30m = 1800500
  159. $45m = 2700750
  160. $1h = 3601000
  161. $1hm = 5401500
  162. $2h = 7202000
  163. $2hm = 9002500
  164. $3h = 10803000
  165. $3hm = 12603500
  166. $4h = 14404000
  167. $4hm = 16204500
  168. $5h = 18005000
  169. $5hm = 19805500
  170. $6h = 21606000
  171. $6hm = 23406500
  172. $7h = 25207000
  173. $8h = 28808000
  174. $9h = 32409000
  175. $12h = 43212000
  176. $15h = 54015000
  177. $18h = 64818000
  178. $24h = 86424000
  179. If $Spanish = True Then Spanish()
  180. Func Spanish()
  181. If @MON = 01 Then $Month = "Enero"
  182. If @MON = 02 Then $Month = "Febrero"
  183. If @MON = 03 Then $Month = "Marzo"
  184. If @MON = 04 Then $Month = "Abril"
  185. If @MON = 05 Then $Month = "Mayo"
  186. If @MON = 06 Then $Month = "Junio"
  187. If @MON = 07 Then $Month = "Julio"
  188. If @MON = 08 Then $Month = "Agosto"
  189. If @MON = 09 Then $Month = "Septiembre"
  190. If @MON = 10 Then $Month = "Octubre"
  191. If @MON = 11 Then $Month = "Noviembre"
  192. If @MON = 12 Then $Month = "Deciembre"
  193. Global $Months[12] = ["01 Enero", "02 Febrero", "03 Marzo", "04 Abril", "05 Mayo", "06 Junio", "07 Julio", "08 Agosto", "09 Septiembre", "10 Octubre", "11 Noviembre", "12 Diciembre"]
  194. $InputTime = "Ingrese el Tiempo ==>"
  195. $AlarmTime = "Tiempo de Alarma =>"
  196. $Abort = "Abortar"
  197. $Restart = "Reiniciar"
  198. $Shutdown = "Apagar"
  199. $Ditailslabel2 = "Detalles"
  200. $AlarmLabel = "Alarma"
  201. $DitailsLabel = "? Detalles ?"
  202. $Name = "Apagado y Reinicio Automatico"
  203. $VersionLabellabel = "Versi¨®n RC"
  204. $Yearslabel = "A?os"
  205. $Monthslabel = "Meses"
  206. $Dayslabel = "Dias"
  207. $Datelabel = "Horas, Minutos y Segundos: "
  208. $aboutLabel = "Acerca de"
  209. $Contactlabel = "Contacto"
  210. $Updatelabel = "Actualizar"
  211. $Exitlabel = "Salir"
  212. $ProductNamelabel = "Producto: Utilidad de Apagado y Reinicio Automatico RC"
  213. $VersionLabel = "Versi¨®n 3.0.2.0, 11.15.2017"
  214. $Label3label = "Comentarios: Este Programa es Gratuito, Si Pag¨® Alguna Cantidad de Dinero Exija su Devolucion"
  215. $Label4label = "Sugerencias: Mande sus Sugerecias a: manuelcipote31@gmail.com"
  216. $Label5label = "Derechos Reservados: Todos los derechos Reservados 2017 - 2021"
  217. $Label6label = "Autor: Manuel Hern¨¢ndez"
  218. $YesNoContactlabel = "Mande sus Sugerecias o Inquietudes a: manuelcipote31@gmail.com" & @LF & "Le Gustaria Mandarme un Email Ahora?" & @LF & "Presione 'Yes' para Mandarlo Ahora Mismo."
  219. $Warninglabel = "Aviso"
  220. $Decidedlabel = "Desidio no mandar E-mail"
  221. $formulario3label1 = "Llene el formulario"
  222. $formulario3label2 = "Presione 'Cancelar' para anular o Presione 'Listo!' para enviar"
  223. $formulario3label3 = "Escriba su Nombre"
  224. $formulario3label4 = "Escriba su E-mail"
  225. $formulario3label5 = "Escriba un Mensaje"
  226. $formulario3botonlabel = "Listo!"
  227. $formulario3botonlabel2 = "Cancelar"
  228. $Utility = "Utilidad"
  229. $Sendingmessage = "Enviando tu Mensaje!..."
  230. $messagesent = "Mensaje Enviado!"
  231. $EmailError = "Error mandando el mensaje!"
  232. $errorCode = "Codigo de Error:"
  233. $Description = "Descripci¨®n"
  234. $Menulabel = "men¨²"
  235. $select = "Seleccione"
  236. $selecttime = "Seleccione el Tiempo"
  237. $AlarmTimeminutes = "15 Segundos|30 Segundos|45 Segundos|1 Minuto|1 Minuto y Medio|2 Minutos|3 Minutos"
  238. $selectalarmtime = "No ha Seleccionado Tiempo de Alarma!" & @LF & "Seleccione Tiempo de Alarma o Apague El Switch (Alarma)"
  239. $advertencia = "Advertencia"
  240. $thesystem = "El Sistema Reiniciara en:"
  241. $thesystem2 = "El Sistema se Apagara en:"
  242. $Thetimeyouinput = "El tiempo que ingreso es invalido!" & @LF & "Usted ingreso: "
  243. $whichisless = " el cual es menor que: "
  244. $youinput = "Usted ingreso: "
  245. $Which = " el cual es "
  246. $and = " y "
  247. $with = " con "
  248. $Hoursand = " horas y "
  249. $minutesand = " minutos y "
  250. $secondsof = " segundos de diferencia de "
  251. $theEstimated = "El tiempo estimado es: "
  252. $anoo = " a?o, "
  253. $Mes = " mes "
  254. $Diaa = " dia "
  255. EndFunc ;==>Spanish
  256. If $Spanish = False Then English()
  257. Func English()
  258. If @MON = 01 Then $Month = "January"
  259. If @MON = 02 Then $Month = "February"
  260. If @MON = 03 Then $Month = "March"
  261. If @MON = 04 Then $Month = "April"
  262. If @MON = 05 Then $Month = "May"
  263. If @MON = 06 Then $Month = "June"
  264. If @MON = 07 Then $Month = "July"
  265. If @MON = 08 Then $Month = "August"
  266. If @MON = 09 Then $Month = "September"
  267. If @MON = 10 Then $Month = "October"
  268. If @MON = 11 Then $Month = "November"
  269. If @MON = 12 Then $Month = "December"
  270. Global $Months[12] = ["01 January", "02 February", "03 March", "04 April", "05 May", "06 June", "07 July", "08 August", "09 September", "10 October", "11 November", "12 December"]
  271. $Abort = "Abort"
  272. $Restart = "Restart"
  273. $Shutdown = "Shutdown"
  274. $Ditailslabel2 = "Details"
  275. $AlarmLabel = "Alarm"
  276. $InputTime = "Input Time ==> ==>"
  277. $AlarmTime = "Alarm Time ==> ==>"
  278. $DitailsLabel = "? Details ?"
  279. $Name = "Automatic Shutdown and Restart"
  280. $VersionLabellabel = "RC Version"
  281. $Yearslabel = "Years"
  282. $Monthslabel = "Months"
  283. $Dayslabel = "Days"
  284. $Datelabel = "Hours, Minutes and Seconds: "
  285. $aboutLabel = "About"
  286. $Contactlabel = "Contact"
  287. $Updatelabel = "Update"
  288. $Exitlabel = "Exit"
  289. $ProductNamelabel = "Product Name: Automatic Shutdown and Restart Utility RC"
  290. $VersionLabel = "Version 3.0.2.0, 11.15.2017"
  291. $Label3label = "Comments: This Software is totally free, If You Paid Any Money Ask For A Refund"
  292. $Label4label = "Suggestions: Send Your Suggestions to: manuelcipote31@gmail.com"
  293. $Label5label = "Copyrights: All Rights Reserved 2017 - 2021"
  294. $Label6label = "Author: Manuel Hern¨¢ndez"
  295. $YesNoContactlabel = "Send Your Suggestions or Concerns to: manuelcipote31@gmail.com" & @LF & "Would You Like to Send us an Email Right Now?" & @LF & "Press 'Yes' to Send it Right Now."
  296. $Warninglabel = "Warning"
  297. $Decidedlabel = "You've Decided not to send an E-mail"
  298. $formulario3label1 = "Fill the form"
  299. $formulario3label2 = "Press 'Cancel' to cancel or Press 'Ready!' to send"
  300. $formulario3label3 = "Write Your Name"
  301. $formulario3label4 = "Write your E-mail"
  302. $formulario3label5 = "Write a Menssaje"
  303. $formulario3botonlabel = "Ready!"
  304. $formulario3botonlabel2 = "Cancel"
  305. $Utility = "Utility"
  306. $Sendingmessage = "Sending Your Message!..."
  307. $messagesent = "Menssage Sent!"
  308. $EmailError = "Error sending message!"
  309. $errorCode = "Error Code:"
  310. $Description = "Description"
  311. $Menulabel = "menu"
  312. $select = "Select"
  313. $selecttime = "Select Time"
  314. $AlarmTimeminutes = "15 Seconds|30 Seconds|45 Seconds|1 Minute|1 Minute and 1/2|2 Minutes|3 Minutes"
  315. $selectalarmtime = "You haven't selected the alarm time!" & @LF & "Select the alarm time or turn off the switch (Alarm)"
  316. $advertencia = "Warning"
  317. $thesystem = "The System will Restart in:"
  318. $thesystem2 = "The System will Shutdown in:"
  319. $Thetimeyouinput = "The Time you input is invalid!" & @LF & "You input: "
  320. $whichisless = " which is less than: "
  321. $youinput = "You input: "
  322. $Which = " which is "
  323. $and = " and "
  324. $with = " with "
  325. $Hoursand = " hours and "
  326. $minutesand = " minutes with "
  327. $secondsof = " seconds of difference of "
  328. $theEstimated = "The estimated time is: "
  329. $anoo = " year, "
  330. $Mes = " month "
  331. $Diaa = " day "
  332. EndFunc ;==>English
  333. $WorkingPath = @TempDir & "\Mannyfresh" & Random(100000, 999999, 1) ; Unique directory.
  334. $creardir = DirCreate($WorkingPath)
  335. If $creardir = 1 Then
  336. Else
  337. MsgBox(0, "Aviso", "Couldn't Setup App", 0)
  338. Exit
  339. EndIf
  340. ;Installing Sound
  341. FileInstall("D:\Files\admin\Downloads\BOMB_SIREN-BOMB_SIREN-247265934.wav", $WorkingPath & "\BOMB_SIREN-BOMB_SIREN-247265934.wav", 1)
  342. $Alarm = $WorkingPath & "\BOMB_SIREN-BOMB_SIREN-247265934.wav"
  343. ;installing Graphics
  344. FileInstall("C:\blue.jpg", $WorkingPath & "\blue.jpg", 1)
  345. FileInstall("D:\Files\admin\Pictures\Capture10.jpg", $WorkingPath & "\Capture10.jpg", 1)
  346. FileInstall("C:\spinner.gif", $WorkingPath & "\spinner.gif", 1)
  347. ;setting blinking text
  348. $s_text = $advertencia
  349. $RED = 1
  350. $sec = @SEC
  351. $Check1 = ""
  352. $GLOBAL_MAIN_GUI = $Form1
  353. GUIRegisterMsg(0x0201, "INTERNAL_WM_LBUTTONDOWN")
  354. ;##################################
  355. ;Email Sender
  356. ;##################################
  357. ; Include
  358. ;##################################
  359. ;#Include<file.au3>
  360. ;##################################
  361. ; Variables
  362. ;##################################
  363. $SmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED
  364. $FromName = "Apagado y Reinicio Automatico RC" ; name from who the email was sent
  365. $FromAddress = "Your E-mail goes here" ; address from where the mail should come
  366. $ToAddress = "to E-mail Address" ; destination address of the email - REQUIRED
  367. $Subject = "User info 2.0 Delta RC" ; subject from the email - can be anything you want it to be
  368. $Body = "Esto es una prueva" ; the messagebody from the mail - can be left blank but then you get a blank mail
  369. $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed
  370. $CcAddress = "some email address here" ; address for cc - leave blank if not needed
  371. $BccAddress = "some email address here" ; address for bcc - leave blank if not needed
  372. $Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
  373. $Username = "Your E-mail goes here" ; username for the account used from where the mail gets sent - REQUIRED
  374. $Password = "your password goes here" ; password for the account used from where the mail gets sent - REQUIRED
  375. $IPPort = 465 ; port used for sending the mail
  376. $ssl = 1 ; enables/disables secure socket layer sending - put to 1 if using httpS
  377. ;~ $IPPort=465 ; GMAIL port used for sending the mail
  378. ;~ $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS
  379. ;##################################
  380. ; Script
  381. ;##################################
  382. Func SendEmail()
  383. ; for $i = 1 to 20
  384. $Splash = SplashTextOn($Utility, $Sendingmessage, 460, 219, 255, 124, $DLG_CENTERONTOP, "", 24)
  385. WinSetTrans($Splash, "", 150)
  386. Global $oMyRet[2]
  387. Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
  388. $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
  389. If @error Then
  390. SplashOff()
  391. $Update = False
  392. MsgBox(0, $EmailError, $errorCode & @error & $Description & $rc)
  393. Else
  394. SplashOff()
  395. $Update = False
  396. _Metro_MsgBox(0, $Warninglabel, $messagesent, 300, 11, $GLOBAL_MAIN_GUI)
  397. EndIf
  398. EndFunc ;==>SendEmail
  399. ;
  400. ; The UDF
  401. Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance = "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
  402. Local $objEmail = ObjCreate("CDO.Message")
  403. $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
  404. $objEmail.To = $s_ToAddress
  405. Local $i_Error = 0
  406. Local $i_Error_desciption = ""
  407. If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
  408. If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
  409. $objEmail.Subject = $s_Subject
  410. If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
  411. $objEmail.HTMLBody = $as_Body
  412. Else
  413. $objEmail.Textbody = $as_Body & @CRLF
  414. EndIf
  415. If $s_AttachFiles <> "" Then
  416. Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
  417. For $x = 1 To $S_Files2Attach[0]
  418. $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
  419. ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
  420. If FileExists($S_Files2Attach[$x]) Then
  421. ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF)
  422. $objEmail.AddAttachment($S_Files2Attach[$x])
  423. Else
  424. ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
  425. SetError(1)
  426. Return 0
  427. EndIf
  428. Next
  429. EndIf
  430. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  431. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
  432. If Number($IPPort) = 0 Then $IPPort = 25
  433. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
  434. ;Authenticated SMTP
  435. If $s_Username <> "" Then
  436. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
  437. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
  438. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
  439. EndIf
  440. If $ssl Then
  441. $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
  442. EndIf
  443. ;Update settings
  444. $objEmail.Configuration.Fields.Update
  445. ; Set Email Importance
  446. Switch $s_Importance
  447. Case "High"
  448. $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "High"
  449. Case "Normal"
  450. $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal"
  451. Case "Low"
  452. $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Low"
  453. EndSwitch
  454. $objEmail.Fields.Update
  455. ; Sent the Message
  456. $objEmail.Send
  457. If @error Then
  458. SetError(2)
  459. Return $oMyRet[1]
  460. EndIf
  461. $objEmail = ""
  462. EndFunc ;==>_INetSmtpMailCom
  463. ;
  464. ;
  465. ; Com Error Handler
  466. Func MyErrFunc()
  467. $HexNumber = Hex($oMyError.number, 8)
  468. $oMyRet[0] = $HexNumber
  469. $oMyRet[1] = StringStripWS($oMyError.description, 3)
  470. ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
  471. SetError(1) ; something to check for when this function returns
  472. Return
  473. EndFunc ;==>MyErrFunc
  474. ;#######################################################################################################
  475. ;Email Sender bottom End
  476. ;########################################################################################################
  477. ;=======================================================================Creating the GUI===============================================================================
  478. ;Set Theme
  479. _SetTheme("DarkBlue")
  480. _Metro_EnableHighDPIScaling()
  481. ; GUI Size
  482. Global $startWidth = 464, $startHeight = 249
  483. Global $endWidth = $startWidth, $endHeight = 400
  484. $GLOBAL_MAIN_GUI = _Metro_CreateGUI("Por Manuel Hernandez", 464, 249, 255, 124, False)
  485. $Control_Buttons = _Metro_AddControlButtons(True, False, True, False, True) ;CloseBtn = True, MaximizeBtn = True, MinimizeBtn = True, FullscreenBtn = True, MenuBtn = True
  486. ;Set variables for the handles of the GUI-Control buttons.
  487. $GUI_CLOSE_BUTTON = $Control_Buttons[0]
  488. GUICtrlSetTip($GUI_CLOSE_BUTTON, $Exitlabel)
  489. $GUI_MAXIMIZE_BUTTON = $Control_Buttons[1]
  490. $GUI_RESTORE_BUTTON = $Control_Buttons[2]
  491. $GUI_MINIMIZE_BUTTON = $Control_Buttons[3]
  492. $GUI_FULLSCREEN_BUTTON = $Control_Buttons[4]
  493. $GUI_FSRestore_BUTTON = $Control_Buttons[5]
  494. $GUI_MENU_BUTTON = $Control_Buttons[6]
  495. GUICtrlSetTip($GUI_MENU_BUTTON, $Menulabel)
  496. ;======================================================================================================================================================================
  497. ;Create Buttons
  498. $Button1 = _Metro_CreateButton($Shutdown, 224, 217, 78, 25)
  499. $Button2 = _Metro_CreateButton($Restart, 306, 217, 75, 25)
  500. $Button3 = _Metro_CreateButton($Abort, 385, 217, 75, 25)
  501. ;Create Toggle
  502. $Toggle1 = _Metro_CreateToggle($AlarmLabel, 3, 147, 120, 34)
  503. GUICtrlSetTip($Toggle1, "On/Off")
  504. ;Create Checkboxes
  505. $Checkbox1 = _Metro_CreateCheckbox($Ditailslabel2, 3, 120, 85, 25)
  506. ;
  507. ;Create an Array containing menu button names
  508. Dim $MenuButtonsArray[4] = [$aboutLabel, $Contactlabel, $Updatelabel, $Exitlabel]
  509. #Region ### START Koda GUI section ### Form=
  510. $LabelNext = GUICtrlCreateLabel("Next", 100, 0, 60, 39, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  511. GUICtrlSetColor(-1, 0xFFFFFF)
  512. GUICtrlSetFont(-1, 22, 0, 0, "Impact")
  513. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  514. $LabelGen = GUICtrlCreateLabel("Generation", 60, 10, 300, 70, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  515. GUICtrlSetColor(-1, 0xFFFFFF)
  516. GUICtrlSetFont(-1, 45, $FW_BOLD, 0, "Impact")
  517. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  518. $LabelTech = GUICtrlCreateLabel("Technologies of Phoenix", 10, 65, 463, 50, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  519. GUICtrlSetColor(-1, 0xFFFFFF)
  520. GUICtrlSetFont(-1, 28, $FW_BOLD, 0, "Impact")
  521. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  522. $Label1 = GUICtrlCreateLabel($Name, 45, 119, 366, 33, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  523. GUICtrlSetColor($Label1, 0xFFFFFF)
  524. GUICtrlSetFont(-1, 16, 0, 0, "Impact")
  525. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  526. $Label0 = GUICtrlCreateLabel($VersionLabellabel, 367, 130, 96, 25, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  527. GUICtrlSetColor($Label0, 0xFFFFFF)
  528. GUICtrlSetFont(-1, 11, 0, 0, "Impact")
  529. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  530. ;
  531. ; Create a combobox2 control.
  532. $idComboBox2 = GUICtrlCreateCombo($select, 130, 221, 90, 21)
  533. GUICtrlSetTip(-1, $selecttime)
  534. ; Add additional items to the combobox.
  535. GUICtrlSetData($idComboBox2, $AlarmTimeminutes, $select)
  536. ;
  537. $LabelD = GUICtrlCreateLabel($InputTime, 3, 183, 160, 25)
  538. GUICtrlSetColor(-1, 0xFFFFFF)
  539. GUICtrlSetFont(-1, 12, 0, 0, "Impact")
  540. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  541. $Label3 = GUICtrlCreateLabel($AlarmTime, 3, 223, 120, 25, "", $GUI_WS_EX_PARENTDRAG)
  542. GUICtrlSetColor(-1, 0xFFFFFF)
  543. GUICtrlSetFont(-1, 10, 0, 0, "Impact")
  544. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  545. $Inputtimer = GUICtrlCreateInput("00:00:00", 370, 150, 90, 25, BitOR($SS_CENTER, $ES_READONLY))
  546. GUICtrlSetFont(-1, 10, 0, 0)
  547. $idDate = GUICtrlCreateDate("", 165, 181, 200, 25)
  548. $idDate2 = GUICtrlCreateDate("", 370, 181, 90, 25, $DTS_TIMEFORMAT)
  549. $Graphic1 = GUICtrlCreatePic($WorkingPath & "\blue.jpg", 5, 250, 455, 145)
  550. GUICtrlSetState($Graphic1, $GUI_DISABLE)
  551. GUICtrlSetResizing($Graphic1, 768 + 2 + 32)
  552. $LabelDetalles = GUICtrlCreateLabel($DitailsLabel, 7, 250, 450, 45, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  553. GUICtrlSetColor(-1, 0xFFFFFF)
  554. GUICtrlSetFont(-1, 20)
  555. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  556. GUICtrlSetResizing($LabelDetalles, 768 + 2 + 32)
  557. $LabelTime = GUICtrlCreateLabel($Datelabel & "00:00:00", 10, 362, 450, 40, "", $GUI_WS_EX_PARENTDRAG)
  558. GUICtrlSetColor($LabelTime, 0xFFFFFF)
  559. GUICtrlSetFont(-1, 20, 700, 0, "Calibri")
  560. GUICtrlSetBkColor($LabelTime, $GUI_BKCOLOR_TRANSPARENT)
  561. GUICtrlSetResizing($LabelTime, 768 + 2 + 32)
  562. $LabelDias = GUICtrlCreateLabel($Dayslabel & ": 0", 10, 337, 450, 40, "", $GUI_WS_EX_PARENTDRAG)
  563. GUICtrlSetColor(-1, 0xFFFFFF)
  564. GUICtrlSetFont(-1, 20, 700, 0, "Calibri")
  565. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  566. GUICtrlSetResizing($LabelDias, 768 + 2 + 32)
  567. $LabelMeses = GUICtrlCreateLabel($Monthslabel & ": 0", 10, 312, 450, 40, "", $GUI_WS_EX_PARENTDRAG)
  568. GUICtrlSetColor(-1, 0xFFFFFF)
  569. GUICtrlSetFont(-1, 20, 700, 0, "Calibri")
  570. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  571. GUICtrlSetResizing($LabelMeses, 768 + 2 + 32)
  572. $LabelAnos = GUICtrlCreateLabel($Yearslabel & ": 0", 10, 287, 450, 40, "", $GUI_WS_EX_PARENTDRAG)
  573. GUICtrlSetColor(-1, 0xFFFFFF)
  574. GUICtrlSetFont(-1, 20, 700, 0, "Calibri")
  575. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  576. GUICtrlSetResizing($LabelAnos, 768 + 2 + 32)
  577. GUISetState(@SW_SHOW)
  578. #EndRegion ### END Koda GUI section ###
  579. GUICtrlSetResizing($Button1, 768 + 2 + 32)
  580. GUICtrlSetResizing($Button2, 768 + 2 + 32)
  581. GUICtrlSetResizing($Button3, 768 + 2 + 32)
  582. GUICtrlSetResizing($Toggle1, 768 + 2 + 32)
  583. GUICtrlSetResizing($Checkbox1, 768 + 2 + 32)
  584. GUICtrlSetResizing($LabelNext, 768 + 2 + 32)
  585. GUICtrlSetResizing($LabelGen, 768 + 2 + 32)
  586. GUICtrlSetResizing($LabelTech, 768 + 2 + 32)
  587. GUICtrlSetResizing($Label1, 768 + 2 + 32)
  588. GUICtrlSetResizing($Label0, 768 + 2 + 32)
  589. GUICtrlSetResizing($idComboBox2, 768 + 2 + 32)
  590. GUICtrlSetResizing($LabelD, 768 + 2 + 32)
  591. GUICtrlSetResizing($Label3, 768 + 2 + 32)
  592. GUICtrlSetResizing($Inputtimer, 768 + 2 + 32)
  593. GUICtrlSetResizing($idDate, 768 + 2 + 32)
  594. GUICtrlSetResizing($idDate2, 768 + 2 + 32)
  595. Func expand()
  596. For $x = $startHeight To $endHeight Step 6
  597. WinMove("", "", Default, Default, $startWidth, $x)
  598. Sleep(PixelsToPercent($startHeight, $x, $endHeight) * 1)
  599. Next
  600. EndFunc ;==>expand
  601. Func contract()
  602. For $x = $endHeight To $startHeight Step -6
  603. WinMove("", "", Default, Default, $startWidth, $x)
  604. Sleep(PixelsToPercent($startHeight, $x, $endHeight) * 1)
  605. Next
  606. EndFunc ;==>contract
  607. Func PixelsToPercent($min, $current, $max)
  608. Return ($current - $min) / ($max - $min)
  609. EndFunc ;==>PixelsToPercent
  610. While 1
  611. _Metro_HoverCheck_Loop($GLOBAL_MAIN_GUI)
  612. $nMsg = GUIGetMsg()
  613. Switch $nMsg
  614. Case $GUI_EVENT_CLOSE
  615. DirRemove($WorkingPath, 1)
  616. ExitLoop
  617. Exit
  618. Case $Checkbox1
  619. If _Metro_CheckboxIsChecked($Checkbox1) Then
  620. _Metro_CheckboxUnCheck($Checkbox1)
  621. contract()
  622. $Ditails = False
  623. Else
  624. _Metro_CheckboxCheck($Checkbox1)
  625. expand()
  626. $Ditails = True
  627. EndIf
  628. Case $Button2
  629. $Dia = GUICtrlRead($idDate)
  630. $Hora = GUICtrlRead($idDate2)
  631. $Hora2 = $Hora
  632. If StringInStr($Hora2, "AM") Or StringInStr($Hora2, "PM") Or StringInStr($Hora2, "A.M.") Or StringInStr($Hora2, "P.M.") Then
  633. Select
  634. Case StringInStr($Hora2, "AM")
  635. $HoraSplit = StringSplit($Hora2, ":")
  636. If $HoraSplit[1] < 10 Then $Hora2 = "0" & $Hora2
  637. If $HoraSplit[1] = 12 Then $Hora2 = StringReplace($Hora2, "12", "00", 1)
  638. $Hora2 = StringTrimRight($Hora2, 2)
  639. Case StringInStr($Hora2, "PM")
  640. $HoraSplit = StringSplit($Hora2, ":")
  641. If $HoraSplit[1] = 1 Then $Hora2 = StringReplace($Hora2, "1", "13", 1)
  642. If $HoraSplit[1] = 2 Then $Hora2 = StringReplace($Hora2, "2", "14", 1)
  643. If $HoraSplit[1] = 3 Then $Hora2 = StringReplace($Hora2, "3", "15", 1)
  644. If $HoraSplit[1] = 4 Then $Hora2 = StringReplace($Hora2, "4", "16", 1)
  645. If $HoraSplit[1] = 5 Then $Hora2 = StringReplace($Hora2, "5", "17", 1)
  646. If $HoraSplit[1] = 6 Then $Hora2 = StringReplace($Hora2, "6", "18", 1)
  647. If $HoraSplit[1] = 7 Then $Hora2 = StringReplace($Hora2, "7", "19", 1)
  648. If $HoraSplit[1] = 8 Then $Hora2 = StringReplace($Hora2, "8", "20", 1)
  649. If $HoraSplit[1] = 9 Then $Hora2 = StringReplace($Hora2, "9", "21", 1)
  650. If $HoraSplit[1] = 10 Then $Hora2 = StringReplace($Hora2, "10", "22", 1)
  651. If $HoraSplit[1] = 11 Then $Hora2 = StringReplace($Hora2, "11", "23", 1)
  652. StringTrimRight($Hora2, 2)
  653. Case StringInStr($Hora2, "P.M.")
  654. $Hora2 = StringTrimRight($Hora2, 4)
  655. $HoraSplit[1] = StringLeft($Hora2, 2)
  656. If $HoraSplit[1] = 01 Then $Hora2 = StringReplace($Hora2, "01", "13", 1)
  657. If $HoraSplit[1] = 02 Then $Hora2 = StringReplace($Hora2, "02", "14", 1)
  658. If $HoraSplit[1] = 03 Then $Hora2 = StringReplace($Hora2, "03", "15", 1)
  659. If $HoraSplit[1] = 04 Then $Hora2 = StringReplace($Hora2, "04", "16", 1)
  660. If $HoraSplit[1] = 05 Then $Hora2 = StringReplace($Hora2, "05", "17", 1)
  661. If $HoraSplit[1] = 06 Then $Hora2 = StringReplace($Hora2, "06", "18", 1)
  662. If $HoraSplit[1] = 07 Then $Hora2 = StringReplace($Hora2, "07", "19", 1)
  663. If $HoraSplit[1] = 08 Then $Hora2 = StringReplace($Hora2, "08", "20", 1)
  664. If $HoraSplit[1] = 09 Then $Hora2 = StringReplace($Hora2, "09", "21", 1)
  665. If $HoraSplit[1] = 10 Then $Hora2 = StringReplace($Hora2, "10", "22", 1)
  666. If $HoraSplit[1] = 11 Then $Hora2 = StringReplace($Hora2, "11", "23", 1)
  667. Case StringInStr($Hora2, "A.M.")
  668. $Hora2 = StringTrimRight($Hora2, 4)
  669. $HoraSplit[1] = StringLeft($Hora2, 2)
  670. If $HoraSplit[1] = 12 Then $Hora2 = StringReplace($Hora2, "12", "00", 1)
  671. EndSelect
  672. EndIf
  673. For $m = 0 To UBound($Months) - 1
  674. If StringInStr($Dia, StringTrimLeft($Months[$m], 2)) Then
  675. $MonthNumberInDP = StringLeft($Months[$m], 2)
  676. ExitLoop
  677. EndIf
  678. Next
  679. If $laguage = "0a" Then
  680. $DPDay = _StringBetween($Dia, ",", "de", 1, True)
  681. $DPDay = _ArrayToString($DPDay)
  682. Else
  683. $DPDay = StringLeft(StringRight($Dia, 8), 2)
  684. EndIf
  685. $DPDay = StringStripWS($DPDay, 8)
  686. If StringLen($DPDay) = 1 Then $DPDay = StringStripWS("0" & $DPDay, 8)
  687. If _DateTimeFormat(_NowCalc(), 1) = $Dia And $Hora2 < _NowTime(5) Then
  688. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & $Thetimeyouinput & $Hora & $whichisless & _NowTime(), 0)
  689. ContinueLoop
  690. EndIf
  691. If StringRight($Dia, 4) < @YEAR Or StringRight($Dia, 4) >= 3000 Then
  692. If $Spanish = True Then
  693. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & "El a?o que ingreso es invalido!", 0)
  694. Else
  695. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & "The year you input is invalid!", 0)
  696. EndIf
  697. ContinueLoop
  698. EndIf
  699. If StringRight($Dia, 4) = @YEAR And $MonthNumberInDP < @MON Then
  700. If $Spanish = True Then
  701. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & "El mes que ingreso es invalido! ", 0)
  702. Else
  703. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & "The month you input is invalid! ", 0)
  704. EndIf
  705. ContinueLoop
  706. EndIf
  707. If StringRight($Dia, 4) = @YEAR And $MonthNumberInDP = @MON And $DPDay < @MDAY Then
  708. If $Spanish = True Then
  709. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "El Dia que ingreso es invalido! ", 0)
  710. Else
  711. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "The day you input is invalid! ", 0)
  712. EndIf
  713. ContinueLoop
  714. EndIf
  715. $iDateCalc = _DateDiff("s", _NowCalc(), StringRight($Dia, 4) & "/" & $MonthNumberInDP & "/" & $DPDay & " " & $Hora2)
  716. $Tiempo1 = $iDateCalc * 1000
  717. $seconds1 = 0
  718. $diff1 = $seconds1 - ($Tiempo1 / 1000)
  719. ;
  720. $minutes1 = Int($diff1 / 60)
  721. $secondsRem1 = $diff1 - ($minutes1 * 60)
  722. ;
  723. $hours1 = Int($minutes1 / 60)
  724. $minutes1 = $minutes1 - ($hours1 * 60)
  725. $hours1 = $hours1 * -1
  726. $minutes1 = $minutes1 * -1
  727. $secondsRem1 = $secondsRem1 * -1
  728. $time = StringFormat("%02d", $hours1) & ":" & StringFormat("%02d", $minutes1) & ":" & StringFormat("%02d", $secondsRem1)
  729. If StringInStr($time, "-") Then $time = StringReplace($time, "-", "")
  730. ;
  731. $Tiempo = $iDateCalc * 1000
  732. $seconds = 0
  733. $diff = $seconds - ($Tiempo / 1000)
  734. ;
  735. $minutes = Int($diff / 60)
  736. $secondsRem = $diff - ($minutes * 60)
  737. ;
  738. $hours = Int($minutes / 60)
  739. $minutes = $minutes - ($hours * 60)
  740. ;
  741. $ExactDay = Int($hours / 24)
  742. $hours = $hours - ($ExactDay * 24)
  743. ;
  744. $ExactMonth = Int($ExactDay / 30.4375)
  745. $ExactDay = $ExactDay - ($ExactMonth * 30.4375)
  746. ;
  747. $ExactYear = Int($ExactMonth / 12)
  748. $ExactMonth = $ExactMonth - ($ExactYear * 12)
  749. ;
  750. $ExactYear = $ExactYear * -1
  751. $ExactMonth = $ExactMonth * -1
  752. $ExactDay = $ExactDay * -1
  753. $hours = $hours * -1
  754. $minutes = $minutes * -1
  755. $secondsRem = $secondsRem * -1
  756. $time2 = StringFormat("%01d", $ExactYear) & ":" & StringFormat("%01d", $ExactMonth) & ":" & StringFormat("%01d", $ExactDay) & ":" & StringFormat("%01d", $hours) & ":" & StringFormat("%01d", $minutes) & ":" & StringFormat("%01d", $secondsRem)
  757. ;
  758. $TimeSplit = StringSplit($time2, ":")
  759. For $I = 0 To UBound($TimeSplit) - 1
  760. If StringInStr($TimeSplit[$I], "-") Then $TimeSplit[$I] = StringReplace($TimeSplit[$I], "-", "")
  761. Next
  762. ;
  763. $anosdiff = " " & $Yearslabel
  764. $MesesDff = " " & $Monthslabel
  765. $DiasDiff = " " & $Dayslabel
  766. If $TimeSplit[1] = 1 Then $anosdiff = $anoo
  767. If $TimeSplit[2] = 1 Then $MesesDiff = $Mes
  768. If $TimeSplit[3] = 1 Then $DiasDiff = $Diaa
  769. MsgBox($MB_ICONINFORMATION + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, $youinput & $Dia & " " & $Hora & $Which & $TimeSplit[1] & $anosdiff & " " & $TimeSplit[2] & $MesesDff & $and & $TimeSplit[3] & $DiasDiff & $with & $TimeSplit[4] & $Hoursand & $TimeSplit[5] & $minutesand & $TimeSplit[6] & $secondsof & _DateTimeFormat(@YEAR & "/" & @MON & "/" & @MDAY, 2) & " " & _NowTime() & @LF & $theEstimated & $time, 0)
  770. $iDateCalc = _DateDiff("s", _NowCalc(), StringRight($Dia, 4) & "/" & $MonthNumberInDP & "/" & $DPDay & " " & $Hora2)
  771. $iDateCalc = $iDateCalc * 1000
  772. ;------------------------------------------------------------------------------------------
  773. Reiniciar()
  774. Case $Button1
  775. $Dia = GUICtrlRead($idDate)
  776. $Hora = GUICtrlRead($idDate2)
  777. $Hora2 = $Hora
  778. If StringInStr($Hora2, "AM") Or StringInStr($Hora2, "PM") Or StringInStr($Hora2, "A.M.") Or StringInStr($Hora2, "P.M.") Then
  779. Select
  780. Case StringInStr($Hora2, "AM")
  781. $HoraSplit = StringSplit($Hora2, ":")
  782. If $HoraSplit[1] < 10 Then $Hora2 = "0" & $Hora2
  783. If $HoraSplit[1] = 12 Then $Hora2 = StringReplace($Hora2, "12", "00", 1)
  784. $Hora2 = StringTrimRight($Hora2, 2)
  785. Case StringInStr($Hora2, "PM")
  786. $HoraSplit = StringSplit($Hora2, ":")
  787. If $HoraSplit[1] = 1 Then $Hora2 = StringReplace($Hora2, "1", "13", 1)
  788. If $HoraSplit[1] = 2 Then $Hora2 = StringReplace($Hora2, "2", "14", 1)
  789. If $HoraSplit[1] = 3 Then $Hora2 = StringReplace($Hora2, "3", "15", 1)
  790. If $HoraSplit[1] = 4 Then $Hora2 = StringReplace($Hora2, "4", "16", 1)
  791. If $HoraSplit[1] = 5 Then $Hora2 = StringReplace($Hora2, "5", "17", 1)
  792. If $HoraSplit[1] = 6 Then $Hora2 = StringReplace($Hora2, "6", "18", 1)
  793. If $HoraSplit[1] = 7 Then $Hora2 = StringReplace($Hora2, "7", "19", 1)
  794. If $HoraSplit[1] = 8 Then $Hora2 = StringReplace($Hora2, "8", "20", 1)
  795. If $HoraSplit[1] = 9 Then $Hora2 = StringReplace($Hora2, "9", "21", 1)
  796. If $HoraSplit[1] = 10 Then $Hora2 = StringReplace($Hora2, "10", "22", 1)
  797. If $HoraSplit[1] = 11 Then $Hora2 = StringReplace($Hora2, "11", "23", 1)
  798. StringTrimRight($Hora2, 2)
  799. Case StringInStr($Hora2, "P.M.")
  800. $Hora2 = StringTrimRight($Hora2, 4)
  801. $HoraSplit[1] = StringLeft($Hora2, 2)
  802. If $HoraSplit[1] = 01 Then $Hora2 = StringReplace($Hora2, "01", "13", 1)
  803. If $HoraSplit[1] = 02 Then $Hora2 = StringReplace($Hora2, "02", "14", 1)
  804. If $HoraSplit[1] = 03 Then $Hora2 = StringReplace($Hora2, "03", "15", 1)
  805. If $HoraSplit[1] = 04 Then $Hora2 = StringReplace($Hora2, "04", "16", 1)
  806. If $HoraSplit[1] = 05 Then $Hora2 = StringReplace($Hora2, "05", "17", 1)
  807. If $HoraSplit[1] = 06 Then $Hora2 = StringReplace($Hora2, "06", "18", 1)
  808. If $HoraSplit[1] = 07 Then $Hora2 = StringReplace($Hora2, "07", "19", 1)
  809. If $HoraSplit[1] = 08 Then $Hora2 = StringReplace($Hora2, "08", "20", 1)
  810. If $HoraSplit[1] = 09 Then $Hora2 = StringReplace($Hora2, "09", "21", 1)
  811. If $HoraSplit[1] = 10 Then $Hora2 = StringReplace($Hora2, "10", "22", 1)
  812. If $HoraSplit[1] = 11 Then $Hora2 = StringReplace($Hora2, "11", "23", 1)
  813. Case StringInStr($Hora2, "A.M.")
  814. $Hora2 = StringTrimRight($Hora2, 4)
  815. $HoraSplit[1] = StringLeft($Hora2, 2)
  816. If $HoraSplit[1] = 12 Then $Hora2 = StringReplace($Hora2, "12", "00", 1)
  817. EndSelect
  818. EndIf
  819. For $m = 0 To UBound($Months) - 1
  820. If StringInStr($Dia, StringTrimLeft($Months[$m], 2)) Then
  821. $MonthNumberInDP = StringLeft($Months[$m], 2)
  822. ExitLoop
  823. EndIf
  824. Next
  825. If $laguage = "0a" Then
  826. $DPDay = _StringBetween($Dia, ",", "de", 1, True)
  827. $DPDay = _ArrayToString($DPDay)
  828. Else
  829. $DPDay = StringLeft(StringRight($Dia, 8), 2)
  830. EndIf
  831. $DPDay = StringStripWS($DPDay, 8)
  832. If StringLen($DPDay) = 1 Then $DPDay = StringStripWS("0" & $DPDay, 8)
  833. If _DateTimeFormat(_NowCalc(), 1) = $Dia And $Hora2 < _NowTime(5) Then
  834. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & $Thetimeyouinput & $Hora & $whichisless & _NowTime(), 0)
  835. ContinueLoop
  836. EndIf
  837. If StringRight($Dia, 4) < @YEAR Or StringRight($Dia, 4) >= 3000 Then
  838. If $Spanish = True Then
  839. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, "Atencion", "Error" & @LF & "El a?o que ingreso es invalido!", 0)
  840. Else
  841. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & "The year you input is invalid!", 0)
  842. EndIf
  843. ContinueLoop
  844. EndIf
  845. If StringRight($Dia, 4) = @YEAR And $MonthNumberInDP < @MON Then
  846. If $Spanish = True Then
  847. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, "Atencion", "Error" & @LF & "El mes que ingreso es invalido! ", 0)
  848. Else
  849. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "Error" & @LF & "The month you input is invalid! ", 0)
  850. EndIf
  851. ContinueLoop
  852. EndIf
  853. If StringRight($Dia, 4) = @YEAR And $MonthNumberInDP = @MON And $DPDay < @MDAY Then
  854. If $Spanish = True Then
  855. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, "Atencion", "El Dia que ingreso es invalido! ", 0)
  856. Else
  857. MsgBox($MB_ICONERROR + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, "The day you input is invalid! ", 0)
  858. EndIf
  859. ContinueLoop
  860. EndIf
  861. $iDateCalc = _DateDiff("s", _NowCalc(), StringRight($Dia, 4) & "/" & $MonthNumberInDP & "/" & $DPDay & " " & $Hora2)
  862. $Tiempo1 = $iDateCalc * 1000
  863. $seconds1 = 0
  864. $diff1 = $seconds1 - ($Tiempo1 / 1000)
  865. ;
  866. $minutes1 = Int($diff1 / 60)
  867. $secondsRem1 = $diff1 - ($minutes1 * 60)
  868. ;
  869. $hours1 = Int($minutes1 / 60)
  870. $minutes1 = $minutes1 - ($hours1 * 60)
  871. $hours1 = $hours1 * -1
  872. $minutes1 = $minutes1 * -1
  873. $secondsRem1 = $secondsRem1 * -1
  874. $time = StringFormat("%02d", $hours1) & ":" & StringFormat("%02d", $minutes1) & ":" & StringFormat("%02d", $secondsRem1)
  875. If StringInStr($time, "-") Then $time = StringReplace($time, "-", "")
  876. ;
  877. $Tiempo = $iDateCalc * 1000
  878. $seconds = 0
  879. $diff = $seconds - ($Tiempo / 1000)
  880. ;
  881. $minutes = Int($diff / 60)
  882. $secondsRem = $diff - ($minutes * 60)
  883. ;
  884. $hours = Int($minutes / 60)
  885. $minutes = $minutes - ($hours * 60)
  886. ;
  887. $ExactDay = Int($hours / 24)
  888. $hours = $hours - ($ExactDay * 24)
  889. ;
  890. $ExactMonth = Int($ExactDay / 30.4375)
  891. $ExactDay = $ExactDay - ($ExactMonth * 30.4375)
  892. ;
  893. $ExactYear = Int($ExactMonth / 12)
  894. $ExactMonth = $ExactMonth - ($ExactYear * 12)
  895. ;
  896. $ExactYear = $ExactYear * -1
  897. $ExactMonth = $ExactMonth * -1
  898. $ExactDay = $ExactDay * -1
  899. $hours = $hours * -1
  900. $minutes = $minutes * -1
  901. $secondsRem = $secondsRem * -1
  902. $time2 = StringFormat("%01d", $ExactYear) & ":" & StringFormat("%01d", $ExactMonth) & ":" & StringFormat("%01d", $ExactDay) & ":" & StringFormat("%01d", $hours) & ":" & StringFormat("%01d", $minutes) & ":" & StringFormat("%01d", $secondsRem)
  903. ;
  904. $TimeSplit = StringSplit($time2, ":")
  905. For $I = 0 To UBound($TimeSplit) - 1
  906. If StringInStr($TimeSplit[$I], "-") Then $TimeSplit[$I] = StringReplace($TimeSplit[$I], "-", "")
  907. Next
  908. ;
  909. $anosdiff = " " & $Yearslabel
  910. $MesesDff = " " & $Monthslabel
  911. $DiasDiff = " " & $Dayslabel
  912. If $TimeSplit[1] = 1 Then $anosdiff = $anoo
  913. If $TimeSplit[2] = 1 Then $MesesDiff = $Mes
  914. If $TimeSplit[3] = 1 Then $DiasDiff = $Diaa
  915. MsgBox($MB_ICONINFORMATION + $MB_TOPMOST + $MB_SYSTEMMODAL, $Warninglabel, $youinput & $Dia & " " & $Hora & $Which & $TimeSplit[1] & $anosdiff & " " & $TimeSplit[2] & $MesesDff & $and & $TimeSplit[3] & $DiasDiff & $with & $TimeSplit[4] & $Hoursand & $TimeSplit[5] & $minutesand & $TimeSplit[6] & $secondsof & _DateTimeFormat(@YEAR & "/" & @MON & "/" & @MDAY, 2) & " " & _NowTime() & @LF & $theEstimated & $time, 0)
  916. $iDateCalc = _DateDiff("s", _NowCalc(), StringRight($Dia, 4) & "/" & $MonthNumberInDP & "/" & $DPDay & " " & $Hora2)
  917. $iDateCalc = $iDateCalc * 1000
  918. ;------------------------------------------------------------------------------------------
  919. Apagar()
  920. Case $Button3
  921. Abortar()
  922. Case $Toggle1
  923. If _Metro_ToggleIsChecked($Toggle1) Then
  924. _Metro_ToggleUnCheck($Toggle1)
  925. $Checked = False
  926. Else
  927. _Metro_ToggleCheck($Toggle1)
  928. $Checked = True
  929. Message()
  930. EndIf
  931. Case $GUI_CLOSE_BUTTON
  932. DirRemove($WorkingPath, 1)
  933. ExitLoop
  934. Exit
  935. Case $GUI_MINIMIZE_BUTTON
  936. GUISetState(@SW_MINIMIZE)
  937. Case $GUI_MENU_BUTTON
  938. Local $MenuSelect = _Metro_MenuStart($GLOBAL_MAIN_GUI, $GUI_MENU_BUTTON, 150, $MenuButtonsArray)
  939. Switch $MenuSelect
  940. Case "0"
  941. Acerca()
  942. Case "1"
  943. Contactar()
  944. Case "2"
  945. Update()
  946. Case "3"
  947. DirRemove($WorkingPath, 1)
  948. Exit
  949. EndSwitch
  950. EndSwitch
  951. WEnd
  952. Func Apagar()
  953. $Comboread2 = GUICtrlRead($idComboBox2, 0)
  954. If $Comboread2 = 0 And $Checked = True Then
  955. MsgBox($MB_SYSTEMMODAL, $Warninglabel, $selectalarmtime, 10)
  956. Return
  957. EndIf
  958. If $Comboread2 = 0 And $Checked = False Then ControlDisable($GLOBAL_MAIN_GUI, "", $Toggle1)
  959. ControlDisable($GLOBAL_MAIN_GUI, "", $idComboBox2)
  960. ControlDisable($GLOBAL_MAIN_GUI, "", $GUI_CLOSE_BUTTON)
  961. ControlDisable($GLOBAL_MAIN_GUI, "", $GUI_MENU_BUTTON)
  962. ControlDisable($GLOBAL_MAIN_GUI, "", $idDate)
  963. ControlDisable($GLOBAL_MAIN_GUI, "", $idDate2)
  964. ;Checking Alarm time
  965. $Comboread2 = GUICtrlRead($idComboBox2, 0)
  966. If $Comboread2 = "15 Segundos" Or $Comboread2 = "15 Seconds" Then $aAlarmTime = $15s
  967. If $Comboread2 = "30 Segundos" Or $Comboread2 = "30 Seconds" Then $aAlarmTime = $30s
  968. If $Comboread2 = "45 Segundos" Or $Comboread2 = "45 Seconds" Then $aAlarmTime = $45s
  969. If $Comboread2 = "1 Minuto" Or $Comboread2 = "1 Minute" Then $aAlarmTime = $1m
  970. If $Comboread2 = "1 Minuto y Medio" Or $Comboread2 = "1 Minute and 1/2" Then $aAlarmTime = $1mm
  971. If $Comboread2 = "2 Minutos" Or $Comboread2 = "2 Minutes" Then $aAlarmTime = $2m
  972. If $Comboread2 = "3 Minutos" Or $Comboread2 = "3 Minutes" Then $aAlarmTime = $3m
  973. ;Setting Flashing Labels
  974. Global $lbl_text = GUICtrlCreateLabel($s_text, 145, 159, 85, 17, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  975. GUICtrlSetColor($lbl_text, 0xff0000) ; Red
  976. GUICtrlSetFont($lbl_text, 9, 700)
  977. Global $LabelApagar = GUICtrlCreateLabel($thesystem2, 220, 160, 145, 20, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  978. GUICtrlSetColor(-1, 0xFFFFFF)
  979. GUICtrlSetResizing($lbl_text, 768 + 2 + 32)
  980. GUICtrlSetResizing($LabelApagar, 768 + 2 + 32)
  981. Global $hGIF = _GUICtrlCreateGIF($WorkingPath & "\spinner.gif", "", 190, 280, 90, 90)
  982. GUICtrlSetResizing($hGIF, 768 + 2 + 32)
  983. If $Ditails = False Then
  984. _GIF_PauseAnimation($hGIF)
  985. EndIf
  986. $Tiempo = $iDateCalc
  987. Call("Apagar2")
  988. ControlEnable($GLOBAL_MAIN_GUI, "", $idComboBox2)
  989. ControlEnable($GLOBAL_MAIN_GUI, "", $Toggle1)
  990. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_CLOSE_BUTTON)
  991. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_MENU_BUTTON)
  992. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate)
  993. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate2)
  994. GUICtrlDelete($LabelApagar)
  995. GUICtrlDelete($lbl_text)
  996. _GIF_DeleteGIF($hGIF)
  997. EndFunc ;==>Apagar
  998. Func Apagar2()
  999. ;Checking if timer is greater than 0
  1000. ;If TimerDiff($timer) > 0 Then
  1001. $timer = TimerInit()
  1002. ;EndIf
  1003. While (TimerDiff($timer) < $Tiempo)
  1004. ;Setting Toggle
  1005. _Metro_HoverCheck_Loop($GLOBAL_MAIN_GUI) ;To make sure that the hover effects still work
  1006. $nMsg = GUIGetMsg()
  1007. Switch $nMsg
  1008. Case $Checkbox1
  1009. If _Metro_CheckboxIsChecked($Checkbox1) Then
  1010. _Metro_CheckboxUnCheck($Checkbox1)
  1011. _GIF_PauseAnimation($hGIF)
  1012. contract()
  1013. Else
  1014. _Metro_CheckboxCheck($Checkbox1)
  1015. expand()
  1016. _GIF_ResumeAnimation($hGIF)
  1017. EndIf
  1018. Case $Toggle1
  1019. If _Metro_ToggleIsChecked($Toggle1) Then
  1020. _Metro_ToggleUnCheck($Toggle1)
  1021. $Checked = False
  1022. Else
  1023. _Metro_ToggleCheck($Toggle1)
  1024. $Checked = True
  1025. EndIf
  1026. Case $GUI_MINIMIZE_BUTTON
  1027. GUISetState(@SW_MINIMIZE)
  1028. Case $Button3
  1029. ControlEnable($GLOBAL_MAIN_GUI, "", $idComboBox2)
  1030. ControlEnable($GLOBAL_MAIN_GUI, "", $Toggle1)
  1031. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_CLOSE_BUTTON)
  1032. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_MENU_BUTTON)
  1033. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate)
  1034. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate2)
  1035. ExitLoop
  1036. EndSwitch
  1037. $seconds = TimerDiff($timer) / 1000
  1038. $diff = $seconds - ($Tiempo / 1000)
  1039. ;
  1040. $minutes = Int($diff / 60)
  1041. $secondsRem = $diff - ($minutes * 60)
  1042. ;
  1043. $hours = Int($minutes / 60)
  1044. $minutes = $minutes - ($hours * 60)
  1045. ;
  1046. $hours = $hours * -1
  1047. $minutes = $minutes * -1
  1048. $secondsRem = $secondsRem * -1
  1049. ;
  1050. $time = StringFormat("%02d", $hours) & ":" & StringFormat("%02d", $minutes) & ":" & StringFormat("%02d", $secondsRem)
  1051. ;
  1052. GUICtrlSetData($Inputtimer, $time)
  1053. $Tiempo2 = $Tiempo
  1054. $seconds2 = TimerDiff($timer) / 1000
  1055. $diff2 = $seconds2 - ($Tiempo2 / 1000)
  1056. ;
  1057. $minutes2 = Int($diff2 / 60)
  1058. $secondsRem2 = $diff2 - ($minutes2 * 60)
  1059. ;
  1060. $hours2 = Int($minutes2 / 60)
  1061. $minutes2 = $minutes2 - ($hours2 * 60)
  1062. ;
  1063. $ExactDay = Int($hours2 / 24)
  1064. $hours2 = $hours2 - ($ExactDay * 24)
  1065. ;
  1066. $ExactMonth = Int($ExactDay / 30.4375)
  1067. $ExactDay = $ExactDay - ($ExactMonth * 30.4375)
  1068. ;
  1069. $ExactYear = Int($ExactMonth / 12)
  1070. $ExactMonth = $ExactMonth - ($ExactYear * 12)
  1071. ;
  1072. $ExactYear = $ExactYear * -1
  1073. $ExactMonth = $ExactMonth * -1
  1074. $ExactDay = $ExactDay * -1
  1075. $hours2 = $hours2 * -1
  1076. $minutes2 = $minutes2 * -1
  1077. $secondsRem2 = $secondsRem2 * -1
  1078. $time2 = StringFormat("%01d", $ExactYear) & ":" & StringFormat("%01d", $ExactMonth) & ":" & StringFormat("%01d", $ExactDay) & ":" & StringFormat("%02d", $hours2) & ":" & StringFormat("%02d", $minutes2) & ":" & StringFormat("%02d", $secondsRem2)
  1079. $TimeSplit = StringSplit($time2, ":")
  1080. If $TimeSplit2[6] <> $TimeSplit[6] Then GUICtrlSetData($LabelTime, $Datelabel & $TimeSplit[4] & ":" & $TimeSplit[5] & ":" & $TimeSplit[6])
  1081. If $TimeSplit2[3] <> $TimeSplit[3] Then GUICtrlSetData($LabelDias, $Dayslabel & ": " & $TimeSplit[3])
  1082. If $TimeSplit2[2] <> $TimeSplit[2] Then GUICtrlSetData($LabelMeses, $Monthslabel & ": " & $TimeSplit[2])
  1083. If $TimeSplit2[1] <> $TimeSplit[1] Then GUICtrlSetData($LabelAnos, $Yearslabel & ": " & $TimeSplit[1])
  1084. $TimeSplit2 = $TimeSplit
  1085. ;;Checks if timer is higher than 3mins and If box is checked plays Sound
  1086. If TimerDiff($timer) > $Tiempo - $aAlarmTime And $Checked = True Then _SoundPlay($Alarm, 0) ;MsgBox(0,"Aviso","Alarma",5)
  1087. ;Checks if timer is higher than 3mins and If box is not checked stops Sound
  1088. If TimerDiff($timer) > $Tiempo - $aAlarmTime And $Checked = False Then _SoundStop($Alarm)
  1089. ;Blinking text
  1090. If @SEC <> $sec Then
  1091. $sec = @SEC
  1092. If $RED Then
  1093. GUICtrlSetColor($lbl_text, 0xffffff)
  1094. Else
  1095. GUICtrlSetColor($lbl_text, 0xff0000)
  1096. EndIf
  1097. $RED = Not $RED
  1098. EndIf
  1099. WEnd
  1100. $Readtimer = GUICtrlRead($Inputtimer, 0)
  1101. If $Readtimer = "00:00:00" Then
  1102. _GIF_PauseAnimation($hGIF)
  1103. _SoundStop($Alarm)
  1104. If $Spanish = True Then
  1105. If MsgBox($MB_ICONWARNING + $MB_YESNO + $MB_TOPMOST + $MB_SYSTEMMODAL, "Aviso", "El Tiempo ha Terminado" & @LF & "Desea Continuar?" & @LF & "Presione el boton (NO) para Abortar!" & @LF & "Si no presionas nada El Sistema se Apagara en Menos de 10 Segundos", 10) = 7 Then Return
  1106. Else
  1107. If MsgBox($MB_ICONWARNING + $MB_YESNO + $MB_TOPMOST + $MB_SYSTEMMODAL, "Warning!", "The time has ended" & @LF & "Would you like to continue?" & @LF & "Press (NO) to Abort!" & @LF & "If you don't press anything the system will shutdown in 10 seconds", 10) = 7 Then Return
  1108. EndIf
  1109. _SoundStop($Alarm)
  1110. ;Deleting files
  1111. DirRemove($WorkingPath, 1)
  1112. ;Shutdown Command
  1113. $Shutdown = Shutdown(1 + 4 + 16)
  1114. ;If first shutdown command fails second will be run
  1115. If $Shutdown = 0 Then _RunDos("Shutdown.exe /s /f")
  1116. Else
  1117. _SoundStop($Alarm)
  1118. GUICtrlSetData($Inputtimer, "00:00:00")
  1119. GUICtrlDelete($LabelApagar)
  1120. GUICtrlDelete($lbl_text)
  1121. GUICtrlSetData($LabelTime, $Datelabel & ": 00:00:00")
  1122. GUICtrlSetData($LabelDias, $Dayslabel & ": 0")
  1123. GUICtrlSetData($LabelMeses, $Monthslabel & ": 0")
  1124. GUICtrlSetData($LabelAnos, $Yearslabel & ": 0")
  1125. Global $TimeSplit2[7] = ["cero", "uno", "dos", "tres", "cuatro", "cinco", "seis"]
  1126. EndIf
  1127. EndFunc ;==>Apagar2
  1128. Func Reiniciar()
  1129. $Comboread2 = GUICtrlRead($idComboBox2, 0)
  1130. If $Comboread2 = 0 And $Checked = True Then
  1131. MsgBox($MB_SYSTEMMODAL, $Warninglabel, $selectalarmtime, 10)
  1132. Return
  1133. EndIf
  1134. If $Comboread2 = 0 Then ControlDisable($GLOBAL_MAIN_GUI, "", $Toggle1)
  1135. ControlDisable($GLOBAL_MAIN_GUI, "", $idComboBox2)
  1136. ControlDisable($GLOBAL_MAIN_GUI, "", $GUI_CLOSE_BUTTON)
  1137. ControlDisable($GLOBAL_MAIN_GUI, "", $GUI_MENU_BUTTON)
  1138. ControlDisable($GLOBAL_MAIN_GUI, "", $idDate)
  1139. ControlDisable($GLOBAL_MAIN_GUI, "", $idDate2)
  1140. ;Checking Alarm time
  1141. $Comboread2 = GUICtrlRead($idComboBox2, 0)
  1142. If $Comboread2 = "15 Segundos" Or $Comboread2 = "15 Seconds" Then $aAlarmTime = $15s
  1143. If $Comboread2 = "30 Segundos" Or $Comboread2 = "30 Seconds" Then $aAlarmTime = $30s
  1144. If $Comboread2 = "45 Segundos" Or $Comboread2 = "45 Seconds" Then $aAlarmTime = $45s
  1145. If $Comboread2 = "1 Minuto" Or $Comboread2 = "1 Minute" Then $aAlarmTime = $1m
  1146. If $Comboread2 = "1 Minuto y Medio" Or $Comboread2 = "1 Minute and 1/2" Then $aAlarmTime = $1mm
  1147. If $Comboread2 = "2 Minutos" Or $Comboread2 = "2 Minutes" Then $aAlarmTime = $2m
  1148. If $Comboread2 = "3 Minutos" Or $Comboread2 = "3 Minutes" Then $aAlarmTime = $3m
  1149. ;setting labels de advertencia
  1150. Global $lbl_text = GUICtrlCreateLabel($s_text, 160, 159, 85, 17, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  1151. GUICtrlSetColor($lbl_text, 0xff0000) ; Red
  1152. GUICtrlSetFont($lbl_text, 9, 700)
  1153. ;
  1154. Global $LabelReiniciar = GUICtrlCreateLabel($thesystem, 240, 160, 125, 20, $SS_CENTER, $GUI_WS_EX_PARENTDRAG)
  1155. GUICtrlSetColor(-1, 0xFFFFFF)
  1156. GUICtrlSetResizing($lbl_text, 768 + 2 + 32)
  1157. GUICtrlSetResizing($LabelReiniciar, 768 + 2 + 32)
  1158. Global $hGIF = _GUICtrlCreateGIF($WorkingPath & "\spinner.gif", "", 190, 280, 90, 90)
  1159. GUICtrlSetResizing($hGIF, 768 + 2 + 32)
  1160. If $Ditails = False Then
  1161. _GIF_PauseAnimation($hGIF)
  1162. EndIf
  1163. $Tiempo = $iDateCalc
  1164. Call("Reiniciar2")
  1165. ControlEnable($GLOBAL_MAIN_GUI, "", $idComboBox2)
  1166. ControlEnable($GLOBAL_MAIN_GUI, "", $Toggle1)
  1167. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_CLOSE_BUTTON)
  1168. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_MENU_BUTTON)
  1169. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate)
  1170. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate2)
  1171. GUICtrlDelete($LabelReiniciar)
  1172. GUICtrlDelete($lbl_text)
  1173. _GIF_DeleteGIF($hGIF)
  1174. EndFunc ;==>Reiniciar
  1175. Func Reiniciar2()
  1176. ;Checking if timer is greater than 0
  1177. ;If TimerDiff($timer) > 0 Then
  1178. $timer = TimerInit()
  1179. ;EndIf
  1180. While (TimerDiff($timer) < $Tiempo)
  1181. ;Setting Toggle
  1182. _Metro_HoverCheck_Loop($GLOBAL_MAIN_GUI) ;To make sure that the hover effects still work
  1183. $nMsg = GUIGetMsg()
  1184. Switch $nMsg
  1185. Case $Checkbox1
  1186. If _Metro_CheckboxIsChecked($Checkbox1) Then
  1187. _Metro_CheckboxUnCheck($Checkbox1)
  1188. _GIF_PauseAnimation($hGIF)
  1189. contract()
  1190. Else
  1191. _Metro_CheckboxCheck($Checkbox1)
  1192. expand()
  1193. _GIF_ResumeAnimation($hGIF)
  1194. EndIf
  1195. Case $Toggle1
  1196. If _Metro_ToggleIsChecked($Toggle1) Then
  1197. _Metro_ToggleUnCheck($Toggle1)
  1198. $Checked = False
  1199. Else
  1200. _Metro_ToggleCheck($Toggle1)
  1201. $Checked = True
  1202. EndIf
  1203. Case $GUI_MINIMIZE_BUTTON
  1204. GUISetState(@SW_MINIMIZE)
  1205. Case $Button3
  1206. ControlEnable($GLOBAL_MAIN_GUI, "", $idComboBox2)
  1207. ControlEnable($GLOBAL_MAIN_GUI, "", $Toggle1)
  1208. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_CLOSE_BUTTON)
  1209. ControlEnable($GLOBAL_MAIN_GUI, "", $GUI_MENU_BUTTON)
  1210. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate)
  1211. ControlEnable($GLOBAL_MAIN_GUI, "", $idDate2)
  1212. ExitLoop
  1213. EndSwitch
  1214. $seconds = TimerDiff($timer) / 1000
  1215. $diff = $seconds - ($Tiempo / 1000)
  1216. ;
  1217. $minutes = Int($diff / 60)
  1218. $secondsRem = $diff - ($minutes * 60)
  1219. ;
  1220. $hours = Int($minutes / 60)
  1221. $minutes = $minutes - ($hours * 60)
  1222. ;
  1223. $hours = $hours * -1
  1224. $minutes = $minutes * -1
  1225. $secondsRem = $secondsRem * -1
  1226. ;
  1227. $time = StringFormat("%02d", $hours) & ":" & StringFormat("%02d", $minutes) & ":" & StringFormat("%02d", $secondsRem)
  1228. ;
  1229. GUICtrlSetData($Inputtimer, $time)
  1230. $Tiempo2 = $Tiempo
  1231. $seconds2 = TimerDiff($timer) / 1000
  1232. $diff2 = $seconds2 - ($Tiempo2 / 1000)
  1233. ;
  1234. $minutes2 = Int($diff2 / 60)
  1235. $secondsRem2 = $diff2 - ($minutes2 * 60)
  1236. ;
  1237. $hours2 = Int($minutes2 / 60)
  1238. $minutes2 = $minutes2 - ($hours2 * 60)
  1239. ;
  1240. $ExactDay = Int($hours2 / 24)
  1241. $hours2 = $hours2 - ($ExactDay * 24)
  1242. ;
  1243. $ExactMonth = Int($ExactDay / 30.4375)
  1244. $ExactDay = $ExactDay - ($ExactMonth * 30.4375)
  1245. ;
  1246. $ExactYear = Int($ExactMonth / 12)
  1247. $ExactMonth = $ExactMonth - ($ExactYear * 12)
  1248. ;
  1249. $ExactYear = $ExactYear * -1
  1250. $ExactMonth = $ExactMonth * -1
  1251. $ExactDay = $ExactDay * -1
  1252. $hours2 = $hours2 * -1
  1253. $minutes2 = $minutes2 * -1
  1254. $secondsRem2 = $secondsRem2 * -1
  1255. $time2 = StringFormat("%01d", $ExactYear) & ":" & StringFormat("%01d", $ExactMonth) & ":" & StringFormat("%01d", $ExactDay) & ":" & StringFormat("%02d", $hours2) & ":" & StringFormat("%02d", $minutes2) & ":" & StringFormat("%02d", $secondsRem2)
  1256. $TimeSplit = StringSplit($time2, ":")
  1257. If $TimeSplit2[6] <> $TimeSplit[6] Then GUICtrlSetData($LabelTime, $Datelabel & $TimeSplit[4] & ":" & $TimeSplit[5] & ":" & $TimeSplit[6])
  1258. If $TimeSplit2[3] <> $TimeSplit[3] Then GUICtrlSetData($LabelDias, $Dayslabel & ": " & $TimeSplit[3])
  1259. If $TimeSplit2[2] <> $TimeSplit[2] Then GUICtrlSetData($LabelMeses, $Monthslabel & ": " & $TimeSplit[2])
  1260. If $TimeSplit2[1] <> $TimeSplit[1] Then GUICtrlSetData($LabelAnos, $Yearslabel & ": " & $TimeSplit[1])
  1261. $TimeSplit2 = $TimeSplit
  1262. ;Checks if timer is higher than 3mins and If box is checked plays Sound
  1263. If TimerDiff($timer) > $Tiempo - $aAlarmTime And $Checked = True Then _SoundPlay($Alarm, 0) ;MsgBox(0,"Aviso","Alarma",5)
  1264. ;Checks if timer is higher than 3mins and If box is not checked stops Sound
  1265. If TimerDiff($timer) > $Tiempo - $aAlarmTime And $Checked = False Then _SoundStop($Alarm)
  1266. ; Blinking Text
  1267. If @SEC <> $sec Then
  1268. $sec = @SEC
  1269. If $RED Then
  1270. GUICtrlSetColor($lbl_text, 0xffffff)
  1271. Else
  1272. GUICtrlSetColor($lbl_text, 0xff0000)
  1273. EndIf
  1274. $RED = Not $RED
  1275. EndIf
  1276. WEnd
  1277. $Readtimer = GUICtrlRead($Inputtimer, 0)
  1278. If $Readtimer = "00:00:00" Then
  1279. _GIF_PauseAnimation($hGIF)
  1280. _SoundStop($Alarm)
  1281. If $Spanish = True Then
  1282. If MsgBox($MB_ICONWARNING + $MB_YESNO + $MB_TOPMOST + $MB_SYSTEMMODAL, "Aviso", "El Tiempo ha Terminado" & @LF & "Desea Continuar?" & @LF & "Presione el boton (NO) para Abortar!" & @LF & "Si no presionas nada El Sistema se Reiniciara en Menos de 10 Segundos", 10) = 7 Then Return
  1283. Else
  1284. If MsgBox($MB_ICONWARNING + $MB_YESNO + $MB_TOPMOST + $MB_SYSTEMMODAL, "Warning", "The time has ended" & @LF & "Would you like to continue?" & @LF & "Press (NO) to Abort!" & @LF & "If ypu don't press anything the system will restart in 10 seconds", 10) = 7 Then Return
  1285. EndIf
  1286. _SoundStop($Alarm)
  1287. DirRemove($WorkingPath, 1)
  1288. $Shutdown = Shutdown(2 + 4 + 16)
  1289. ;If first shutdown command fails second will be run
  1290. If $Shutdown = 0 Then _RunDos("Shutdown.exe /r /f")
  1291. Else
  1292. _SoundStop($Alarm)
  1293. GUICtrlSetData($Inputtimer, "00:00:00")
  1294. GUICtrlDelete($LabelReiniciar)
  1295. GUICtrlDelete($lbl_text)
  1296. GUICtrlSetData($LabelTime, $Datelabel & ": 00:00:00")
  1297. GUICtrlSetData($LabelDias, $Dayslabel & ": 0")
  1298. GUICtrlSetData($LabelMeses, $Monthslabel & ": 0")
  1299. GUICtrlSetData($LabelAnos, $Yearslabel & ": 0")
  1300. Global $TimeSplit2[7] = ["cero", "uno", "dos", "tres", "cuatro", "cinco", "seis"]
  1301. EndIf
  1302. EndFunc ;==>Reiniciar2
  1303. Func Abortar()
  1304. DirRemove($WorkingPath, 1)
  1305. Exit
  1306. EndFunc ;==>Abortar
  1307. Func Message()
  1308. $Comboread2 = GUICtrlRead($idComboBox2, 0)
  1309. If $Comboread2 = $select Then _Metro_MsgBox(0, $Warninglabel, $selectalarmtime, 300, 11, $GLOBAL_MAIN_GUI)
  1310. EndFunc ;==>Message
  1311. Func Update()
  1312. If @Compiled Then
  1313. $iPing = Ping("google.com", 6000)
  1314. If $iPing = 0 Then
  1315. If Spanish = True Then
  1316. MsgBox($MB_SYSTEMMODAL, "Update Utility", "Error de conexion!" & @LF & "No me logro comunicar con El Internet ):")
  1317. Else
  1318. MsgBox($MB_SYSTEMMODAL, "Update Utility", "Connexion Error!" & @LF & "Couln,t connect to the internet ):")
  1319. EndIf
  1320. Return
  1321. Else
  1322. $my_url = "https://drive.google.com/open?id=1-pabsEiu7q7_gKw0X2YB5wchNTOebdDp"
  1323. ShellExecute($my_url)
  1324. If $Spanish = True Then
  1325. MsgBox($MB_TOPMOST, "Update Utility", "Descarga la version mas nueva desde tu navegador.")
  1326. Else
  1327. MsgBox($MB_TOPMOST, "Update Utility", "Download the new version from your browser.")
  1328. EndIf
  1329. EndIf
  1330. Else
  1331. MsgBox(0, "Aviso", "App not Compiled", 0)
  1332. Return
  1333. EndIf
  1334. EndFunc ;==>Update
  1335. Func Contactar()
  1336. $YesNoContact = _Metro_MsgBox(4, $Warninglabel, $YesNoContactlabel, 500, 11, $GLOBAL_MAIN_GUI)
  1337. If $YesNoContact = "Yes" Then
  1338. $iPing = Ping("google.com", 6000)
  1339. If $iPing = 0 Then
  1340. If $Spanish = True Then
  1341. MsgBox($MB_SYSTEMMODAL, "Aviso", "Error de conexion!" & @LF & "No me logro comunicar con El Internet ):")
  1342. Else
  1343. MsgBox($MB_SYSTEMMODAL, "Aviso", "Connexion Error!" & @LF & "Couln't connect to the internet ):")
  1344. EndIf
  1345. Return
  1346. EndIf
  1347. #Region ### START Koda GUI section ### Form=
  1348. $Form3 = _Metro_CreateGUI("Mail Utility", 500, 265, 100, 118, False, $GLOBAL_MAIN_GUI)
  1349. $GroupBox1 = GUICtrlCreateGroup("", 5, 8, 473, 193)
  1350. GUICtrlSetState(-1, $GUI_DISABLE)
  1351. $Label1 = GUICtrlCreateLabel($formulario3label1, 20, 24, 428, 17, $SS_CENTER)
  1352. GUICtrlSetColor(-1, 0xFFFFFF)
  1353. GUICtrlSetFont($Label1, 9, 700)
  1354. $Label2 = GUICtrlCreateLabel($formulario3label2, 20, 64, 428, 17, $SS_CENTER)
  1355. GUICtrlSetColor(-1, 0xFFFFFF)
  1356. GUICtrlSetFont($Label2, 9, 700)
  1357. $Label11 = GUICtrlCreateLabel($formulario3label3, 20, 93, 128, 17, $SS_CENTER)
  1358. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1359. GUICtrlSetColor(-1, 0xFFFFFF)
  1360. $InputnName = GUICtrlCreateInput("", 20, 107, 150, 20)
  1361. $Label12 = GUICtrlCreateLabel($formulario3label4, 317, 93, 128, 17, $SS_CENTER)
  1362. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1363. GUICtrlSetColor(-1, 0xFFFFFF)
  1364. $InputEmail = GUICtrlCreateInput("", 317, 107, 150, 20)
  1365. $Label13 = GUICtrlCreateLabel($formulario3label5, 180, 133, 128, 17, $SS_CENTER)
  1366. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  1367. GUICtrlSetColor(-1, 0xFFFFFF)
  1368. $InputMesage = GUICtrlCreateInput("", 20, 147, 445, 30)
  1369. $ButtonListo = _Metro_CreateButtonEx($formulario3botonlabel, 123, 208, 75, 25, 0)
  1370. $ButtonCancelar = _Metro_CreateButtonEx($formulario3botonlabel2, 297, 208, 75, 25, 0)
  1371. GUISetState(@SW_SHOW)
  1372. #EndRegion ### END Koda GUI section ###
  1373. While 1
  1374. $About = GUIGetMsg()
  1375. Switch $About
  1376. Case $GUI_EVENT_CLOSE
  1377. GUIDelete($Form2)
  1378. ExitLoop
  1379. Case $ButtonCancelar
  1380. GUIDelete($Form3)
  1381. ExitLoop
  1382. Case $ButtonListo
  1383. Global $readEmail = GUICtrlRead($InputEmail)
  1384. $readName = GUICtrlRead($InputnName)
  1385. $readMesage = GUICtrlRead($InputMesage)
  1386. If $readEmail = "" Or $readName = "" Or $readMesage = "" Then
  1387. If $Spanish = True Then
  1388. _Metro_MsgBox(0, "Aviso", "Llene Todas las Cajitas en El Formulario", 300, 11, $GLOBAL_MAIN_GUI)
  1389. Else
  1390. _Metro_MsgBox(0, "Attention!", "Fill all the boxes in the Form", 300, 11, $GLOBAL_MAIN_GUI)
  1391. EndIf
  1392. Else
  1393. _IsValidEmail()
  1394. If $Update = True Then
  1395. $Body = "Nombre: " & $readName & @LF & "E-mail: " & $readEmail & @LF & "Mensaje: " & $readMesage
  1396. GUIDelete($Form3)
  1397. SendEmail()
  1398. ExitLoop
  1399. EndIf
  1400. EndIf
  1401. EndSwitch
  1402. WEnd
  1403. Else
  1404. _Metro_MsgBox(0, $Warninglabel, $Decidedlabel, 300, 11, $GLOBAL_MAIN_GUI)
  1405. EndIf
  1406. EndFunc ;==>Contactar
  1407. Func _IsValidEmail()
  1408. If StringRegExp($readEmail, "^([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])$") Then
  1409. ping2()
  1410. Else
  1411. If $Spanish = True Then
  1412. _Metro_MsgBox(0, "Aviso", "Error, Correo electronico invalido!" & @LF & $readEmail & " no es un correo electronico valido" & @LF & "Ingrese un correo electronico valido!" & @LF & " Ejamplo: manuelcipote31@gmail.com", 300, 11, $GLOBAL_MAIN_GUI)
  1413. Else
  1414. _Metro_MsgBox(0, "Warning!", "Error, Invalid E-mail!" & @LF & $readEmail & " is not a valid E-mail" & @LF & "Plaese input a valid E-mail!" & @LF & " Exmaple: manuelcipote31@gmail.com", 300, 11, $GLOBAL_MAIN_GUI)
  1415. EndIf
  1416. EndIf
  1417. EndFunc ;==>_IsValidEmail
  1418. Func ping2()
  1419. $iPing = Ping("google.com", 6000)
  1420. If $iPing = 0 Then
  1421. If $Spanish = True Then
  1422. MsgBox($MB_SYSTEMMODAL, "Aviso", "Error de conexion!" & @LF & "El mensaje no se puede enviar ):" & @LF & "No me logro comunicar con El Internet ):")
  1423. Else
  1424. MsgBox($MB_SYSTEMMODAL, "Attention", "Connexion Error!" & @LF & "Your message can't be sent ):" & @LF & "couldn't connect to the internet ):")
  1425. EndIf
  1426. Return
  1427. Else
  1428. $Update = True
  1429. EndIf
  1430. EndFunc ;==>ping2
  1431. Func Acerca()
  1432. #Region ### START Koda GUI section ### Form=
  1433. $Form2 = _Metro_CreateGUI("About", 489, 265, 1, 118, False, $GLOBAL_MAIN_GUI)
  1434. $GroupBox1 = GUICtrlCreateGroup("", 5, 8, 473, 193)
  1435. GUICtrlSetState(-1, $GUI_DISABLE)
  1436. $Image1 = GUICtrlCreatePic($WorkingPath & "\Capture10.jpg", 16, 24, 127, 114)
  1437. GUICtrlSetState(-1, $GUI_DISABLE)
  1438. $Label1 = GUICtrlCreateLabel($ProductNamelabel, 152, 24, 308, 17)
  1439. GUICtrlSetColor(-1, 0xFFFFFF)
  1440. $Label2 = GUICtrlCreateLabel("Version 3.0.2.0, 11.15.2017", 152, 48, 207, 17)
  1441. GUICtrlSetColor(-1, 0xFFFFFF)
  1442. $Label3 = GUICtrlCreateLabel($Label3label, 16, 160, 451, 17)
  1443. GUICtrlSetColor(-1, 0xFFFFFF)
  1444. $Label4 = GUICtrlCreateLabel($Label4label, 16, 180, 451, 17)
  1445. GUICtrlSetColor(-1, 0xFFFFFF)
  1446. $Label5 = GUICtrlCreateLabel($Label5label, 16, 136, 267, 17)
  1447. GUICtrlSetColor(-1, 0xFFFFFF)
  1448. $Label6 = GUICtrlCreateLabel($Label6label, 149, 80, 131, 17)
  1449. GUICtrlSetColor(-1, 0xFFFFFF)
  1450. $ButtonOk = _Metro_CreateButtonEx("OK", 124, 208, 75, 25, 0)
  1451. GUISetState(@SW_SHOW)
  1452. #EndRegion ### END Koda GUI section ###
  1453. While 1
  1454. $About = GUIGetMsg()
  1455. Switch $About
  1456. Case $GUI_EVENT_CLOSE
  1457. GUIDelete($Form2)
  1458. ExitLoop
  1459. Case $ButtonOk
  1460. GUIDelete($Form2)
  1461. ExitLoop
  1462. EndSwitch
  1463. WEnd
  1464. EndFunc ;==>Acerca