Sign in to follow this  
Followers 0
tradertt

_IENavigate() How to get it to Navigate to a URL pasted in my Clipboard

24 posts in this topic




Take a look at helpfile.

ClipGet ( )

Share this post


Link to post
Share on other sites

What about 'WinSetState ( "title", "text", flag )'?

Share this post


Link to post
Share on other sites

Sounds good. Sorry about the trouble but here is the code:

#include <IE.au3>
AutoItSetOption("WinTitleMatchMode", 2)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Microsoft Excel - Book1","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - Book1","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - Book1","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - Book1","Worksheet Menu Bar")
Send("{CTRLDOWN}c{CTRLUP}")
$iinet = clipget()
Sleep(1000)
_IECreate ($iinet , 0 , 1 , 1)
WinSetState("Internet Explorer", "", @SW_MAXIMIZE)
Sleep(1000)

It does not seem to Maximize it ....

The Sub String Internet Explorer is correct ....

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I haven't MS-office so it doesn't works for me.

You change 'Opt("WinTitleMatchMode",2)' to 'Opt("WinTitleMatchMode",4)'. I think that's the mistake.

Try

Opt("WinTitleMatchMode",2)
WinSetState("Internet Explorer", "", @SW_MAXIMIZE)

EDIT: language

Edited by Briegel

Share this post


Link to post
Share on other sites

:whistle:

Still can't get it to maximise the window ... Opt 2 or Opt 4 also does not work ...... Wonder why ..

Internet Explorerer is probably not the window name and that is why it is not working.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Now for the other function I am trying to use

_IEClickLinkByText ($iinet, "Download")

Why does it not work - Unknown function again

#include <IE.au3>
Opt("WinTitleMatchMode",2)
Opt("WinWaitDelay",100)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Microsoft Excel - Book1","Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - Book1","Worksheet Menu Bar") Then WinActivate("Microsoft Excel - Book1","Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - Book1","Worksheet Menu Bar")
Send("{CTRLDOWN}c{CTRLUP}")
$iinet = clipget()
Sleep(1000)
_IECreate ($iinet , 0 , 1 , 0 , 0)
Sleep(1000)
WinSetState("Internet Explorer", "", @SW_MAXIMIZE)
Sleep(5000)
_IEClickLinkByText ($iinet, "Download")

Share this post


Link to post
Share on other sites

Internet Explorerer is probably not the window name and that is why it is not working.

I don't use the Internet Explorer, but the title is right (only in german?).

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  Server nicht gefunden - Microsoft Internet Explorer

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

This is a little more efficient.

#include <IE.au3>

Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)

WinWait("Microsoft Excel - Book1", "Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - Book1", "Worksheet Menu Bar") Then _
        WinActivate("Microsoft Excel - Book1", "Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - Book1", "Worksheet Menu Bar")
Send("{CTRLDOWN}c{CTRLUP}")

$sURL = ClipGet()
$oIE = _IECreate($sURL, 0, 1, 0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
WinSetState($hwnd, "", @SW_MAXIMIZE)
_IELoadWait($oIE)
_IELinkClickByText($oIE, "Download")

Edit: Added solution for previous post

Edited by big_daddy

Share this post


Link to post
Share on other sites

Super!

#include <IE.au3>

Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)

WinWait("Microsoft Excel - Book1", "Worksheet Menu Bar")
If Not WinActive("Microsoft Excel - Book1", "Worksheet Menu Bar") Then _
        WinActivate("Microsoft Excel - Book1", "Worksheet Menu Bar")
WinWaitActive("Microsoft Excel - Book1", "Worksheet Menu Bar")
Send("{CTRLDOWN}c{CTRLUP}")

$sURL = ClipGet()
$oIE = _IECreate($sURL, 0, 1, 0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
WinSetState($hwnd, "", @SW_MAXIMIZE)
_IELoadWait($oIE)
_IEClickLinkByText ($oIE, "download")

Tried adding the last link but get a function unknown error

Share this post


Link to post
Share on other sites

C:\Documents and Settings\Desktop\test\notepad.au3(19,43) : ERROR: _IEClickLinkByText(): undefined function.

_IEClickLinkByText ($oIE, "download")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Hmm .. I am using Beta .... so what could the problem be ...

Look at my last post, I updated it with the _IELinkClickByText() function. You have the click and link switched around.

Share this post


Link to post
Share on other sites

Hi guys,

Continued doing the script but met with a problem

There is a Save As box that opens up after I click and there are some text in the box that is the file name.

I want to record the file name to output later in another Save As box so that it can save the other file under the same name but different extension

how can I do that?

$flvfile = ControlGetText("Save As", "", "ClassNameNN=Edit1")

This is the Variable I used. Is it correct?

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Save As

Class: #32770

Size: X: 456 Y: 277 W: 563 H: 412

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 724 Y: 644

Cursor ID: 5

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x000000 Dec: 0

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 198 Y: 333 W: 225 H: 14

Control ID: 1148

ClassNameNN: Edit1

Text:

Style: 0x54000080

ExStyle: 0x00000000

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Save &in:

AutoIt3

FolderView

File &name:

orKSoKWUyYc.mpg

orKSoKWUyYc.mpg

Save as &type:

&Save

Cancel

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Open as &read-only

&Help

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