Jump to content

NEED HELP!!! NEW TO AUTOIT...


Recommended Posts

Hi!

i have basis in programming, but i dont know nothing about autoit...

i need to automate some fastiduos task, and need help by someone who knows in deep AutoIt

plwease reply

thx!

Personal scripting army to your service, what is the problem sir? Posted Image

Link to comment
Share on other sites

i need references from upper right corner...

code :

Run("C:\Program Files\Mozilla Firefox\firefox.exe -new-window http://www.google.com")

WinWaitActive("Mozilla Firefox")

Sleep(8000)

MouseClick("left", 1800, 130, 2)

with x,y is position of upper right corner of html window in the browser (all size of browser window possible, and position on the screen of the browser)

MouseClick("left", x - value_x, y - value_y, 2) --- to set position for the click

and stiil search for the command to close the firefox browser automatically

Link to comment
Share on other sites

Hello osirisqc,

First, Welcome to the AutoIt Forums!

Second, I would suggest using Internet Explorer instead. There is a wonderful UDF that was included with the standard AutoIt Installation. This UDF covers all the basics, and advanced functions, for automating a web browser. However, if you must use Firefox, there is also a UDF, FF.au3, for the Firefox Browser in the examples section of the forums. This UDF is lightly used and/or moderated, so receiving help with it might take awhile to get.

In the IE.au3 UDF you can use functions like _IENavigate() to navigate pages, _IELinkClickByText() to automate mouse clicks in the browser. These are just 2 function examples of what IE.au3 has to offer.

Third, for utilizing x-value_x, just decaring a variable(s) and using math inside the function as you presented will do. Lets say you wanted to open an application and find where the top/left corner is, then click on a spot 100 pixels to the right, and 200 down. This example would do the trick:

Run( $process_path )
WinWaitActive( $process_name )
Sleep(8000)
Local $pos = WinGetPos( $process_name ) ;$pos[0]= left, $post[1]= top of process window
MouseClick("left", $pos[0]+100, $pos[2]+200, 2)
ProcessClose( $process_name )

Fourth, and as for closing the process when done, try function ProcessClose().

Good Luck and Happy Coding!

Realm

Edit: Typos

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

ok let's i want IE window that has 400 pixel wide, and 300 pixel height...

i want that window to be at upper right corner of my screen

i want the click to be made 100 pixel left and 100 pixel down of upper right corner of the IE window

Link to comment
Share on other sites

ok let's i want IE window that has 400 pixel wide, and 300 pixel height...

i want that window to be at upper right corner of my screen

i want the click to be made 100 pixel left and 100 pixel down of upper right corner of the IE window

Dim $winheight = 300 
Dim $winwidth = 400 

WinMove($mywindow, "", @DesktopWidth - $winwidth, 0, $winwidth, $winheight)

The click position then depends on your setting of

Opt("MouseCoordMode", 0) ;1=absolute screen coordinates (default), 0=relative coords to the active window, 2=client (relative coords to the client area of the active window)

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...