Conrad Posted July 29, 2009 Share Posted July 29, 2009 (edited) Hello, this is my first post, I have simply and beginners question... I want to known how to run default web browser then enter some site (http://xxx.com/ggg.php) wait a few seconds (for pre-load) and close. Code... Very simple but this is what I create: Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") Run("C:\Program Files(x86)\Internet Explorer\IEXPLORE.EXE") Sleep(100) Send("{TAB}") Send("http://xxx.com/ggg.php", 1) Send("{ENTER}") Sleep(10000) Run("taskkill /F /IM iexplore.exe /T") Sleep(200) Run("taskkill /F /IM first_progr.exe /T") I choose internet explorer to do this because in many computers there is IE and location (c:\program files\...) But there is many, many things: Not in all computers is taskkill so it will be good other command. Not in all computers default browser is IE so the window "Do you want make the IE default browser" and this question destroy all next instructions. Not in all computers IE or program files are in C:\ location. So there is several problems. :/ PS first_progr.exe is name for this progam, taskkill to be sure that the program is closed. Edited July 29, 2009 by Conrad Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 29, 2009 Share Posted July 29, 2009 (edited) Instead of Run("taskkill.., there are several AutoIt functions to close/kill windows, such as ProcessClose, WinClose, WinKill or use Send("!{F4}")<br> Edited July 29, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Minikori Posted July 29, 2009 Share Posted July 29, 2009 If you did some searching in this forum, you would find I had a similar question here. Remember to search before asking. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
Conrad Posted July 30, 2009 Author Share Posted July 30, 2009 thanks for all advices - this is very helpfull...Yes, you have right always search and read, read, read >_< before postingFew more this and, I hope, "program" will be ready Link to comment Share on other sites More sharing options...
Conrad Posted July 31, 2009 Author Share Posted July 31, 2009 (edited) Same new lines I wrote in my free time >_< $DB = RegRead("HKEY_CURRENT_USER\Software\Clients\StartMenuInternet", "(Default}") ShellExecute($DB, "http://www.autoitscript.com/") Sleep(10) Send("{TAB}http{SHIFTDOWN};{SHIFTUP}//xxx.com/ggg.php{ENTER}") Sleep(15000) WinActive("website_name","") WinClose("website_name","") Sleep(100) ProcessClose("Progr_name.exe") Thanks to Minikor These two lines work good, but... $DB = RegRead("HKEY_CURRENT_USER\Software\Clients\StartMenuInternet", "(Default}") ShellExecute($DB, "http://www.autoitscript.com/") but in systems like Vista next lines work ... hmm doesn't work I'm talking about this line: Send("{TAB}http{SHIFTDOWN};{SHIFTUP}//xxx.com/ggg.php{ENTER}") Tab button works perfectly in XP switch to address line and then the script "send" www.(...) etc. Maybe someone have other solution of this "problem" ? (I can't call IE - first post) Edited July 31, 2009 by Conrad 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