Sign in to follow this  
Followers 0
SlimShady

Hidden AutoIt Window

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Too bad :lmao:o:)

Edited by SlimShady

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0