Jump to content

Hidden AutoIt Window


Recommended Posts

I can't make the edit box editable.

See the following script.

$AutoItHandle = 0
Do
   $AutoItHandle = AutoItHandle()
Until $AutoItHandle <> 0

WinSetState($AutoItHandle, "", @SW_SHOW)
WinActivate($AutoItHandle, "")
WinSetState($AutoItHandle, "", @SW_DISABLE)
WinSetState($AutoItHandle, "", @SW_ENABLE)
ControlHide($AutoItHandle, "", "Edit1")
ControlShow($AutoItHandle, "", "Edit1")
ControlDisable($AutoItHandle, "", "Edit1")
ControlEnable($AutoItHandle, "", "Edit1")

While 1
   Sleep(1000)
WEnd

Func AutoItHandle()
   Local $handle
   Local $CurAutoItName = AutoItWinGetTitle()
   Local $val = @ScriptName & (@YDAY + @SEC + 2)
   AutoItWinSetTitle($val)
   $handle = WinGetHandle($val)
      AutoItWinSetTitle($CurAutoItName)
   Return $handle
EndFunc
Link to comment
Share on other sites

  • 2 weeks later...

I found the solution :lmao:

$AutoItHandle = 0
Do
   $AutoItHandle = AutoItHandle()
Until $AutoItHandle <> 0

WinSetState($AutoItHandle, "", @SW_SHOW)
WinActivate($AutoItHandle, "")

$EM_SETREADONLY = 0x00CF
$val = DllCall("user32.dll", "int", "SendMessage", _
                      "hwnd", ControlGetHandle($AutoItHandle, "", "Edit1"), _
                      "int", $EM_SETREADONLY, _
                      "int", 0, _
                      "int", 0)

While 1
   Sleep(1000)
WEnd

Func AutoItHandle()
   Local $handle
   Local $CurAutoItName = AutoItWinGetTitle()
   Local $val = @ScriptName & (@YDAY + @SEC + 2)
   AutoItWinSetTitle($val)
   $handle = WinGetHandle($val)
      AutoItWinSetTitle($CurAutoItName)
   Return $handle
EndFunc
Edited by SlimShady
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...