randihue Posted January 25, 2007 Posted January 25, 2007 I am a new user with scripting and am trying to run an application from with in Firedaemon. Support suggested I use Autoit to run a script, which I have. The Problem is that when I run the script to see if it opens the correct window, it open the Recylce bin. Her is the syntax I used in my script. I had to add 2 extra Send("{TAB}") commands to focus on the useraname filed within the login window, as the focus begins at the OK button. ; Set focus on the window WinActivate("Roomview Login - Roomview") ; This assumes focus is on the "Username" field Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("roomview") ; Tab to the "Password" field Send("{TAB}") Send("R!sol7tn") ; Tab to the OK button and press it Send("{ENTER}")
Immensee Posted January 25, 2007 Posted January 25, 2007 you can use the WinWaitActive or the WinActivate WinActivate ("YourTitle", "Text (optional)") and if that helps, you can also use the Winsetontop command to prevent that you accidently press the mouse button so it will click on an other window WinSetOnTop ( "title", "text", flag ) i can't help you fully, because i'm at a friend's house, -me
Zedna Posted January 25, 2007 Posted January 25, 2007 Send("R!sol7tn")oÝ÷ Ø(Z®Í÷ùªÞb~'¶ì!ü¨»§¶Ú,zwm鲢鮲۬y«¢+ÙM¹ ÅÕ½ÐíHÌÌíͽ°ÝѸÅÕ½Ðì°Ä¤ìÉÜ Look into Helpfile at Send() Resources UDF ResourcesEx UDF AutoIt Forum Search
Helge Posted January 25, 2007 Posted January 25, 2007 Following Immense's kind of tips; what you tried to use ControlSend and the similar functions ?
randihue Posted January 29, 2007 Author Posted January 29, 2007 Thanks all for your generosity and assistance, but I still can't get past having the script do the send command. If I use the WinActivate command, the login window opens then maximizes whatever other window I have minimized and sets the focus on that window. There is a Login section in this window where I want to enter the user name and pswd and then press enter to run the app, but as I stated I can't even get to the user name. ;Run Roomview Run("c:\program files\roomview\roomview.exe") ; Set focus on the window WinActivate("Roomview Login - Roomview", "Login") ; This assumes focus is on the "Username" field Send("roomview")
randihue Posted January 29, 2007 Author Posted January 29, 2007 Success!! Once I added a time limiter to the WinWaitActive command along with the WinActivate command, ti worked just fine. Again, that to all of you that provided help.
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