Sign in to follow this  
Followers 0
Conrad

Simple program for website.

5 posts in this topic

#1 ·  Posted (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 by Conrad

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

thanks for all advices - this is very helpfull

...

Yes, you have right always search and read, read, read >_< before posting

Few more this and, I hope, "program" will be ready :(

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Conrad

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0