global $my_version = "0.8.3" #AutoIt3Wrapper_Res_Fileversion=0.8.3 #cs Between Days Calculates the number of days between two dates. Two big calendars, basically. #ce #include #include #include #include #include #include #include "..\..\Includes\corzShared.au3" global $my_name = "Between-Days" global $my_title = "Between-Days.." global $ini_file = $my_name & ".ini" global $my_url = "http://corz.org/windows/software/accessories/Between-Days.php" global $exit_code = false AutoItSetOption("GUIOnEventMode", 1) AutoItSetOption("GUICoordMode", 0) AutoItSetOption("TrayMenuMode", 9) AutoItSetOption("TrayOnEventMode", 1) HotKeySet("{Esc}", "HotkeyQuit") TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "TrayToggleWindow") $exit_code = -99 global $command_path, $main_gui, $default_ini_installed global $min_width, $width_magic, $min_height, $height_magic global $default_input_x, $default_input_y, $default_input_width, $input_x, $input_y, $input_width global $show_tips, $notify, $beep, $taskbar_entry, $always_on_top, $explorer_context global $tray_always_on_top, $fade_in global $timer_stamp = 0, $visible, $hover_to_show, $hover_sensitivity, $days_weeks, $combo_days_weeks global $cal_start_date, $cal_end_date, $start_date, $end_date, $input_days_weeks, $between, $check_days_lock, $lock_between global $dropped_file, $last_click, $app_path if @Compiled then $app_path = @ScriptFullPath else $app_path = ".\" & $my_name & ".exe" endif global $old_windows = false if StringLeft(@OSVersion, 6) = "Win_20" or StringLeft(@OSVersion, 6) = "Win_XP" then $old_windows = true debug("old_windows =>" & $old_windows & "<=", @ScriptLineNumber) if $cmdline[0] then $command_path = StringStripWS($cmdline[$cmdline[0]], 3) endif if $command_path = "portable" then $default_ini_installed = FileInstall("Resources\Between-Days.ini", @ScriptDir & "\" & $ini_file) $command_path = "" endif if FileExists(@ScriptDir & "\" & $ini_file) then $data_dir = @ScriptDir $ini_path = $data_dir & "\" & $ini_file else $data_dir = @AppDataDir & "\corz\" & $my_name if not FileExists($data_dir) then DirCreate($data_dir) $ini_path = $data_dir & "\" & $ini_file $default_ini_installed = FileInstall("Resources\Between-Days.ini", $ini_path) endif if not $default_ini_installed then UpdateIniFile() GetPrefs() $old_windows = false if StringLeft(@OSVersion, 6) = "WIN_20" or StringLeft(@OSVersion, 6) = "WIN_XP" then $old_windows = true MakeTray() MakeGUI() SetAlwaysOnTop() SetHotkeys() TraySetOnEvent($TRAY_EVENT_MOUSEOVER, "WindowToFront") while $exit_code = -99 Sleep(50) wend ; gui_ss_default_gui = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_SIZEBOX) global $butt_set_cal, $tip func MakeGUI() if $taskbar_entry = $on then $main_gui = GUICreate($my_title, $window_width, $window_height, $window_x, $window_y, $GUI_SS_DEFAULT_GUI, $WS_EX_ACCEPTFILES) else local $dummy_container = GUICreate("", -1, -1, 0, 0, 0, BitOR($WS_EX_ACCEPTFILES, $WS_EX_TOOLWINDOW)) $main_gui = GUICreate($my_title, $window_width, $window_height, $window_x, $window_y, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_MINIMIZEBOX), -1, $dummy_container) endif GUISetIcon($app_path, 0, $main_gui) GUISetOnEvent($GUI_EVENT_CLOSE, "MenuQuit") GUISetOnEvent($GUI_EVENT_RESIZED, "CheckSize") GUISetOnEvent($GUI_EVENT_RESIZED, "ResizeCheckSize") GUISetOnEvent($GUI_EVENT_PRIMARYUP, "PrimaryUpCheckSize") GUISetOnEvent($GUI_EVENT_MINIMIZE, "TrayToggleWindow") GUISetCoord(5, 5) ; local $dummy_start = GUICtrlCreateGroup("", 0, 0) if $old_windows then $cal_start_date = GUICtrlCreateMonthCal($start_date, 0, 0, 182, 160) else $cal_start_date = GUICtrlCreateMonthCal($start_date, 0, 0) endif GUICtrlSetOnEvent(-1, "UpdateDaysBetweenStart") GUICtrlSetResizing(-1, BitOr($GUI_DOCKLEFT,$GUI_DOCKSIZE)) if $old_windows then $cal_end_date = GUICtrlCreateMonthCal($end_date, ($window_width / 2) - 5, 0, 182, 160) else $cal_end_date = GUICtrlCreateMonthCal($end_date, ($window_width / 2) - 5, 0) endif GUICtrlSetOnEvent(-1, "UpdateDaysBetweenEnd") GUICtrlSetResizing(-1, BitOr($GUI_DOCKRIGHT,$GUI_DOCKSIZE)) GUISetCoord(7, $window_height - 24) $combo_days_weeks = GUICtrlCreateCombo("days", 0, 0, 60, 200) GUICtrlSetData(-1, "weeks", $days_weeks) GUICtrlSetOnEvent(-1, "ToggleDaysWeeks") GUICtrlSetResizing(-1, BitOr($GUI_DOCKLEFT,$GUI_DOCKBOTTOM,$GUI_DOCKSIZE)) GUICtrlCreateLabel("Between:", 70, 3, 50) GUICtrlSetResizing(-1, BitOr($GUI_DOCKLEFT,$GUI_DOCKBOTTOM,$GUI_DOCKSIZE)) $input_days_weeks = GUICtrlCreateInput(0, 55, -3, 50, 21, 8192) GUICtrlSetResizing(-1, BitOr($GUI_DOCKLEFT,$GUI_DOCKBOTTOM,$GUI_DOCKSIZE)) $check_days_lock = GUICtrlCreateCheckbox("Lock", 60, -1) GUICtrlSetOnEvent(-1, "ToggleLock") GUICtrlSetResizing(-1, BitOr($GUI_DOCKLEFT,$GUI_DOCKBOTTOM,$GUI_DOCKSIZE)) GUICtrlSetState(-1, $lock_between) GUISetCoord(0, $window_height - 24) $butt_set_cal = GUICtrlCreateButton("Set Calendar!", $window_width - 92, -2, 88, 22, 1) GUICtrlSetOnEvent(-1, "SetCalendarToDaysBetween") GUICtrlSetResizing(-1, BitOr($GUI_DOCKRIGHT,$GUI_DOCKBOTTOM,$GUI_DOCKSIZE)) ; local $dummy_end = GUICtrlCreateGroup("0", -9999, -9999) ; For $i = $dummy_start To $dummy_end ; GUICtrlSetResizing($i, $GUI_DOCKALL) ; Next if $show_tips = $on then $tip = " This calendar sets the start date. Once a date is set here " & @CRLF & _ " enter a number of days (in the Between Days input), clicking " & @CRLF & _ ' Set Calendar!" () sets the *other* calendar to the future.' GUICtrlSetTip($cal_start_date, $tip) $tip = " This calendar displays the end date. " & @CRLF & _ " NOTE: When the Between Days is locked, either calendar can set the origin date. " & @CRLF & _ " TIP: clicking the grey dates outside the current month moves you instantly to that month. " GUICtrlSetTip($cal_end_date, $tip) $tip = " The number of days between the two dates you picked, is displayed here. " & @LF & _ " You can also enter a number of days, and set the calendar from that number. " GUICtrlSetTip($input_days_weeks, $tip) $tip = " Check this, and the value will remain fixed. Then click either calendar " & @CRLF & _ " and the *other* calendar will jump to THIS many days away. Quite niffty. " GUICtrlSetTip($check_days_lock, $tip) $tip = " You can enter a number of days manually, then click " & @CRLF & _ " here to set the right-hand calendar to THAT date. " GUICtrlSetTip($butt_set_cal, $tip) endif CheckSize() SetBetweenInput() UpdateDaysBetween() if $fade_in = $on then FadeIn($main_gui) else GUISetState() endif $visible = true endfunc func GetPrefs() $window_x = IniRead($ini_path, $my_name, "x", -1) $window_y = IniRead($ini_path, $my_name, "y", -1) if $old_windows then $min_width = 376 $min_height = 200 else $min_width = 460 $min_height = 180 endif $window_width = IniRead($ini_path, $my_name, "width", -1) $window_height = IniRead($ini_path, $my_name, "height", -1) ; $min_width = $window_width $width_magic = 8 ; $min_height = $window_height $height_magic = 27 $default_input_x = 30 $default_input_y = 241 $default_input_width = 484 $input_x = IniRead($ini_path, $my_name, "input_x", $default_input_x) $input_y = IniRead($ini_path, $my_name, "input_y", $default_input_y) $input_width = IniRead($ini_path, $my_name, "input_width", $default_input_width) $show_tips = inireadcheckboxvalue($ini_path, $my_name, "show_tips", $on) $taskbar_entry = inireadcheckboxvalue($ini_path, $my_name, "taskbar_entry", $on) $always_on_top = inireadcheckboxvalue($ini_path, $my_name, "always_on_top", $off) $beep = inireadcheckboxvalue($ini_path, $my_name, "beep", $on) $hover_to_show = inireadcheckboxvalue($ini_path, $my_name, "hover_to_show", $on) $hover_sensitivity = Abs(Int(IniRead($ini_path, $my_name, "hover_sensitivity", 8))) $fade_in = inireadcheckboxvalue($ini_path, $my_name, "fade_in", $on) $start_date = IniRead($ini_path, $my_name, "start_date", "") $end_date = IniRead($ini_path, $my_name, "end_date", "") $lock_between = inireadcheckboxvalue($ini_path, $my_name, "day_lock", $off) $between = Int(IniRead($ini_path, $my_name, "between", "")) $days_weeks = IniRead($ini_path, $my_name, "days_weeks", "days") $last_click = inireadcheckboxvalue($ini_path, $my_name, "last_click", "-") endfunc func UpdateDaysBetweenStart() $last_click = $off if $lock_between = $on then SetCalendarToDaysBetween() else UpdateDaysBetween() endif endfunc func UpdateDaysBetweenEnd() $last_click = $on if $lock_between = $on then SetCalendarToDaysBetween() else UpdateDaysBetween() endif endfunc func SetBetweenInput() if $days_weeks = "weeks" then GUICtrlSetData($input_days_weeks, Round($between / 7, 2)) else GUICtrlSetData($input_days_weeks, $between) endif endfunc func ReturnBetweenInput() local $between_val = GUICtrlRead($input_days_weeks) if $days_weeks = "weeks" then return Round($between_val * 7) endif return Int($between_val) endfunc func SetCalendarToDaysBetween() local $end_d, $start_d if $lock_between = $on and $last_click = $on then $end_d = GUICtrlRead($cal_end_date) $start_d = _dateadd("D", 0 - Int(ReturnBetweenInput()), $end_d) GUICtrlSetData($cal_start_date, $start_d) else $start_d = GUICtrlRead($cal_start_date) $end_d = _dateadd("D", Int(ReturnBetweenInput()), $start_d) GUICtrlSetData($cal_end_date, $end_d) endif UpdateDaysBetween() endfunc func UpdateDaysBetween() local $diff, $set_between, $start_d, $end_d, $dd $start_d = GUICtrlRead($cal_start_date) $end_d = GUICtrlRead($cal_end_date) if $lock_between = $on then $diff = Int(ReturnBetweenInput()) $set_between = $diff else $diff = _datediff("D", $start_d, $end_d) $set_between = $diff if $days_weeks = "weeks" then $set_between = Round($diff / 7, 2) endif GUICtrlSetData($input_days_weeks, $set_between) endif $between = $diff IniWrite($ini_path, $my_name, "between", $between) local $weeks = Int($between / 7) local $xtrad = $diff - ($weeks * 7) if $xtrad > 0 then $dd = " day" if $xtrad > 1 then $dd &= "s" $xtrad = " and " & $xtrad & $dd else $xtrad = "" endif InfoTitle($diff & " days (" & $weeks & " wks" & $xtrad & ")") endfunc func ToggleLock() if $lock_between = $on then $lock_between = $off else $lock_between = $on endif GUICtrlSetState($check_days_lock, $lock_between) iniwritecheckboxvalue($ini_path, $my_name, "day_lock", $lock_between) endfunc func ToggleDaysWeeks() debug("ToggleDaysWeeks: days_weeks OLD ->" & $days_weeks & "<-", @ScriptLineNumber) local $set_between local $old_dw = $days_weeks $days_weeks = GUICtrlRead($combo_days_weeks) if $days_weeks <> "days" and $days_weeks <> "weeks" then $days_weeks = $old_dw endif if $days_weeks = "days" then $set_between = $between else $set_between = Round($between / 7, 2) endif GUICtrlSetState($combo_days_weeks, $days_weeks) GUICtrlSetData($input_days_weeks, $set_between) iniwritecheckboxvalue($ini_path, $my_name, "days_weeks", $days_weeks) SetCalendarToDaysBetween() debug("ToggleDaysWeeks: days_weeks NEW ->" & $days_weeks & "<-", @ScriptLineNumber) endfunc func InfoTitle($info) WinSetTitle($main_gui, "", $my_title & " " & $info) endfunc func MakeTray() TrayCreateItem("Edit ini file (prefs)") TrayItemSetOnEvent(-1, "EditIniFile") TrayCreateItem("") $tray_always_on_top = TrayCreateItem("Always On Top") TrayItemSetState(-1, $always_on_top) TrayItemSetOnEvent(-1, "ToggleAlwaysOnTop") TrayCreateItem("") TrayCreateItem("About " & $my_name) TrayItemSetOnEvent(-1, "DoAboutBox") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "TrayQuit") TraySetClick(8) TraySetState(1) TraySetIcon($app_path, 0) endfunc func TrayToggleWindow() ToggleWindow() endfunc func ToggleWindow() local $winstate = WinGetState($main_gui) if BitAND($winstate, 2) then UnsetHotkeys() GUISetState(@SW_HIDE, $main_gui) $visible = false DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1) else GUISetState(@SW_SHOW, $main_gui) $visible = true SetHotkeys() endif endfunc func ResizeCheckSize() CheckSize() endfunc func PrimaryUpCheckSize() CheckSize() endfunc func CheckSize($save = true) ; local $size_array = WinGetPos($my_title) ; if not IsArray($size_array) then return 0 ; if $size_array[2] < $min_width + $width_magic then WinMove($my_title, "", Default, Default, $min_width + $width_magic) ; if $size_array[3] < $min_height + $height_magic then WinMove($my_title, "", Default, Default, Default, $min_height + $height_magic) ; Sleep(25) local $size_array = WinGetPos($my_title) if not IsArray($size_array) then return 0 if $size_array[0] > @DesktopWidth - $size_array[2] then WinMove($my_title, "", @DesktopWidth - $size_array[2], default, default) if $size_array[1] > @DesktopHeight - $size_array[3] then WinMove($my_title, "", default, @DesktopHeight - $size_array[3], default) Sleep(25) $size_array = WinGetPos($my_title) if not IsArray($size_array) then return 0 if $size_array[0] < 0 then WinMove($my_title, "", 0, default) if $save then IniWrite($ini_path, $my_name, "x", 0) endif if $size_array[0] > @DesktopWidth - $size_array[2] then WinMove($my_title, "", @DesktopWidth - $size_array[2], default) if $save then IniWrite($ini_path, $my_name, "x", @DesktopWidth - $size_array[2]) endif if $size_array[1] < 0 then WinMove($my_title, "", default, 0) if $save then IniWrite($ini_path, $my_name, "y", 0) endif if $size_array[1] > @DesktopHeight - $size_array[3] then WinMove($my_title, "", default, @DesktopHeight - $size_array[3]) if $save then IniWrite($ini_path, $my_name, "y", @DesktopHeight - $size_array[3]) endif return true endfunc func SaveXYPrefs() if not CheckSize() then return 0 local $size_array = WinGetPos($my_title) if not IsArray($size_array) then return 0 if $window_x <> $size_array[0] and $size_array[0] >= 0 and $size_array[0] < (@DesktopWidth - 25) then IniWrite($ini_path, $my_name, "x", $size_array[0]) if $window_y <> $size_array[1] and $size_array[1] >= 0 and $size_array[1] < (@DesktopHeight - 25) then IniWrite($ini_path, $my_name, "y", $size_array[1]) $size_array = WinGetClientSize($my_title) if not IsArray($size_array) then return 0 if $size_array[0] <> $window_width and $size_array[0] >= $min_width then IniWrite($ini_path, $my_name, "width", $size_array[0]) if $size_array[1] <> $window_height and $size_array[1] >= $min_height then IniWrite($ini_path, $my_name, "height", $size_array[1]) endfunc func UpdateIniFile() local $old_version = IniRead($ini_path, $my_name, "version", 0) local $vcomp = _versioncompare($my_version, $old_version) switch $vcomp case 0, -1 return false endswitch local $tmp_ini = @TempDir & "\" & $ini_file & ".new" FileInstall("Resources\Between-Days.ini", $tmp_ini, 1) local $existing_sections = IniReadSectionNames($tmp_ini) if IsArray($existing_sections) then for $a = 1 to $existing_sections[0] if $existing_sections[$a] <> $my_name then IniDelete($tmp_ini, $existing_sections[$a]) endif next endif $existing_sections = IniReadSectionNames($ini_path) if IsArray($existing_sections) then for $a = 1 to $existing_sections[0] local $section = IniReadSection($ini_path, $existing_sections[$a]) if IsArray($section) then for $b = 1 to $section[0][0] if StringLeft($section[$b][0], 1) <> "#" then IniWrite($tmp_ini, $existing_sections[$a], $section[$b][0], $section[$b][1]) endif next endif next endif FileMove($ini_path, getparent($ini_path) & "\[" & @YEAR & "-" & @MON & "-" & @MDAY & "@" & @HOUR & "." & @MIN & "] " & $ini_file & ".ini") FileMove($tmp_ini, $ini_path, 1) IniWrite($ini_path, $my_name, "version", $my_version) endfunc func FadeIn($gui, $step = 5) WinSetTrans($gui, "", 0) GUISetState(@SW_SHOW, $gui) local $i = 100 while $i >= 3 WinSetTrans($gui, "", (100 - $i) * 2.55) Sleep(5) $i -= $step wend WinSetTrans($gui, "", 255) WinActivate($gui) endfunc func WindowToFront() if not $visible then return if $hover_to_show = $off then return if $timer_stamp = 0 or _timer_diff($timer_stamp) > 1000 then $timer_stamp = _timer_init() endif local $diff = _timer_diff($timer_stamp) if $diff > ((11 - $hover_sensitivity) * 100) then $timer_stamp = 0 WinSetOnTop($main_gui, "", 1) WinSetOnTop($main_gui, "", 0) Sleep(100) WinActivate($main_gui) RepaintGUI($main_gui) endif endfunc func RepaintGUI($hwnd, $trect = 0, $hregion = 0, $iflags = 5) local $prect, $aresult if $trect <> 0 then $prect = DllStructGetPtr($trect) $aresult = DllCall("User32.dll", "int", "RedrawWindow", "hwnd", $hwnd, "ptr", $prect, "int", $hregion, "int", $iflags) if IsArray($aresult) then return ($aresult[0] <> 0) endfunc func SetAlwaysOnTop() if $always_on_top = $on then WinSetOnTop($main_gui, "", 1) else WinSetOnTop($main_gui, "", 0) endif endfunc func ToggleAlwaysOnTop() if $always_on_top = $off then $always_on_top = $on else $always_on_top = $off endif SetAlwaysOnTop() TrayItemSetState($tray_always_on_top, $always_on_top) iniwritecheckboxvalue($ini_path, $my_name, "always_on_top", $always_on_top) endfunc func DoAboutBox() local $last_event_mode = AutoItSetOption("GUIOnEventMode", 0) local $last_coord_mode = AutoItSetOption("GUICoordMode", 1) DialogOpen() local $gui_about = GUICreate(" About " & $my_name & "..", 250, 105, -1, -1, $WS_CAPTION, $WS_EX_TOPMOST) GUICtrlCreateLabel(" " & $my_name & " v" & $my_version & @LF & " from corz.org", 60, 8) GUICtrlCreateIcon($app_path, 0, 10, 10) GUICtrlCreateLabel(" Do you want to visit the " & @LF & " " & $my_name & " web page at this time? ", 60, 40) local $gui_about_no = GUICtrlCreateButton("NO, not right now", 10, 80, 95, 22) GUICtrlSetTip(-1, "The other button is the one you want to click!") local $gui_about_ok = GUICtrlCreateButton("YES, let's do it!", 148, 80, 95, 22) GUICtrlSetTip(-1, "The link will open in your system default browser") GUISetState() if WinExists($my_name) then GUISetState(@SW_DISABLE, $main_gui) while 1 local $msg = GUIGetMsg() switch $msg case $GUI_EVENT_CLOSE, $gui_about_no GUIDelete($gui_about) exitloop case $gui_about_ok visiturl($my_url) GUIDelete($gui_about) exitloop endswitch wend AutoItSetOption("GUICoordMode", $last_coord_mode) AutoItSetOption("GUIOnEventMode", $last_event_mode) DialogClose() endfunc func DialogOpen() GUISetState(@SW_DISABLE, $main_gui) TraySetState(2) UnsetHotkeys() endfunc func DialogClose() TraySetState(1) GUISetState(@SW_ENABLE, $main_gui) WinActivate($main_gui) GUISwitch($main_gui) SetHotkeys() endfunc func SetHotkeys() HotKeySet("{Esc}", "HotkeyQuit") endfunc func UnsetHotkeys() HotKeySet("{Esc}") endfunc func HotkeyQuit() if WinActive($main_gui) then DoQuit(-9) else HotKeySet("{Esc}") Send("{Esc}") HotKeySet("{Esc}", "HotkeyQuit") endif endfunc func SaveOptions() local $i = GUICtrlRead($cal_start_date) if $start_date <> $i then $start_date = $i IniWrite($ini_path, $my_name, "start_date", $start_date) endif $i = GUICtrlRead($cal_end_date) if $end_date <> $i then $end_date = $i IniWrite($ini_path, $my_name, "end_date", $end_date) endif if $lock_between = $on then IniWrite($ini_path, $my_name, "days", GUICtrlRead($input_days_weeks)) endif endfunc func TrayQuit() DoQuit(-9) endfunc func MenuQuit() DoQuit(-9) endfunc func DoQuit($requested_exit_code = 0) SaveOptions() SaveXYPrefs() exit $requested_exit_code endfunc ; AutoIt Wrapper / Compiler directives.. ; #Region ; for resources included with FileInstall() #pragma compile(Compression, 9) ;::dev::.. ; if you want your binary NOW, comment this out.. #AutoIt3Wrapper_Run_Au3Stripper=Y ; See the notes above debug() (in cel.au3) for what /rsln does. #Au3Stripper_Parameters=/rsln ; Like calling the wrapper with /debug, which we do anyway. This is handy, though .. #AutoIt3Wrapper_Run_Debug_Mode=Y #AutoIt3Wrapper_LogFile=%scriptdir%\wrapper.log #AutoIt3Wrapper_UseX64=Y #AutoIt3Wrapper_UseUpx=N #AutoIt3Wrapper_Run_AU3Check=Y #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 -v 1 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y #AutoIt3Wrapper_Run_Stop_OnError=Y ; Main program icon.. ; Note: *** MAY NEED FORWARD SLASHES IN RELATIVE PATHS - YMMV!!! *** #AutoIt3Wrapper_Icon=Resources\Between-Days.ico ; #AutoIt3Wrapper_Res_Icon_Add=Resources\checksum-document.ico ; Free-form Res Fields.. #AutoIt3Wrapper_Res_Field=Author|corz.org #AutoIt3Wrapper_Res_Field=Contact|checksum@corz.org #AutoIt3Wrapper_Res_Field=Long Description|Between Days tells you the number of days between two dates. #AutoIt3Wrapper_Res_Field=Publisher|corz.org #AutoIt3Wrapper_Res_Field=Web Page|https://corz.org/windows/software/accessories/Between-Days.php #AutoIt3Wrapper_Res_Field=Compiled|%date% %time% ; These now have their own fields.. #AutoIt3Wrapper_Res_ProductName=Between Days #AutoIt3Wrapper_Res_CompanyName=corz.org #AutoIt3Wrapper_Res_LegalCopyright=corz.org ; Application's resource info.. #AutoIt3Wrapper_Res_Comment=Between Days ; This is the one that shows up in Process Explorer.. #AutoIt3Wrapper_Res_Description=Between Days #AutoIt3Wrapper_Res_LegalCopyright=corz.org #AutoIt3Wrapper_Res_ProductVersion=2 ;#AutoIt3Wrapper_Res_Field=Build|DEBUG ;#AutoIt3Wrapper_Res_Field=Build|Beta Release #AutoIt3Wrapper_Res_Field=Build|Special Release ; I must get a shot of my son's Surface and see if this does anything! I suspect not. #AutoIt3Wrapper_Res_HiDpi=Y ; Backup this version of the script (dropped into a backup.zip, below). So I don't have to remember to.. #AutoIt3Wrapper_Run_After=copy "%in%" ".\%scriptfile% - %fileversion%.au3" ; Handy to keep a backup of the stripped version, too.. #AutoIt3Wrapper_Run_After=move /Y .\%scriptfile%_stripped.au3 ".\%scriptfile% - %fileversion%_stripped.au3" ; Backup this version of the source files to BackUp.zip.. #AutoIt3Wrapper_Run_After=7z.exe a -mx7 -tzip ".\BackUp.zip" ".\%scriptfile% - %fileversion%.au3" #AutoIt3Wrapper_Run_After=7z.exe a -mx7 -tzip ".\BackUp.zip" ".\%scriptfile% - %fileversion%_stripped.au3" ; Note: The 7z and checksum program directories are in my %PATH% (System Properties >> Advanced >> Environment Variables). ; Which is why I don't need to supply the full paths in these commands. ; Finally, remove the (now-zipped) source files.. #AutoIt3Wrapper_Run_After=del /f /q ".\%scriptfile% - %fileversion%.au3" #AutoIt3Wrapper_Run_After=del /f /q ".\%scriptfile% - %fileversion%_stripped.au3" #endRegion