billmorrell Posted March 9, 2006 Share Posted March 9, 2006 I'm an absolute beginner with AutoIT but I believe what I'm trying to do should be possible. I'm trying to create a GUI app which behaves like a multiple clipboard. The app will send one of several text strings (I'm going to try mouse events later) to a window of the user's choosing (selected from a listbox populated by WinList). Everything works up until I try to send it to the other window. My problem is I cannot get the target window to activate and keep the focus. I believe this may be happening because this is a GUI app. The function ssend is where I'm trying to send the text string. $a is the full title of the desired window and $b is the string to send. Func ssend($a,$ $handle = wingethandle($a) winactivate($handle) $result = winactive($handle) msgbox(4096,$result,"winactive " & $handle,20) send($ EndFunc I tried to control the window by doing a winsetstate($handle,"",@SW_MAXIMIZE) but this maximizes my original app. This is probably something simple but I can't figure it out. Bill Link to comment Share on other sites More sharing options...
billmorrell Posted March 14, 2006 Author Share Posted March 14, 2006 msgbox is a focus taker...winactivate, then winwaitactive, then sendLar.Thank you, this worked perfectly. 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