Papo Posted December 5, 2007 Posted December 5, 2007 Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinSetOnTop("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer", "", 1) WinWaitActive ("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer") Can someone tell me what I'm doing wrong? Im trying to make iexplore.exe load on top of any/all other windows. Thanks in advance for your guidance. -Papo
Nahuel Posted December 5, 2007 Posted December 5, 2007 (edited) I doubt that by the time you say "WinSetOnTop" the window exists already. Make sure to add a "WinWait" before doing that, so you make sure it's already been created. Edited December 5, 2007 by Nahuel
manofman Posted December 5, 2007 Posted December 5, 2007 (edited) Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinSetOnTop("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer", "", 1) WinWaitActive ("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer") Can someone tell me what I'm doing wrong? Im trying to make iexplore.exe load on top of any/all other windows. Thanks in advance for your guidance. -PapoHi try this one Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer") WinSetOnTop("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer", "", 1) Edited December 5, 2007 by manofman
manofman Posted December 5, 2007 Posted December 5, 2007 I doubt that by the time you say "WinSetOnTop" the window exists already. Make sure to add a "WinWait" before doing that, so you make sure it's already been created.Opsss you are too fast i type it when you have reply
Papo Posted December 5, 2007 Author Posted December 5, 2007 Thank you very much. In order to understand Autoit more is there a tutorial besides the help file? Also does it help to learn a specific language before jumping into Autoit (besides making autoit ones first language)
Papo Posted December 5, 2007 Author Posted December 5, 2007 Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer") WinSetOnTop("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer", "", 1) Even with this code the window won't open on Top of other windows such as Firefox. Is their a code/attribute i can put after Run ("C:\Program Files\Internet Explorer\iexplore.exe" to make it open on top of any window such as firefox Thanks again -Papo
Zedna Posted December 5, 2007 Posted December 5, 2007 Try this: Opt('WinTitleMatchMode',2) Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("Internet Explorer") WinSetOnTop("Internet Explorer", "", 1) Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search
Papo Posted December 5, 2007 Author Posted December 5, 2007 (edited) Thank you. It did not work for me, I assumed that i had to change "Internet Explorer" with the IE title. I will try again with just "Internet Explorer" Thanks again for helping me *Edit* I don't know why but The script just doesn't want to load IE on top of Firefox.. Edited December 5, 2007 by Papo
Nahuel Posted December 5, 2007 Posted December 5, 2007 No, he's using Opt('WinTitleMatchMode',2) wich means Match any substring in the title. It works for me... Does this code work for you? Run("notepad.exe") WinWait("[CLASS:Notepad]") WinSetOnTop("[CLASS:Notepad]","",1)
Papo Posted December 5, 2007 Author Posted December 5, 2007 Yes your code works for me. But i'm using a seperate program to launch the original script. At first this code wouldn't load IE over Firefox: Opt('WinTitleMatchMode',2) Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer") WinSetOnTop("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer", "", 1) but when i changed Opt('WinTitleMatchMode',2) to Opt("WinTitleMatchMode", 2) it worked. I don't know why or even if it makes sense but it works altogether: Opt("WinTitleMatchMode", 2) Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer") WinSetOnTop("D-LINK SYSTEMS, INC | WIRELESS ROUTER | LOGIN - Windows Internet Explorer", "", 1) MouseMove (820,332,0) Is what i did make sense or did some variable in windows change the result? I'm trying to learn what i can about Autoit as i go Thanks again -Papo
Nahuel Posted December 5, 2007 Posted December 5, 2007 Are you sure you didn't change anything else when you changed the ' for " ? There's no need to put the whole window title if you are using Opt("WinTitleMatchMode", 2). Does removing this line make the code not work anymore? If that's so, it's pretty likely that you have a minor typo in the window title. But, if that code works, then that's alright.
Papo Posted December 5, 2007 Author Posted December 5, 2007 Well when I copied the exact code Opt('WinTitleMatchMode',2) Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("Internet Explorer") WinSetOnTop("Internet Explorer", "", 1) MouseMove (820,332,0) MouseClick ("left") Send ("admin") Send ("{Tab}") Send ("****") The password ended up in the address bar. I not only changed the ' to " but i also added a space between the ",2" I made these changes to make it look exactly like the example in the help file
Valuater Posted December 5, 2007 Posted December 5, 2007 (edited) In order to understand Autoit more is there a tutorial besides the help file?Welcome to Autoit 1-2-3 is a great tut for newbies. it's in my signature below Also does it help to learn a specific language before jumping into Autoit (besides making autoit ones first language)I don't think so, I didn't! Autoit is mostly written in C++ ( I think) and makes the tuff stuff easier.The design is to make scripting easier with Autoit ... and minimal scripting knowledge is required8) Edited December 5, 2007 by Valuater
Papo Posted December 6, 2007 Author Posted December 6, 2007 Thanks Again everyone for helping. It took some sleep but the reason why Opt('WinTitleMatchMode',2) Run ("C:\Program Files\Internet Explorer\iexplore.exe") WinWaitActive ("Internet Explorer") WinSetOnTop("Internet Explorer", "", 1) MouseMove (820,332,0) MouseClick ("left") wasn't working was because when the file executes it starts off with "Internet Explorer" as the title causing everything to activate before the Homepage set. Also while searching the help file i found out about "winactivate" which also helps just in case another windows loads over IE so here is my code i think its logical (for the most part) Opt("WinTitleMatchMode", 2) Run ("C:\Program Files\Internet Explorer\iexplore.exe", "", @SW_MAXIMIZE) WinWait ("D-LINK") WinActivate("D-LINK", "") WinSetOnTop("D-LINK", "", 1) MouseMove (820,332,0) MouseClick ("left") Thanks again
DW1 Posted December 6, 2007 Posted December 6, 2007 Just an FYI, if you put WinSetOnTop in your loop also, it will even go over taskmanager AutoIt3 Online Help
Papo Posted December 6, 2007 Author Posted December 6, 2007 Just an FYI, if you put WinSetOnTop in your loop also, it will even go over taskmanager Good to know, Thank you very much
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