Jump to content

Auto IT


vivek
 Share

Recommended Posts

Hi, I am Vivek and I am trying out Auto IT for automating a few applications I am working with.

I checked the tutorials which explained how to open a notepad. I have an application installed on my machine which I would like to automate. Can I open any such exe/application installed on my machine using AutoIt?

Link to comment
Share on other sites

Yes,you can. You need to go through the helpfile carefully and write a bit of your own code. If you have problems post your code here and someone will help.

Link to comment
Share on other sites

Hi All,

Thanks for your help. I was able to do it.

Can we open aany webpage of our choice with Auto It? Assume I know the IP address of a device, can I open its web interface using an Auto IT command and then perform operations on that page?

thanks in advance.

Vivek

Link to comment
Share on other sites

Hi,

#include <IE.au3>

$oIE = _IECreate ("www.autoitscript.com")

;Sleep(5000)

_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?")

;Sleep(5000)

_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showforum=9")

I guess this script is correct. When I run it, no navigation happesn to the other links given. Am I going wrong anywhere?

Also, when I try to launch a webpage, whats happening is that as soon as I run a script, a blank webpage pops up ,and after about 5-6 seconds, another page opens with the site I have requested. Because of 2 webpages getting opened, I am unable to keep my second window as active window and perform operations on it. If I forcefully close the first blank window that popped up, then my code runs on the second window. I have tried commands like WinActive,WinWaitActive,WinActivate with not much help.

Does it have anything to do with IE7 browser I am using since multiple tabs open up in the same window in IE7 unlike IE6 where each window is independent. I am suspecting that the trouble I am facing for making a particular window as the active window is due to this.

Thanks.

Link to comment
Share on other sites

Hi,

#include <IE.au3>

$oIE = _IECreate ("www.autoitscript.com")

;Sleep(5000)

_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?")

;Sleep(5000)

_IENavigate ($oIE, "http://www.autoitscript.com/forum/index.php?showforum=9")

I guess this script is correct. When I run it, no navigation happesn to the other links given. Am I going wrong anywhere?

Also, when I try to launch a webpage, whats happening is that as soon as I run a script, a blank webpage pops up ,and after about 5-6 seconds, another page opens with the site I have requested. Because of 2 webpages getting opened, I am unable to keep my second window as active window and perform operations on it. If I forcefully close the first blank window that popped up, then my code runs on the second window. I have tried commands like WinActive,WinWaitActive,WinActivate with not much help.

Does it have anything to do with IE7 browser I am using since multiple tabs open up in the same window in IE7 unlike IE6 where each window is independent. I am suspecting that the trouble I am facing for making a particular window as the active window is due to this.

Thanks.

as i understand you have already opened your page and your question is why autoit did open another page if your already exsist. if thats the case look under _IEAttach to replace your _IECreate command.

IE7 dono, probably not, maby someone other who is using it can help you with that question :/

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Hi,

_IEAttach doesnt help much. The code just does not run if I use IEAttach instead of IECreate.

My goal is simle:

Open a webpage( for our example let it be www.gmail.com)

Navigate to the Username tab there...type username..navigate to Password...type pasword...click on sign In...Once it logs in, perform some operations inside...maybe click on some mail...etc. i am able to launch the webpage i want ...but as i have mentioned above, as soon as I run the code, a intermediate blank window pops up before my webpage opens up. I am not able to gain control of the 2nd page (actual site page) and enter the username/pwd and login.

Does the code below correct atleast partially to get what I want? I am not sure if I am making some basic errors since I am very new to Auto IT...

#include <IE.au3>

$oIE = _IECreate ("http://www.gmail.com")

WinWaitActive ("Gmail: Email from Google - Windows Internet Explorer")

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_username = _IEFormElementGetObjByName ($o_form, "username")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_SignIn = _IEFormElementGetObjByName ($o_form, "SI")

$username = "enter username here"

$password = "enter password here"

_IEFormElementSetValue ($o_username, $username)

_IEFormElementSetValue ($o_password, $password)

_IEAction ($o_SignIn, "click")

Please help.

Thanks

Link to comment
Share on other sites

#include <IE.au3>
$oIE = _IECreate ("http://www.gmail.com")
$oForm= _IEFormGetCollection  ($oIE, 0)
$UN = _IEFormElementGetCollection ($oForm, 7)
$PW = _IEFormElementGetCollection ($oForm, 8)
_IEFormElementSetValue ($UN, "me")
_IEFormElementSetValue ($PW, "mypass")
_IEFormSubmit ($oForm)

there are alot of other exsamples for the ie func if you dono Obj correct name

(forum search is your best friend :mellow: ) have fun

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

From the help file:

As well, if you attempt to use a function like _IENavigate on such an object you may receive COM errors due to the way that IE7 has implemented Tabs.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

  • 3 months later...

From the help file:

@ "To Open a webpage for example www.gmail.com &

Navigate to the Username tab there...type username..navigate to Password...type pasword...click on sign In"

U can try using Au3Info.exe to find out the mouse coordinates and use something like MouseClick("primary", 1011, 276, 2), where coordinates 1011, 276 are found using Au3Info.exe.

Sample Code:-

Run ("C:\Program Files\Internet Explorer\iexplore.exe")
WinWaitActive("Blank Page - Microsoft Internet Explorer")
Send ("http://www.gmail.com")
Send ("{ENTER}")
WinWaitActive("Gmail: Email from Google - Microsoft Internet Explorer")
MouseClick("primary", 1011, 276, 2)
Send ("username")
Send ("{TAB}")
Send ("password")
Send ("{ENTER}")
Link to comment
Share on other sites

old topic

@trendzy2010

if you do mouseclick it can b corrcet on your comp, if y try it on comp that have diffrent resolution, in alot of cases it will not work, or if y have one toolbar activated on your IE, coodrinates on that web page will b wrong and your script will not work.

send() and mouseclick arnt good way to automate web page, with send "{tab}" will probably b beter option to focus the input on ie, and still it will newer b correct like _IE commands from help file r :P

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

@ bogQ :- Yes, I agree that the coordinates may work for a specific resolution, hence the user is advised to use Au3Info.exe (to find his desirable pts.) before writing his script for all possible cases and use some programming logic to choose between them.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...