jfcby Posted May 25, 2010 Share Posted May 25, 2010 In the following script I'm trying to use the keyboard key combination ctrl+a to select all of the contents in input box 3. Nothing happens after I click inside input box 3 and type ctrl+a. How can I use ctrl+a to select all the contents in input box 3? expandcollapse popup#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) ; Change to OnEvent mode $mWinTitle = "Test Copy Input" $mainwindow = GUICreate($mWinTitle, 300, 150) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlCreateLabel("Input Label 1", 10, 10) GUICtrlCreateLabel("Input Label 2", 10, 50) $ipt1 = GUICtrlCreateInput("Input 1 Test", 80, 10, 215, 20) $ipt2 = GUICtrlCreateInput("Input 2 Test", 80, 50, 215, 20) $ipt3 = GUICtrlCreateInput("", 5, 75, 290, 20) GUICtrlSetState($ipt3, $GUI_DEFBUTTON) $btn1 = GUICtrlCreateButton("Btn1", 175, 115, 60) GUICtrlSetOnEvent($btn1, "") $btn2 = GUICtrlCreateButton("Btn2", 235, 115, 60) GUICtrlSetOnEvent($btn2, "") $dummywindow = GUICreate("Dummy window for testing ", 200, 100) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinSetOnTop($mainwindow, "", 1) GUICtrlSetData($ipt3, GUICtrlRead($ipt1) & " ---- " & GUICtrlRead($ipt2)) Sleep(500) ClipPut(GUICtrlRead($ipt3)) While 1 Sleep(1000) ; Idle around WEnd Func InsertBtn() ;Note: at this point @GUI_CTRLID would equal $okbutton ;MsgBox(0, "GUI Event", "You pressed Insert!") EndFunc Func CLOSEClicked() ;Note: at this point @GUI_CTRLID would equal $GUI_EVENT_CLOSE, ;@GUI_WINHANDLE will be either $mainwindow or $dummywindow If @GUI_WINHANDLE = $mainwindow Then ;MsgBox(0, "GUI Event", "You clicked CLOSE in the main window! Exiting...") Exit EndIf EndFunc ;==>CLOSEDClicked Thank you for your help, jfcby Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB **** Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 25, 2010 Share Posted May 25, 2010 Try making them Edit controls (set styles to remove scroll bars). I think the Windows API for that control type will do it for you. 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...
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