Skip to content

Commit

Permalink
* Fixed inconsistency in exported OCR function from Image To Text.
Browse files Browse the repository at this point in the history
* Fixed bug when using Apply button in command windows.
  • Loading branch information
Pulover committed Sep 22, 2020
1 parent 56170aa commit 2da94ac
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 24 deletions.
6 changes: 5 additions & 1 deletion Documentation/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/MacroCreator_Help.ahk
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Main.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions Documentation/Playback.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion LIB/Export.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down
34 changes: 17 additions & 17 deletions MacroCreator.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -142,7 +142,7 @@ Loop
}


CurrentVersion := "5.2.0", ReleaseDate := "September, 2020"
CurrentVersion := "5.2.1", ReleaseDate := "September, 2020"

;##### Ini File Read #####

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2da94ac

Please sign in to comment.