![]() When the screenshot selection window is open you can use the enter key (instead of the default ctrl s) to quickly save the screenshot to the last folder location without opening up the 'save as' dialog custom menu See the docs page for more info on the various date formats that are available enter to save hotkey example: ^! #p (ctrl alt shift windows p)Īfter a file is saved, any other 'screenshot_x.png' files that were saved before you started using this script will be renamed to match the chosen time format.add the hotkeys you use for fullscreen screenshots here so that files are renamed when these are used.if you dont want any prefix before the date then clear or delete the prefix variable.add the format you want to use to the time_format variable.the default is "LS_20171115084024.png" but the format can easily be modified to something more readable by adding punctuation: format ![]() This script renames files with a date instead to avoid this problem. Lightshot saves files as 'screenshot_1, screenshot_2' etc which doesnt work well in most cases since changing the save folder to another one that already contains a 'screenshot_1' file means you will get the 'file already exists' warning and have to manually rename it. Until (folder = "") or (folder = "ERROR ") or (new_folder = folder) IniWrite, % " " new_folder, % a_lineFile, folders, folder_% a_index% RegWrite, REG_SZ, HKU, % lightshot_subkey, LastSavedDir, % a_thisMenuItemįileSelectFolder, new_folder, *%save_folder% RegWrite, REG_DWORD, HKU, % lightshot_subkey, KeepSelection, % new_value New_value := (keep_selection = 0) ? 1 : 0 RegWrite, REG_DWORD, HKU, % lightshot_subkey, CaptureCursor, % new_value New_value := (capture_cursor = 0) ? 1 : 0 GoSub, rename_with_date check for new screenshots Menu, lightshot, % (capture_cursor ? "check " : "unCheck "), Capture Cursor Menu, lightshot, % (keep_selection ? "check " : "unCheck "), Remember Selection Menu, lightshot, disable, %parent_folder% Menu, lightshot, add, Close this menu, menu_close Menu, lightshot, add, Folders, :folder_menu Menu, lightshot, add, %parent_folder%, menu_close Menu, lightshot, add, Capture Cursor, capture_cursor Menu, lightshot, add, Remember Selection, keep_selection Menu, lightshot, add, Settings:, menu_close Menu, lightshot, add, Cancel % a_tab% Esc, menu_esc Menu, lightshot, add, Clear selection, menu_clear Menu, lightshot, add, Select Full Screen % a_tab% Ctrl A, menu_ctrl Menu, lightshot, add, Save % a_tab% Ctrl S, menu_ctrl Menu, lightshot, add, Copy % a_tab% Ctrl C, menu_ctrl Menu, lightshot, add, Print % a_tab% Ctrl P, menu_ctrl Menu, lightshot, add, Upload to % a_tab% Ctrl D, menu_ctrl Menu, folder_menu, add, Add New Folder, add_folder Menu, folder_menu, add, % folder, set_folder If ( fileExist(folder)) and (folder != save_folder) IniRead, folder, % a_lineFile, folders, folder_% a_index% Menu, folder_menu, disable, % save_folder Menu, folder_menu, add, % save_folder, set_folder StringMid, parent_folder, save_folder, % pos 1 RegRead, capture_cursor, HKU, % lightshot_subkey, CaptureCursor RegRead, keep_selection, HKU, % lightshot_subkey, KeepSelection GoSub, rename_with_date rename any other 'screenshot_1.png' files WinWaitClose, Save As ahk_exe Lightshot.exe If winExist( "Save As ahk_exe Lightshot.exe ")įormatTime, formatted_time, % a_now, % time_formatĬontrolSetText, edit1, % prefix. WinGet, process_name, ProcessName, % "ahk_id " ls_id := lParam Save_folder := a_myDocuments "\Lightshot " RegRead, save_folder, HKU, % lightshot_subkey, LastSavedDir RegRead, dword, HKU, % lightshot_subkey, Formatįile_format := (dword = "1 ") ? "png " : (dword = "2 " ? "jpg " : "bmp ") file_extįormatTime, formatted_time, % a_loopFileTimeModified, % time_formatįileMove, % a_loopFileFullPath, % save_folder "\ " prefix. Loop, files, % save_folder() "\Screenshot_* ". #if winActive("ahk_exe Lightshot.exe",, "Save As") OnMessage( dllCall( "RegisterWindowMessage ", Str, "SHELLHOOK "), "shellMessage ") If (fullscreen) make hotkeys pass through to lightshotĭllCall( "RegisterShellHookWindow ", UInt, winExist()) code from SKAN IniRead, upload, % a_lineFile, settings, upload_hotkey IniRead, fullscreen, % a_lineFile, settings, fullscreen_hotkey IniRead, custom_menu, % a_lineFile, settings, custom_menu IniRead, time_format, % a_lineFile, settings, time_format IniRead, prefix, % a_lineFile, settings, prefix StringReplace, user_sid, a_loopRegSubKey, SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ If ( a_loopRegName = "ProfileImagePath ") Loop, HKLM, SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, 1, 1 get user SID Description = improvements for lightshot ()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |