Jump to content
Sign in to follow this  
DaLiMan

Run a shortcut in IE

Recommended Posts

DaLiMan

Hi,

Maybe a stupid/ simple question but can someone help me with this? :">

I wan't to run a http:// shortcut in IE but IE is not my default browser, so obvious the code below does not work for me.

RunWait(@ComSpec & " /c start http://http://www.autoitscript.com ", "", @SW_HIDE)

How can I accomplish this?

Share this post


Link to post
Share on other sites
buzz44

maybe tell it to run IE first then send the link ??


qq

Share this post


Link to post
Share on other sites
SlimShady

This works here:

Run('explorer http://www.autoitscript.com', @WindowsDir)

Share this post


Link to post
Share on other sites
DaLiMan

This works here:

Run('explorer http://www.autoitscript.com', @WindowsDir)

<{POST_SNAPBACK}>

Overhere also....

Thanx, :lmao:

Share this post


Link to post
Share on other sites
DaLiMan

Why doesn't this work ?

Run('explorer http://www.autoitscript.com', "", @SW_MINIMIZE )

It's SHOWS the window, but I asked MINIMIZED

Share this post


Link to post
Share on other sites
Andre

Hi,

Here also not minimized.....

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites
DaLiMan

Hi,

Here also not minimized.....

Andre

<{POST_SNAPBACK}>

I can hardly imagine but could this be a bug? :)

Share this post


Link to post
Share on other sites
Valik

Obviously, Explorer doesn't honor the request of SW_MINIMIZED.

Documentation people: Perhaps it should be mentioned in Run/RunWait that the application may not honor the requested show state.

Share this post


Link to post
Share on other sites
DaLiMan

Yeah, but strangely the code below DOES work.

Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "", @SW_MINIMIZE)

So, what's the catch.... :)

Share this post


Link to post
Share on other sites
Valik

Yeah, but strangely the code below DOES work.

Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "", @SW_MINIMIZE)

So, what's the catch.... :)

<{POST_SNAPBACK}>

I told you. Explorer doesn't honor the SW_MINIMIZE flag. There is no guarantee that any program will actually honor the flag. It is simply a hint that "I would like to start this program in this state if I can". Its up to each individual program as to whether or not it wants to honor it.

Share this post


Link to post
Share on other sites
DaLiMan

I told you.  Explorer doesn't honor the SW_MINIMIZE flag.  There is no guarantee that any program will actually honor the flag.  It is simply a hint that "I would like to start this program in this state if I can".  Its up to each individual program as to whether or not it wants to honor it.

<{POST_SNAPBACK}>

Sorry, didn't understood it that way. :">

Thanx for explaining. (again) :)

Anyway, bummer....have to find another way / approach now.....

Share this post


Link to post
Share on other sites
Blue_Drache

Sorry, didn't understood it that way.  :">

Thanx for explaining. (again)  :)

Anyway, bummer....have to find another way / approach now.....

<{POST_SNAPBACK}>

Go back to your original RunWait(@compsec) ... it works if you get the quotations and/or the correct command line options correct. :D What you want is the /min feature of the start command.

Try this:

RunWait(@ComSpec & " /c " & "start /b /min explorer http://www.msn.com", "", @SW_HIDE)

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
MHz

Opt('WinTitleMatchMode', 2)
Run('explorer http://www.autoitscript.com')
WinWait('Internet')
WinSetState('Internet', '', @SW_MINIMIZE)

Is this suitable?

Share this post


Link to post
Share on other sites
DaLiMan

Go back to your original RunWait(@compsec) ... it works if you get the quotations and/or the correct command line options correct.  :)  What you want is the /min feature of the start command.

Try this:

RunWait(@ComSpec & " /c " & "start /b /min explorer http://www.msn.com", "", @SW_HIDE)

<{POST_SNAPBACK}>

Hi Blue_Drache,

Thanx for the line, but it does not work here.

Does it work at your place?

@MHz

What U are suggesting is what I use now.

But I don't want the Window to be visible at all, not even at startup.

Thanx for the reply though. Much appreciated.

Share this post


Link to post
Share on other sites
SlimShady

Anyway, bummer....have to find another way / approach now.....

<{POST_SNAPBACK}>

Why?

You said:

Yeah, but strangely the code below DOES work.

Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "", @SW_MINIMIZE)

So, what's the catch.... :)

<{POST_SNAPBACK}>

Isn't that enough? What do you need more? Edited by SlimShady

Share this post


Link to post
Share on other sites
DaLiMan

Why?

You said:

Isn't that enough? What do you need more?

<{POST_SNAPBACK}>

I need IE to open directly to a site.

Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "", @SW_MINIMIZE)

only opens IE in your startpage. ( Does minimize )

Run('explorer http://www.autoitscript.com' )

And

RunWait(@ComSpec & " /c " & "start /b /min explorer http://www.autoitscript.com", "", @SW_HIDE)

Opens IE in the page you want. ( Does not minimize)

Share this post


Link to post
Share on other sites
SlimShady

You're such a newbie.

Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE www.autoitscript.com", "", @SW_MINIMIZE)

Share this post


Link to post
Share on other sites
DaLiMan

You're such a newbie.

Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE www.autoitscript.com", "", @SW_MINIMIZE)

<{POST_SNAPBACK}>

Yes, I know.

It's not my work at all to be coding stuff and I now I'm not very good at it also... :">

Therefore I'm very glad I can rely on this forum to create working scripts :)

and I look up to y'all who come up with this wonderfull scripts in AU3.

Please don't hate me for it...... :D

Thanx for youre help SlimShady, It's much appreciated.

Share this post


Link to post
Share on other sites
Blue_Drache

Hi Blue_Drache,

Thanx for the line, but it does not work here.

Does it work at your place?

<{POST_SNAPBACK}>

Actually, it does. Go figure. Like Valik said, IE is a fickle beastie.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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  

×