nht3004 Posted May 2, 2009 Share Posted May 2, 2009 It is like <input type="text" onfocus="" onblur="">.Could anyone help me plz, show me the way to do that using AutoIt with GUICtrlCreateInput! for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
Yashied Posted May 2, 2009 Share Posted May 2, 2009 It is like <input type="text" onfocus="" onblur="">.Could anyone help me plz, show me the way to do that using AutoIt with GUICtrlCreateInput!_WinAPI_GetFocus() My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
nht3004 Posted May 2, 2009 Author Share Posted May 2, 2009 _WinAPI_GetFocus()I meant the focus of the Input bro ^^ for(loop=0; loop<infinity; loop++) { alert('I love you'); } Link to comment Share on other sites More sharing options...
BrettF Posted May 2, 2009 Share Posted May 2, 2009 Mate its a good suggestion. You haven't provided any example code (in AutoIt)... Something like this could be adapted to your needs. $old_focus = "" $GUI = GUICreate ("Test", 200, 150) $hInput = GUICtrlCreateInput ("Input 1", 10, 10, 130) $hInput2 = GUICtrlCreateInput ("Input 2", 10, 35, 130) $hInput3 = GUICtrlCreateInput ("Input 3", 10, 60, 130) GUISetState () While 1 $nMsg = GUIGetMsg () Switch $nMsg Case -3 Exit EndSwitch $focused_Control = ControlGetFocus($GUI) If $focused_Control <> $old_focus Then MsgBox (0, "", "'" & ControlGetText ($GUI, "", $focused_Control) & "' gained focus" & @CRLF & _ "'" & ControlGetText ($GUI, "", $old_focus) & "' lost focus") $old_focus = $focused_Control EndIf WEnd But you can adapt it. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
nht3004 Posted May 2, 2009 Author Share Posted May 2, 2009 Mate its a good suggestion. You haven't provided any example code (in AutoIt)... Something like this could be adapted to your needs. $old_focus = "" $GUI = GUICreate ("Test", 200, 150) $hInput = GUICtrlCreateInput ("Input 1", 10, 10, 130) $hInput2 = GUICtrlCreateInput ("Input 2", 10, 35, 130) $hInput3 = GUICtrlCreateInput ("Input 3", 10, 60, 130) GUISetState () While 1 $nMsg = GUIGetMsg () Switch $nMsg Case -3 Exit EndSwitch $focused_Control = ControlGetFocus($GUI) If $focused_Control <> $old_focus Then MsgBox (0, "", "'" & ControlGetText ($GUI, "", $focused_Control) & "' gained focus" & @CRLF & _ "'" & ControlGetText ($GUI, "", $old_focus) & "' lost focus") $old_focus = $focused_Control EndIf WEnd But you can adapt it. Cheers, BrettIt worked, thanks! for(loop=0; loop<infinity; loop++) { alert('I love you'); } 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