chandler8 Posted February 22, 2006 Share Posted February 22, 2006 Anyone have any good examples of using a handle Link to comment Share on other sites More sharing options...
Valuater Posted February 22, 2006 Share Posted February 22, 2006 STRAIGHT FROM HELP; Identify the Notepad window that contains the text "this one" and get a handle to it ; Change into the WinTitleMatchMode that supports classnames and handles AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of a notepad window that contains "this one" $handle = WinGetHandle("classname=Notepad", "this one") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else ; Send some text directly to this window's edit control ControlSend($handle, "", "Edit1", "AbCdE") EndIfNew to AutoIt ? A Great Place To Start:==> Welcome to AutoIt 1-2-3 <==8) Link to comment Share on other sites More sharing options...
chandler8 Posted February 22, 2006 Author Share Posted February 22, 2006 Anyone have any good examples of using a handleI already tried that one and it didn't do anything except.....Could not find the correct windowMaybe am missing something. Link to comment Share on other sites More sharing options...
Valuater Posted February 22, 2006 Share Posted February 22, 2006 1 run notepad 2 type in the edit area of notepad... "this one" 3 run the script 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 22, 2006 Moderators Share Posted February 22, 2006 Anyone have any good examples of using a handleA handle for what? Do you know the window name you want to find the handle of, or the .exe name? Care to elaborate a bit more... so we aren't chasing our tails, and hearing .... I've already tried that (Putting what you've done ... what code you've tried and failed at ... and as much description as possible about what your trying to accomplish ... usually yields the best results. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
chandler8 Posted February 22, 2006 Author Share Posted February 22, 2006 (edited) A handle for what? Do you know the window name you want to find the handle of, or the .exe name? Care to elaborate a bit more... so we aren't chasing our tails, and hearing .... I've already tried that (Putting what you've done ... what code you've tried and failed at ... and as much description as possible about what your trying to accomplish ... usually yields the best results. I am a financial trader and have a script, with the help from some of you, takes a text file and runs through each symbol and enters this into a text file. The script works, but I now want to run this on my trading platform ( level 2 screen ). I know how to find the handle: For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) EndIf Next Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc The trading platform has muliple level 2 screens open at one time.....the handle for one of them is 00090218 I want to have the script run and execute on this level 2 screen. Edited February 22, 2006 by chandler8 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 23, 2006 Moderators Share Posted February 23, 2006 Blah... you give NO descriptions... 'Run' this on my trading platform 2... what the heck is that? Run what? Input data? Screen shots with examples would be great... And you've still not posted what "You" have done to try to accomplish that.So with the description you've given... I'll say this: Look at ControlCommand() / ControlSend() / ControlSetText() / etc... in the Help File if it isn't an internet application. That's about as good as I personally can do without any pertinent information. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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