Sign in to follow this  
Followers 0
Donace

Firefox or IE custom window

9 posts in this topic

Basically what I am trying to do with my script is that it goes to certain webpage logs in etc and clicks a few buttons that cleans up cache etc for the webpage.

The issue is that i have set the script to do it once a day for a number of sites, this therefore takes some time. What i want to do is somehow make a 'virtual' version of a browser in which in can work in that will not effect the rest of the machine.

at the moment it takes control and goes on FF, goes to site and clicks away etc. What i ideally want it is for it do to it in a window almost with its own mouse etc, which can be minimised and it still runs with out effecting the mouse etc for other programs;

and one last thing ill tag in, is there a way for autoit to search/save setting in an external txt? ie at first run it will ask for var such as username and pass and then save them in a .txt doc which will result in not having to type it in at each run.

cheers

Don

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

See Ini...() functions in helpfile for saving username and password and IE.au3 for automating the web.

Edit: Oh and welcome to the forum! ;)

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

thanks man; could you link me to the ie.au3 post, i did a search for it and got loads of topics ;)

and for the .ini;

If "c:\filename.ini" doesn't exist Then

$MinWaitI = InputBox("Minimum Wait", "Please time in Min Wait time after clicking; (Secs)", "6")

etc etc.

Else if "c:\filename.ini" exists then .....

and how to i declare that those var are in the ini?

Edited by Donace

Share this post


Link to post
Share on other sites

IE.au3 is included with Autoit. You don't need to install anything. ;)

Share this post


Link to post
Share on other sites

thanks kenton; just noticed it ;) hunting the manual down now

Share this post


Link to post
Share on other sites

instead of opening the ie.au3 file look inthe helpfile ;)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

cheers ;) yea i did look in the help file :D

Another question in relation to that;

The links that i wish to click are dynamic but part of it are static

For example in the following only the section (the digits etc will change at each reiteration)

$oIE = _IE_Example ("basic")

_IEImgClick ($oIE, "http://www.autoitscript.com/images/autoit_6_240x100")

[edit] i've coded the .ini bit, just need help with above.

[EDIT2] well i went through the help files and came up with the following can you tell me if it would work?

#include <IE.au3>

; We prepare the Internet Explorer as our test subject
$oIE=ObjCreate("InternetExplorer.Application.1")
With $oIE
    .Visible=1
    .Top = (@DesktopHeight-400)/2
    .Height=400      
    .Width=600
    .Silent=1        ; Don't show IE's dialog boxes
    $IEWnd=HWnd(.hWnd); Remember the Window, in case user decides to close it
EndWith
; We choose for a specific Internet Explorer interface 'DWebBrowserEvents' because the IE is subject
; to modifications by e.g. Visual Studio and Adobe Acrobat Reader. If you have IE-plugins installed,
; AutoIt might not be able to find the correct interface automatically.
$EventObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvents")
if @error then
   Msgbox(0,"AutoIt COM Test", _
    "ObjEvent: Can't use event interface 'DWebBrowserEvents'. Error code: " & hex(@error,8))
   exit
endif

$oIE.Navigate( $Site )
$Site = ("www.thesite.com")
$oLinks = _IELinkGetCollection($oIE)
For $oLink In $oLinks
    $sLink = $oLink.href
    If StringInStr($sLink, "partial html link") Then
        _IELinkClickByText ($oIE, $olink)
                $sText = StringSplit($sLink,'/')
       InetGet($sLink,$sText[UBound($sText) - 1])
        ExitLoop
    EndIf
Edited by Donace

Share this post


Link to post
Share on other sites

I found this

http://www.autoitscript.com/forum/lofiversion/index.php?t68056.html
via google tough im not sure how i would define the text in relation to the code I have done above.

Share this post


Link to post
Share on other sites

sorry for the bumb, but can anyone help with the latter question? how to set it to click partial links that all have a simialr start string.

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