Sign in to follow this  
Followers 0
LifeForceIV

Autoit Website interface?

5 posts in this topic

I wanted to make a script that would do a repetitive task each day the same thing over but detects the links in a web based interface and "clicks" on them. How can I get autoit to recognize the correct link and then click it to go to the next page? Also with a timer kind of like the winwait() function only waiting for the page to load?

Is this to difficult since autoit is more a windows api application?

Thanks,

Kyle

Share this post


Link to post
Share on other sites



Look at the _IE functions in the helpfile. They should do exactly what you need :P

Welcome to the forums.

Share this post


Link to post
Share on other sites

Look at the _IE functions in the helpfile. They should do exactly what you need :P

Welcome to the forums.

Thank you I've learned a lot more about autoit in the past few months of looking on the forums then the last few years since using v2. I will check out the _IE function just one quick question will I have issues since I use firefox?

Thanks,

Kyle

Share this post


Link to post
Share on other sites

...will I have issues since I use firefox?

Many will suggest that you script with IE using IE and surf with Firefox. If you want to script Firefox - search the forums for a UDF named ff.au3.

I've not used ff.au3 and I do not know if it has a wait-load UDF... it probably does. If not, you can use a loop with PixelGetColor on the progress bar.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

I do some web page checkup spam . maybe not exactly what your looking for , maybe it will give you some idea.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_outfile=netstatus Vista.exe

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

;;;;;;200

#NoTrayIcon

#include <IE.au3>

#include <array.au3>

#include <File.au3>

#include <INet.au3>

#Include <Constants.au3>

Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown.

TraySetIcon("Shell32.dll",255)

Opt("TrayOnEventMode",1)

$exititem = TrayCreateItem("Exit",-1,1)

TrayItemSetOnEvent(-1,"end")

$testlist = TrayCreateItem("Open Test List",-1,1)

TrayItemSetOnEvent(-1,"openlist")

TraySetToolTip("net status running")

While 1

$msg = TrayGetMsg()

sleep(30000)

Select

Case $msg = 0

checknet()

Case $msg = $exititem

ExitLoop

EndSelect

WEnd

Exit

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

func checknet()

$test = _TempFile("c:\","net_",".htm",5)

InetGet('http://administrator:mypassword@10.145.15.57:1530',$test,1,0)

Sleep(3000)

$oIE = _IECreate ($test,0,0)

$oImgs = _IEImgGetCollection ($oIE)

$iNumImg = @extended

;MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page")

dim $images[1]

For $oImg In $oImgs

;MsgBox(0, "Img Info", "src=" & $oImg.nameProp)

$img = $oImg.nameProp

;MsgBox(0, "Img Info", $img)

_ArrayAdd($images,$img)

Next

;_ArrayDisplay($images)

$Pos = _ArraySearch($images,"sFolderBad.gif")

_IEQuit($oIE)

FileClose($test)

FileDelete($test)

;_ArrayDisplay($images)

;MsgBox(4096,"D",$Pos)

dim $oIE = 0

dim $test =0

dim $images = 0

dim $oImgs =0

Select

Case $pos = - 1

TrayTip("","",1,0)

case Else

TrayTip("Netstatus", "Warning", 5, 2)

endSelect

EndFunc

;MsgBox(4096,"D",$Pos)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func end()

Exit

EndFunc

Func openlist()

ShellExecute("http://10.10.10.10:1530")

EndFunc

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