Skip to content

Unknown issue about strange behavior of opening setting #15

@pilgrimlyieu

Description

@pilgrimlyieu

GETV:
if !WinActive("ahk_id " SettingHwnd)
return
GuiControlGet TabVar, , SysTabControl321
GuiControlGet, tVa, , % A_GuiControl
%A_GuiControl% := tVa
WriteIni(ConfigFile, tVa, A_GuiControl, TabVar)
if A_GuiControl in Basic_BaiduOCROnOff,Basic_MathpixOCROnOff
{
if !Basic_AutoReloadOnOff
MsgBox 4132, OCRC, 是否要重启以使设置生效?, 10
IfMsgBox No
Return
Reload
}
return

868ebb3 add

if !WinActive("ahk_id " SettingHwnd) 
    return 

to prevent the bizarre behavior due to the initiation of the setting.


GETV:
GuiControlGet TabVar, , SysTabControl321
GuiControlGet, tVa, , % A_GuiControl
%A_GuiControl% := tVa
WriteIni(ConfigFile, tVa, A_GuiControl, TabVar)
return

  1. This will cause variable Advance_EBto64SQuality belonging to Advance section is added(copied) to Basic section when opening the setting.
  2. Besides, developing OCRC v1.2.1, I found that the value of Basic_SnipTime sometimes replaced by the value of Basic_WaitSnipTime.
  3. The value of Basic_WaitSnipTime sometimes is replaced by 100 while there is no variable having the value of 100 and the default value is 500.

First I tried to detect the name prefix of variables to determine TabVar instead of

GuiControlGet TabVar, , SysTabControl321

However, it worked strangely too.

Therefore, I added the detecting function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproject-OCRCOCRCquestionThis issue or pull request has unknown or unsolved problemunknownThis issue is unknown or needs more information

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions