sponk Posted March 3, 2011 Share Posted March 3, 2011 Hey I have googled and searched net for advice but had no luck so far. I wish to "Controlsettext" to a control in a minimized window but it wont work for me. Cant autoit do this feature in a minimized window?.. it works atm only when the window is activated. Example of what I wanna do: $program1=WinGetHandle("windowtitle", "" ) $program1=WinGetHandle("windowtitle", "" ) ControlSetText($program1, "", "controlID", "text") hope someone can advice or redirect me where to search a solution. Regards Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 3, 2011 Share Posted March 3, 2011 This works fine: Run("notepad.exe") WinWait("[CLASS:Notepad; TITLE:Untitled - Notepad]") $hWin = WinGetHandle("[CLASS:Notepad; TITLE:Untitled - Notepad]") Sleep(1000) WinSetState($hWin, "", @SW_MINIMIZE) Sleep(1000) ControlSetText($hWin, "", "Edit1", "New Text Here" ) Sleep(1000) WinSetState($hWin, "", @SW_RESTORE) It might be something about your particular app. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
sponk Posted March 4, 2011 Author Share Posted March 4, 2011 This works fine: Run("notepad.exe") WinWait("[CLASS:Notepad; TITLE:Untitled - Notepad]") $hWin = WinGetHandle("[CLASS:Notepad; TITLE:Untitled - Notepad]") Sleep(1000) WinSetState($hWin, "", @SW_MINIMIZE) Sleep(1000) ControlSetText($hWin, "", "Edit1", "New Text Here" ) Sleep(1000) WinSetState($hWin, "", @SW_RESTORE) It might be something about your particular app. Thx for reply. Yes it seem somehow the specific app wont allow controlsettext when minimized. Its odd thought, that it will accept other controlcommands when minimized. Anyway I found a "go around" solution to my problem. Regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now