From 2da94ac45834ec36b62aff5170f282c16332582a Mon Sep 17 00:00:00 2001 From: "Rodolfo U. Batista" Date: Tue, 22 Sep 2020 16:07:38 -0300 Subject: [PATCH] * Fixed inconsistency in exported OCR function from Image To Text. * Fixed bug when using Apply button in command windows. --- Documentation/About.md | 6 ++++- Documentation/MacroCreator_Help.ahk | 2 +- Documentation/Main.md | 2 +- Documentation/Playback.md | 5 +++-- LIB/Export.ahk | 2 +- MacroCreator.ahk | 34 ++++++++++++++--------------- README.md | 2 +- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/Documentation/About.md b/Documentation/About.md index 3dc899c9..b9a8772a 100644 --- a/Documentation/About.md +++ b/Documentation/About.md @@ -7,7 +7,7 @@ Author: Pulover \[Rodolfo U. Batista\] Copyright © 2012-2020 Rodolfo U. Batista -Version: 5.2.0 +Version: 5.2.1 Release Date: September, 2020 AutoHotkey Version: 1.1.33.02 @@ -37,6 +37,10 @@ chosen1ft for fixing the mixing rows bug when saving a project. # Change Log +## Version 5.2.1 +* Fixed inconsistency in exported OCR() function from Image To Text. +* Fixed bug when using Apply button in command windows. + ## Version 5.2.0 * Added new feature: **Image to Text (OCR)** in *Image Search* command window. * Added support for defining *any* hotkey for **Play** manually in Edit Macros window. diff --git a/Documentation/MacroCreator_Help.ahk b/Documentation/MacroCreator_Help.ahk index 57a70d47..e6c70bc6 100644 --- a/Documentation/MacroCreator_Help.ahk +++ b/Documentation/MacroCreator_Help.ahk @@ -1,7 +1,7 @@ /*! Library: Pulover's Macro Creator - # Version: 5.2.0 + # Version: 5.2.1 [www.macrocreator.com](https://www.macrocreator.com) [Forum Thread](https://www.autohotkey.com/boards/viewtopic.php?f=6&t=143) diff --git a/Documentation/Main.md b/Documentation/Main.md index d7e5bedc..8ab1da7f 100644 --- a/Documentation/Main.md +++ b/Documentation/Main.md @@ -133,7 +133,7 @@ Copies all commands from currently selected Macro to a new tab. ### Edit Macros -Opens the *Edit Macros* window where you can reorder and rename macros. Double click an item to change also hotkeys and loops. +Opens the *Edit Macros* window where you can reorder and rename macros. Double click an item to change hotkeys and loops as well. Here you can set hotkeys not supported by the control in the main window, including mouse buttons, for the Play hotkey. ### Import Macro diff --git a/Documentation/Playback.md b/Documentation/Playback.md index b98baa19..bf24523e 100644 --- a/Documentation/Playback.md +++ b/Documentation/Playback.md @@ -17,14 +17,15 @@ The *Play Current Macro* button will run the active Macro immediately without ac ## Hotkeys -Hotkeys are sometimes referred to as shortcut keys and are used to run/play the macros. Playback Hotkeys are set in the hotkey toolbars in the main window. +Hotkeys are sometimes referred to as shortcut keys and are used to run/play the macros. Playback Hotkeys are set in the hotkey toolbars in the main window or in the *Edit Macros* window (Ctrl+Shift+M). Use `Backspace` to clear the hotkeys. Press it twice to set `Backspace` as the hotkey. ### Play -Selects the Automatic Hotkey to execute the currently selected Macro. +Selects the Play Hotkey to execute the currently selected Macro. You can make combinations with modifiers such as `Ctrl + X`. +If you want to use a hotkey that's not supported by this control, you can go to *Edit Macros* window (Ctrl+Shift+M) and enter a valid hotkey manually. In there you can use any supported AHK hotkey, including mouse buttons. **Windows Key**: To make combination with the Windows key, check the option *Add the Windows key to "Play" hotkey* in the Options menu or in the Options toolbar. diff --git a/LIB/Export.ahk b/LIB/Export.ahk index 6559feeb..88a7c660 100644 --- a/LIB/Export.ahk +++ b/LIB/Export.ahk @@ -245,7 +245,7 @@ Loop, 5 Stp%A_Index% := "" StringSplit, Stp, Step, `,, %A_Space%%A_Tab% - RowData := "`n" Stp5 " := OCR([" Stp1 ", " Stp2 ", " (Stp3 - Stp1) ", " (Stp4 - Stp2) "], """ Target """)" + RowData := "`n" Stp5 " := OCR([" CheckExp(Stp1) ", " CheckExp(Stp2) ", " (RegExMatch(Stp3, "%\w+%") ? CheckExp(Stp3) : (CheckExp(Stp3) - CheckExp(Stp1))) ", " (RegExMatch(Stp4, "%\w+%") ? CheckExp(Stp4) : (CheckExp(Stp4) - CheckExp(Stp2))) "], """ Target """)" Case cType17: If (Step = "Else") { diff --git a/MacroCreator.ahk b/MacroCreator.ahk index f7e6b28e..dbeea851 100644 --- a/MacroCreator.ahk +++ b/MacroCreator.ahk @@ -5,7 +5,7 @@ ; Author: Pulover [Rodolfo U. Batista] ; Home: https://www.macrocreator.com ; Forum: https://www.autohotkey.com/boards/viewforum.php?f=63 -; Version: 5.2.0 +; Version: 5.2.1 ; Release Date: September, 2020 ; AutoHotkey Version: 1.1.33.02 ; Copyright © 2012-2020 Rodolfo U. Batista @@ -74,7 +74,7 @@ https://www.macrocreator.com/project/ ; Compiler Settings ;@Ahk2Exe-SetName Pulover's Macro Creator ;@Ahk2Exe-SetDescription Pulover's Macro Creator -;@Ahk2Exe-SetVersion 5.2.0 +;@Ahk2Exe-SetVersion 5.2.1 ;@Ahk2Exe-SetCopyright Copyright © 2012-2020 Rodolfo U. Batista ;@Ahk2Exe-SetOrigFilename MacroCreator.exe @@ -142,7 +142,7 @@ Loop } -CurrentVersion := "5.2.0", ReleaseDate := "September, 2020" +CurrentVersion := "5.2.1", ReleaseDate := "September, 2020" ;##### Ini File Read ##### @@ -1682,30 +1682,30 @@ GoToLine: If (Capt || Record || !ShowPrev) return Gui, chMacro:Default -RowSelection := LV_GetCount("Selected") -If (RowSelection = 0) +GoRowSelection := LV_GetCount("Selected") +If (GoRowSelection = 0) { sciPrev.SetSel(0, 0) sciPrevF.SetSel(0, 0) return } -SelectedRow := LV_GetNext() -LV_GetText(CodeLineStart, SelectedRow, 11) -RowNumber := 0 -Loop, %RowSelection% - RowNumber := LV_GetNext(RowNumber) -LV_GetText(CodeNextLine, RowNumber + 1, 11) +GoSelectedRow := LV_GetNext() +LV_GetText(CodeLineStart, GoSelectedRow, 11) +GoRowNumber := 0 +Loop, %GoRowSelection% + GoRowNumber := LV_GetNext(GoRowNumber) +LV_GetText(CodeNextLine, GoRowNumber + 1, 11) CodeLineStart-- CodeNextLine-- sciPrev.GoToLine(CodeLineStart) sciPrevF.GoToLine(CodeLineStart) -If ((RowSelection > 1) || (CodeNextLine <= 0) || ((CodeNextLine - CodeLineStart) > 1)) +If ((GoRowSelection > 1) || (CodeNextLine <= 0) || ((CodeNextLine - CodeLineStart) > 1)) { - RowNumber := 0 - Loop, %RowSelection% - RowNumber := LV_GetNext(RowNumber) - LastRowSelected := RowNumber = LV_GetCount() - RowNumber := LastRowSelected ? RowNumber : RowNumber + 1 + GoRowNumber := 0 + Loop, %GoRowSelection% + GoRowNumber := LV_GetNext(GoRowNumber) + LastRowSelected := GoRowNumber = LV_GetCount() + GoRowNumber := LastRowSelected ? GoRowNumber : GoRowNumber + 1 CaretPos := sciPrev.PositionFromLine(CodeLineStart) Anchor := (CodeNextLine > 0 ? sciPrev.PositionFromLine(CodeNextLine) : sciPrev.GetLength()) - 1 sciPrev.SetSel(Anchor, CaretPos) diff --git a/README.md b/README.md index 47d91ec1..fb166fe0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Pulover's Macro Creator is a Free Automation Tool and Script Generator based on [www.macrocreator.com](https://www.macrocreator.com) -**Current Version:** 5.2.0 +**Current Version:** 5.2.1 ### Supported platforms