Bozzman Posted December 21, 2009 Share Posted December 21, 2009 try this one make sure you minimaze all windows after opening Qlock.au3 Link to comment Share on other sites More sharing options...
nend Posted December 22, 2009 Share Posted December 22, 2009 You are realy good with gdi/winapi!! Nice work. try this one make sure you minimaze all windows after opening Qlock.au3 Link to comment Share on other sites More sharing options...
playlet Posted December 22, 2009 Share Posted December 22, 2009 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Bozzman Posted December 23, 2009 Share Posted December 23, 2009 (edited) no im not good with gdi just used an function for round corners from an udf btw what do you think about that resize thing i put in Edited December 23, 2009 by Bozzman Link to comment Share on other sites More sharing options...
nend Posted December 23, 2009 Share Posted December 23, 2009 The resizing looks good en works good.There are lot of gdi/winapi functions in the script (that’s why I’m thought you totally made it in gdi).But almost all those function won't be called by the rest of the script.So I’ve stripped it from al those function en the whole script works the same but is half so small.But still the round conners just make's it looks better.no im not good with gdi just used an function for round corners from an udfbtw what do you think about that resize thing i put in Link to comment Share on other sites More sharing options...
nugame Posted December 23, 2009 Share Posted December 23, 2009 well the thing is...on the actual clock, there are 4 dots on each corner. the top left is 1 plus the time, then top right is 2, and same all around. just didn't include them yet. just testing the time part.will include next update.thanks for the comment thoughThis is good and totally different. I see that you are still in development. it would be good to be more realtime and perhaps have menu config to allow user to set the update rates. Let me/us know when you update. Dr SherlockAlways a way Link to comment Share on other sites More sharing options...
KalleB Posted December 23, 2009 Share Posted December 23, 2009 The relevant parts (the string of letters and the arrays of splits into words) for Swedish (sv / Svenska) are attached. Use the >24 setting for _Hour_Correct, same as for nl.Edit23.au3 Link to comment Share on other sites More sharing options...
Bozzman Posted December 24, 2009 Share Posted December 24, 2009 update rate so it dont check every loop? Link to comment Share on other sites More sharing options...
billthecreator Posted December 24, 2009 Author Share Posted December 24, 2009 The relevant parts (the string of letters and the arrays of splits into words) for Swedish (sv / Svenska) are attached. Use the >24 setting for _Hour_Correct, same as for nl. all i see is the hour and min coordinates, i need the string format, ex: Global Const $Text_en = "ITLISASTIMEACQUARTERDCTWENTYFIVEXHALFBTENFTOPASTERUNINE" & _ "ONESIXTHREEFOURFIVETWOEIGHTELEVENSEVENTWELVETENSEOCLOCK" but for swedish [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
KalleB Posted December 24, 2009 Share Posted December 24, 2009 Sorry, don't know where that went: Global Const $Text_sv = "KLOCKANVÄRKFEMYISTIONIKVARTQIENZOTJUGOLIVINAÖVERKONHALV" & _ "ETTUSCHXTVÅTREMYKYFYRAFEMSTWORSEXSJUÅTTAINIOTIOELVATOLV" Link to comment Share on other sites More sharing options...
Gianni Posted November 30, 2015 Share Posted November 30, 2015 ....Ok, this is an old post, but I could not resist the temptation to add also the Italian language. Here it isexpandcollapse popup; QLOCK TWO ; Original Writing by William Reithmeyer ; ; Script changes from help of others (thanks) ; BennyBB, Bozzman, Melba23, KalleB ; #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <ComboConstants.au3> #include <WinAPI.au3> #include <GDIPlus.au3> #include <SendMessage.au3> ; Opt("TrayMenuMode", 3) ; Global Const $Text_en = "ITLISASTIMEACQUARTERDCTWENTYFIVEXHALFBTENFTOPASTERUNINE" & _ "ONESIXTHREEFOURFIVETWOEIGHTELEVENSEVENTWELVETENSEOCLOCK" Global Const $Text_de = "ESKISTAFÜNFZEHNBYGVORGNACHVIERTELHALBVORNACHEINSLMEZWEI" & _ "DREIAUJVIERFÜNFTOSECHSSIEBENLACHTNEUNZEHNELFZWÖLFUNKUHR" Global Const $Text_nl = "HETKISAVIJFTIENBTZVOOROVERMEKWARTVOORSPWOVERHALFTHGÉÉNS" & _ "TWEEPVCDRIEVIERVIJFZESZEVENONEGENACHTTIENELFTWAALFBFUUR" Global Const $Text_fr = "ILRESTGJUNEDEUXCINQDIXQUATREPHUITSEPTNEUFSIXDOUZEUTROIS" & _ "ONZEDHEURESMOINSGFJWLPETVINGTBLWVLEDEMIWDIXYUQUARTZCINQ" Global Const $Text_sv = "KLOCKANVÄRKFEMYISTIONIKVARTQIENZOTJUGOLIVINAÖVERKONHALV" & _ "ETTUSCHXTVÅTREMYKYFYRAFEMSTWORSEXSJUÅTTAINIOTIOELVATOLV" Global Const $Text_it = "SONORLEBOREERLUNASDUEZTREOTTONOVEDIECIUNDICIDODICISETTE" & _ "QUATTROCSEICINQUESMENOECUNOQUARTOVENTICINQUEDIECIEMEZZA" Global $Char_Text[111] Global $Char_Text_Remain[5], $Color_Chooser[6], $label_lang[4] Global $Text_en_Split = StringSplit($Text_en, "") Global $Text_de_Split = StringSplit($Text_de, "") Global $Text_nl_Split = StringSplit($Text_nl, "") Global $Text_fr_Split = StringSplit($Text_fr, "") Global $Text_sv_Split = StringSplit($Text_sv, "") Global $Text_it_Split = StringSplit($Text_it, "") Global $Hour_Min = @HOUR & @MIN Global $initiate = True Global $sIni_File = @ScriptDir & "\QLOCKTWOSettings.ini" ; #Region Coordinates by language ### Global $Text_En_Min_Highlight[12][2] = _ [["00", "1|2|4|5|105|106|107|108|109|110"], _ ; IT IS OCLOCK ["05", "1|2|4|5|29|30|31|32|45|46|47|48"], _ ; IT IS FIVE PAST ["10", "1|2|4|5|39|40|41|45|46|47|48"], _ ; IT IS TEN PAST ["15", "1|2|4|5|12|14|15|16|17|18|19|20|45|46|47|48"], _ ; IT IS A QUARTER PAST ["20", "1|2|4|5|23|24|25|26|27|28|45|46|47|48"], _ ; IT IS TWENTY PAST ["25", "1|2|4|5|23|24|25|26|27|28|29|30|31|32|45|46|47|48"], _ ; IT IS TWENTYFIVE PAST ["30", "1|2|4|5|34|35|36|37|45|46|47|48"], _ ; IT IS HALF PAST ["35", "1|2|4|5|23|24|25|26|27|28|29|30|31|32|43|44"], _; IT IS TWENTYFIVE TO ["40", "1|2|4|5|23|24|25|26|27|28|43|44"], _ ; IT IS TWENTY TO ["45", "1|2|4|5|12|14|15|16|17|18|19|20|43|44"], _ ; IT IS A QUARTER TO ["50", "1|2|4|5|39|40|41|43|44"], _ ; IT IS TEN TO ["55", "1|2|4|5|29|30|31|32|43|44"]] ; IT IS FIVE TO Global $Text_En_Hour_Highlight[12][2] = _ [["01", "56|57|58"], _ ; ONE ["02", "75|76|77"], _ ; TWO ["03", "62|63|64|65|66"], _ ; THREE ["04", "67|68|69|70"], _ ; FOUR ["05", "71|72|73|74"], _ ; FIVE ["06", "59|60|61"], _ ; SIX ["07", "89|90|91|92|93"], _ ; SEVEN ["08", "78|79|80|81|82"], _ ; EIGHT ["23", "52|53|54|55"], _ ; NINE ["10", "100|101|102"], _ ; TEN ["11", "83|84|85|86|87|88"], _ ; ELEVEN ["12", "94|95|96|97|98|99"]] ; TWELVE Global $Text_de_Min_Highlight[12][2] = _ [["00", "1|2|4|5|6|108|109|110"], _ ["05", "1|2|4|5|6|8|9|10|11|23|24|25|26"], _ ["10", "1|2|4|5|6|12|13|14|15|23|24|25|26"], _ ["15", "1|2|4|5|6|27|28|29|30|31|32|33|41|42|43|44"], _ ["20", "1|2|4|5|6|12|13|14|15|19|20|21|34|35|36|37"], _ ["25", "1|2|4|5|6|8|9|10|11|19|20|21|34|35|36|37"], _ ["30", "1|2|4|5|6|34|35|36|37"], _ ["35", "1|2|4|5|6|8|9|10|11|23|24|25|26|34|35|36|37"], _ ["40", "1|2|4|5|6|12|13|14|15|23|24|25|26|34|35|36|37"], _ ["45", "1|2|4|5|6|27|28|29|30|31|32|33|38|39|40"], _ ["50", "1|2|4|5|6|12|13|14|15|19|20|21"], _ ["55", "1|2|4|5|6|8|9|10|11|19|20|21"]] Global $Text_de_Hour_Highlight[12][2] = _ [["01", "45|46|47|48"], _ ["02", "52|53|54|55"], _ ["03", "56|57|58|59"], _ ["04", "63|64|65|66"], _ ["05", "67|68|69|70"], _ ["06", "73|74|75|76|77"], _ ["07", "78|79|80|81|82|83"], _ ["08", "85|86|87|88"], _ ["23", "89|90|91|92"], _ ["10", "93|94|95|96"], _ ["11", "97|98|99"], _ ["12", "100|101|102|103|104"]] Global $Text_nl_Min_Highlight[12][2] = _ [["00", "1|2|3|5|6|108|109|110"], _ ["05", "1|2|3|5|6|8|9|10|11|41|42|43|44"], _ ["10", "1|2|3|5|6|12|13|14|15|41|42|43|44"], _ ["15", "1|2|3|5|6|29|30|31|32|33|41|42|43|44"], _ ["20", "1|2|3|5|6|12|13|14|15|45|46|47|48|34|35|36|37"], _ ["25", "1|2|3|5|6|8|9|10|11|45|46|47|48|34|35|36|37"], _ ["30", "1|2|3|5|6|45|46|47|48"], _ ["35", "1|2|3|5|6|8|9|10|11|41|42|43|44|45|46|47|48"], _ ["40", "1|2|3|5|6|12|13|14|15|41|42|43|44|45|46|47|48"], _ ["45", "1|2|3|5|6|29|30|31|32|33|34|35|36|37"], _ ["50", "1|2|3|5|6|12|13|14|15|34|35|36|37"], _ ["55", "1|2|3|5|6|8|9|10|11|34|35|36|37"]] Global $Text_nl_Hour_Highlight[12][2] = _ [["01", "52|53|54"], _ ["02", "56|57|58|59"], _ ["03", "63|64|65|66"], _ ["04", "67|68|69|70"], _ ["05", "71|72|73|74"], _ ["06", "59|60|61"], _ ["07", "78|79|80|81|82"], _ ["08", "89|90|91|92"], _ ["09", "84|85|86|87|88"], _ ["10", "93|94|95|96"], _ ["11", "97|98|99"], _ ["12", "100|101|102|103|104|105"]] Global $Text_fr_Min_Highlight[12][2] = _ [["00", ""], _ ["05", "107|108|109|110"], _ ["10", "96|97|98"], _ ["15", "78|79|101|102|103|104|105"], _ ["20", "80|81|82|83|84"], _ ["25", "80|81|82|83|84|107|108|109|110"], _ ["30", "78|79|91|92|93|94"], _ ["35", "67|68|69|70|71|80|81|82|83|84|107|108|109|110"], _ ["40", "67|68|69|70|71|80|81|82|83|84"], _ ["45", "67|68|69|70|71|89|90|101|102|103|104|105"], _ ["50", "67|68|69|70|71|96|97|98"], _ ["55", "67|68|69|70|71|107|108|109|110"]] Global $Text_fr_Hour_Highlight[12][2] = _ [["01", "1|2|4|5|6|9|10|11|61|62|63|64|65"], _ ["02", "1|2|4|5|6|12|13|14|15|61|62|63|64|65|66"], _ ["03", "1|2|4|5|6|51|52|53|54|55|61|62|63|64|65|66"], _ ["04", "1|2|4|5|6|23|24|25|26|27|28|61|62|63|64|65|66"], _ ["05", "1|2|4|5|6|16|17|18|19|61|62|63|64|65|66"], _ ["06", "1|2|4|5|6|42|43|44|61|62|63|64|65|66"], _ ["07", "1|2|4|5|6|34|35|36|37|61|62|63|64|65|66"], _ ["08", "1|2|4|5|6|30|31|32|33|61|62|63|64|65|66"], _ ["23", "1|2|4|5|6|38|39|40|41|61|62|63|64|65|66"], _ ["10", "1|2|4|5|6|20|21|22|61|62|63|64|65|66"], _ ["11", "1|2|4|5|6|56|57|58|59|61|62|63|64|65|66"], _ ["12", "1|2|4|5|6|45|46|47|48|49|61|62|63|64|65|66"]] Global $Text_sv_Hour_Highlight[12][2] = _ [["01", "56|57|58"], _ ["02", "64|65|66"], _ ["03", "67|68|69"], _ ["04", "74|75|76|77"], _ ["05", "78|79|80"], _ ["06", "86|87|88"], _ ["07", "89|90|91"], _ ["08", "92|93|94|95"], _ ["23", "97|98|99"], _ ["10", "100|101|102"], _ ["11", "103|104|105|106"], _ ["12", "107|108|109|110"]] Global $Text_sv_Min_Highlight[12][2] = _ [["00", "1|2|3|4|5|6|7|9|10"], _ ["05", "1|2|3|4|5|6|7|9|10|12|13|14|45|46|47|48"], _ ["10", "1|2|3|4|5|6|7|9|10|18|19|20|45|46|47|48"], _ ["15", "1|2|3|4|5|6|7|9|10|23|24|25|26|27|45|46|47|48"], _ ["20", "1|2|3|4|5|6|7|9|10|34|35|36|37|38|45|46|47|48"], _ ["25", "1|2|3|4|5|6|7|9|10|12|13|14|16|52|53|54|55"], _ ["30", "1|2|3|4|5|6|7|9|10|52|53|54|55"], _ ["35", "1|2|3|4|5|6|7|9|10|12|13|14|45|46|47|48|52|53|54|55"], _ ["40", "1|2|3|4|5|6|7|9|10|34|35|36|37|38|40"], _ ["45", "1|2|3|4|5|6|7|9|10|23|24|25|26|27|29"], _ ["50", "1|2|3|4|5|6|7|9|10|18|19|20|22"], _ ["55", "1|2|3|4|5|6|7|9|10|12|13|14|16"]] Global $Text_It_Min_Highlight[12][2] = _ [["00", "1|2|3|4|6|7|9|10|11"], _ ; SONO LE ORE ["05", "1|2|3|4|6|7|78|94|95|96|97|98|99"], _ ; SONO LE E CINQUE ["10", "1|2|3|4|6|7|78|100|101|102|103|104"], _ ; SONO LE E DIECI ["15", "1|2|3|4|6|7|78|80|81|83|84|84|85|86|87|88"], _ ; SONO LE E UN QUARTO ["20", "1|2|3|4|6|7|78|89|90|91|92|93"], _ ; SONO LE E VENTI ["25", "1|2|3|4|6|7|78|89|90|91|92|93|94|95|96|97|98|99"], _ ; SONO LE E VENTICINQUE ["30", "1|2|3|4|6|7|78|106|107|108|109|110"], _ ; SONO LE E MEZZA ["35", "1|2|3|4|6|7|74|75|76|77|89|90|91|92|93|94|95|96|97|98|99"], _; SONO LE MENO VENTICINQUE (SONO LE E TRENTACINQUE) ["40", "1|2|3|4|6|7|74|75|76|77|89|90|91|92|93"], _ ; SONO LE MENO VENTI ["45", "1|2|3|4|6|7|74|75|76|77|80|81|83|84|85|86|87|88"], _ ; SONO LE MENO UN QUARTO ["50", "1|2|3|4|6|7|74|75|76|77|100|101|102|103|104"], _ ; SONO LE MENO DIECI ["55", "1|2|3|4|6|7|74|75|76|77|94|95|96|97|98|99"]] ; SONO LE MENO CINQUE Global $Text_It_Hour_Highlight[12][2] = _ [["01", "15|16|17"], _ ; UNA ["02", "19|20|21"], _ ; DUE ["03", "23|24|25"], _ ; TRE ["04", "56|57|58|59|60|61|62"], _ ; QUATTRO ["05", "67|68|69|70|71|72"], _ ; CINQUE ["06", "64|65|66"], _ ; SEI ["07", "51|52|53|54|55"], _ ; SETTE ["08", "26|27|28|29"], _ ; OTTO ["23", "30|31|32|33"], _ ; NOVE ["10", "34|35|36|37|38"], _ ; DIECI ["11", "39|40|41|42|43|44"], _ ; UNDICI ["12", "45|46|47|48|49|50"]] ; DODICI #EndRegion Coordinates by language ### ;Color array Global $Color_Themes[5][3] = _ [["Black Ice Tea", 0x000000, 0x303030], _ ["Cherry Cake", 0xDC0817, 0xB80713], _ ["Vanilla Sugar", 0xC4C3C1, 0xA2A1A0], _ ["Frozen Blackberry", 0x503082, 0x6A4F93], _ ["Lime Juice", 0xA8AF0A, 0x8C9107]] $Selected_Theme = IniRead($sIni_File, "Theme", "Selected", 0) $Selected_Lan = IniRead($sIni_File, "Language", "Selected", "en") Switch $Selected_Lan Case "en" $label_lang = StringSplit("Color|Language|Exit", "|") $lang = $Text_en_Split Case "de" $label_lang = StringSplit("Farbe|Sprache|Exit", "|") $lang = $Text_de_Split Case "nl" $label_lang = StringSplit("Kleur|Taal|Exit", "|") $lang = $Text_nl_Split Case "fr" $label_lang = StringSplit("Couleur|Langue|Exit", "|") $lang = $Text_fr_Split Case "sv" $label_lang = StringSplit("Färg|Språk|Avsluta", "|") $lang = $Text_sv_Split Case "it" $label_lang = StringSplit("Colore|Lingua|Uscita", "|") $lang = $Text_it_Split EndSwitch Global $Text_Color_Dark = $Color_Themes[$Selected_Theme][2] Global $Text_Color_Lit = 0xFFFFFF Global $Form_BK_Color = $Color_Themes[$Selected_Theme][1] Global $Combo_Add #Region ### START Koda GUI section ### Form= $QclockTwoForm = GUICreate("QLOCK TWO", 260, 240, -1, -1) GUISetBkColor($Form_BK_Color) $BK_Shine = GUICtrlCreatePic("", 0, 0, 260, 240) _SetImage($BK_Shine, 'QLOCK_shine.png') GUICtrlSetState(-1, $GUI_DISABLE) $k = 1 For $i = 1 To 10 For $j = 1 To 11 $Char_Text[$k] = GUICtrlCreateLabel($lang[$k], 20 * $j, 20 * $i, 20, 20, $SS_CENTER) GUICtrlSetFont(-1, 9, 400, 0, "Arial Narrow") GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $k += 1 Next Next $Char_Text_Remain[1] = GUICtrlCreateLabel(Chr(149), 10, 10, 10, 20, $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Char_Text_Remain[2] = GUICtrlCreateLabel(Chr(149), 240, 10, 10, 20, $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Char_Text_Remain[3] = GUICtrlCreateLabel(Chr(149), 240, 220, 10, 20, $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Char_Text_Remain[4] = GUICtrlCreateLabel(Chr(149), 10, 220, 10, 20, $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $Tray_Color = TrayCreateMenu($label_lang[1]) For $r = 1 To 5 Step 1 $Color_Chooser[$r] = TrayCreateItem($Color_Themes[$r - 1][0], $Tray_Color) Next $Tray_Lang = TrayCreateMenu($label_lang[2]) $Lang_Chooser_en = TrayCreateItem("English", $Tray_Lang) $Lang_Chooser_de = TrayCreateItem("Deutsch", $Tray_Lang) $Lang_Chooser_nl = TrayCreateItem("Nederlands", $Tray_Lang) $Lang_Chooser_fr = TrayCreateItem("Français", $Tray_Lang) $Lang_Chooser_sv = TrayCreateItem("Svenska", $Tray_Lang) $Lang_Chooser_it = TrayCreateItem("Italiano", $Tray_Lang) TrayCreateItem("") $Tray_Exit = TrayCreateItem($label_lang[3]) GUISetState(@SW_SHOW) _CalibrateTime() #EndRegion ### END Koda GUI section ### ; While 1 If $Hour_Min <> @HOUR & @MIN Then _CalibrateTime() $Hour_Min = @HOUR & @MIN EndIf $nMsg = TrayGetMsg() Switch $nMsg Case $Tray_Exit Exit Case $Color_Chooser[1] _Change_Color(1) Case $Color_Chooser[2] _Change_Color(2) Case $Color_Chooser[3] _Change_Color(3) Case $Color_Chooser[4] _Change_Color(4) Case $Color_Chooser[5] _Change_Color(5) Case $Lang_Chooser_en IniWrite($sIni_File, "Language", "Selected", "en") _RestartScript() Case $Lang_Chooser_de IniWrite($sIni_File, "Language", "Selected", "de") _RestartScript() Case $Lang_Chooser_nl IniWrite($sIni_File, "Language", "Selected", "nl") _RestartScript() Case $Lang_Chooser_fr IniWrite($sIni_File, "Language", "Selected", "fr") _RestartScript() Case $Lang_Chooser_sv IniWrite($sIni_File, "Language", "Selected", "sv") _RestartScript() Case $Lang_Chooser_it IniWrite($sIni_File, "Language", "Selected", "it") _RestartScript() EndSwitch If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd ; Func _CalibrateTime() $Get_Min = @MIN $Get_Hour = _Hour_Correct(@HOUR) Switch $Selected_Lan Case "en" $T_Min = $Text_en_Min_Highlight $T_Hour = $Text_en_Hour_Highlight Case "de" $T_Min = $Text_de_Min_Highlight $T_Hour = $Text_de_Hour_Highlight Case "nl" $T_Min = $Text_nl_Min_Highlight $T_Hour = $Text_nl_Hour_Highlight Case "fr" $T_Min = $Text_fr_Min_Highlight $T_Hour = $Text_fr_Hour_Highlight Case "sv" $T_Min = $Text_sv_Min_Highlight $T_Hour = $Text_sv_Hour_Highlight Case "it" $T_Min = $Text_it_Min_Highlight $T_Hour = $Text_it_Hour_Highlight EndSwitch If Mod(@MIN, 5) <> 0 Then _Set_Remainder_Min(@MIN) If Not $initiate Then Return EndIf $initiate = False EndIf For $g = 0 To 11 If _GetMinNumber($Get_Min) = $T_Min[$g][0] Then _Set_Remainder_Min(@MIN) $Text_Num_Split = StringSplit($T_Min[$g][1], "|") $Text_Hr_Split = StringSplit($T_Hour[$Get_Hour][1], "|") For $h = 1 To 110 GUICtrlSetColor($Char_Text[$h], $Text_Color_Dark) For $l = 1 To $Text_Num_Split[0] If $Text_Num_Split[$l] = $h Then GUICtrlSetColor($Char_Text[$Text_Num_Split[$l]], $Text_Color_Lit) EndIf Next For $m = 1 To $Text_Hr_Split[0] If $Text_Hr_Split[$m] = $h Then GUICtrlSetColor($Char_Text[$Text_Hr_Split[$m]], $Text_Color_Lit) EndIf Next Next Return EndIf Next EndFunc ;==>_CalibrateTime ; Func _Change_Color($colorNumb) GUISetBkColor($Color_Themes[$colorNumb - 1][1]) $Text_Color_Dark = $Color_Themes[$colorNumb - 1][2] $initiate = True _CalibrateTime() IniWrite($sIni_File, "Theme", "Selected", $colorNumb - 1) EndFunc ;==>_Change_Color ; Func _GetMinNumber($s_Number) Switch $s_Number Case 0 To 4 Return "00" Case 5 To 9 Return "05" Case 10 To 14 Return "10" Case 15 To 19 Return "15" Case 20 To 24 Return "20" Case 25 To 29 Return "25" Case 30 To 34 Return "30" Case 35 To 39 Return "35" Case 40 To 44 Return "40" Case 45 To 49 Return "45" Case 50 To 54 Return "50" Case 55 To 59 Return "55" EndSwitch EndFunc ;==>_GetMinNumber ; Func _Hour_Correct($s_Hour) Switch $s_Hour Case 13 To 23 $Hour = ($s_Hour - 13) Case 00 $Hour = 11 Case Else $Hour = $s_Hour - 1 EndSwitch Switch $Selected_Lan Case "en", "fr", "it" If @MIN > 34 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf Case "de" If @MIN > 19 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf Case "nl", "sv" If @MIN > 24 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf EndSwitch Return $Hour EndFunc ;==>_Hour_Correct ; Func _Set_Remainder_Min($q_Min) Local $e_Count $w_Min = StringRight($q_Min, 1) Switch $w_Min Case 1, 6 $e_Count = 1 Case 2, 7 $e_Count = 2 Case 3, 8 $e_Count = 3 Case 4, 9 $e_Count = 4 EndSwitch For $t = 1 To 4 GUICtrlSetColor($Char_Text_Remain[$t], $Text_Color_Dark) Next For $t = 1 To $e_Count GUICtrlSetColor($Char_Text_Remain[$t], $Text_Color_Lit) Next EndFunc ;==>_Set_Remainder_Min ; Func _RestartScript() If @Compiled = 1 Then Run(FileGetShortName(@ScriptFullPath)) Else Run(FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath)) EndIf Exit EndFunc ;==>_RestartScript ; Func _SetImage($hWnd, $sImage) ; Const $STM_SETIMAGE = 0x0172 Local $hImage, $hBitmap, $Style, $Error = False If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) If $hWnd = 0 Then Return SetError(1, 0, 0) EndIf EndIf _GDIPlus_Startup() $hImage = _GDIPlus_BitmapCreateFromFile($sImage) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) If $hBitmap = 0 Then Return SetError(1, 0, 0) EndIf $Style = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE) If @error Then $Error = 1 Else _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitOR($Style, Hex($SS_BITMAP))) If @error Then $Error = 1 Else _WinAPI_DeleteObject(_SendMessage($hWnd, $STM_SETIMAGE, $IMAGE_BITMAP, 0)) _SendMessage($hWnd, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap) If @error Then $Error = 1 EndIf EndIf EndIf If $Error Then _WinAPI_DeleteObject($hBitmap) EndIf _GDIPlus_BitmapDispose($hImage) _GDIPlus_Shutdown() Return SetError($Error, 0, Not $Error) EndFunc ;==>_SetImage argumentum 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now