Jump to content

Recommended Posts

Posted

Well I am just starting to learn autoit and i have some whole codes i can look at and kinda understand. But i cant seem to figure out how to make the mouse click a certain area and type a login or password..

So far this is what i have its not much but its from just messing around trying to understand things. Where would i go from here?

Run("C:\Program Files\Mozilla Firefox\firefox.exe http://www.TheMafiaNetwork.net")
WinWaitActive ("TheMafiaNetwork - Mozilla Firefox")
Posted

you could try sending a number of tabs until it gets to the login info and password then another tab and sending enter?

that may be a bit hard thaugh if the login/home page changes

if not have you tried mouseclick ?

go to the auto it help file/ index and search mouse click it should help you

Posted

No i didnt think of sending a tabs sequence for it... The page never changes so it should work.

But i will look in the index.. Thank you

Posted (edited)

I looked into the mouse clicks and i keep getting an error.

C:\Documents and Settings\Compaq\Desktop\simple.au3(3,22) : ERROR: syntax error
MouseClick ( "right" [
~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Compaq\Desktop\simple.au3(3,32) : ERROR: syntax error
MouseClick ( "right" [, -4, -4 [
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Compaq\Desktop\simple.au3(4,13) : ERROR: syntax error
Send "Amped"
~~~~~~~~~~~~^
C:\Documents and Settings\Compaq\Desktop\simple.au3 - 3 error(s), 0 warning(s)
>Exit code: 2   Time: 0.214

Run("C:\Program Files\Mozilla Firefox\firefox.exe [url="http://www.TheMafiaNetwork.net")"]http://www.TheMafiaNetwork.net")[/url]
WinWaitActive ("TheMafiaNetwork - Mozilla Firefox")
MouseClick ( "right" [, -4, -4 [, 1 [, 10 ]]] )
Send "Amped"

Any idea whats wrong?

Edited by Regency
Posted

im not 100% sure on this but im not suer those ] are supposed to be there try deleteing the line up to mouseclick and it should give u a hint as to how to write the code when u type the first (

Posted

No they are supposed to be there...

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

The parameters of a function that are inside [ ] are optional. You don't type the brackets.

Now, about your problem, I recommend you use IE and take a look at the help file for how to work with it.

Posted

The parameters of a function that are inside [ ] are optional. You don't type the brackets.

Now, about your problem, I recommend you use IE and take a look at the help file for how to work with it.

Why IE? what i was gunna use is best in FF... And thank you for telling me that

Posted

Example:

#include <IE.au3>
$oIE=_IECreate("http://www.themafianetwork.net/userlogin.aspx?")
$oUser=_IEGetObjByName($oIE,"txtuid")
_IEFormElementSetValue($oUser,"MyUserName")
$oPass=_IEGetObjByName($oIE,"txtpwd")
_IEFormElementSetValue($oPass,"MyPassWord")
$oLogIn=_IEGetObjByName($oIE,"Button1")
_IEAction($oLogIn,"click")

It won't work on the main site, you need to use this link: http://www.themafianetwork.net/userlogin.aspx?

Posted

this code seems to work

#include <process.au3>

$rc = _RunDOS("start http://www.google.co.uk")

WinActivate ("Google - Mozilla Firefox")

sleep(3000)

MouseMove(518,324)

MouseClick("left")

send("autoit")

mousemove(582,348)

MouseClick("left")

althaugh i did the sleep function because winwaitactive doesnt seem to work it just sits there with the window active and doesnt so the rest of the script?

Posted (edited)

this code seems to work

#include <process.au3>

$rc = _RunDOS("start http://www.google.co.uk")

WinActivate ("Google - Mozilla Firefox")

sleep(3000)

MouseMove(518,324)

MouseClick("left")

send("autoit")

mousemove(582,348)

MouseClick("left")

althaugh i did the sleep function because winwaitactive doesnt seem to work it just sits there with the window active and doesnt so the rest of the script?

The winwaitactive works if you add this to it it helped me...

AutoItSetOption("WinWaitDelay",250)

And also put a sleep delay on after the winwaitactive

This is what i got.. It logs me in using FF.. Perfectly. Now i dont know how to loop something after its been exectued.. Like it does it then sleeps for how ever long then repeats the sequence...

Run("C:\Program Files\Mozilla Firefox\firefox.exe http://www.TheMafiaNetwork.net")
AutoItSetOption("WinWaitDelay",250)
WinWaitActive ("TheMafiaNetwork - Mozilla Firefox")
Sleep(2000)
MouseMove(572,334,10)
MouseClick("left") 
Send("Amped")
Sleep(1000)
MouseMove(741,335)
MouseClick("left")
Sleep(1000)
MouseMove(575,359,10)
MouseClick("left")
Send("****")
Sleep(1000)
MouseMove(597,437,10)
MouseClick("left")
Sleep(4000)
MouseClick("left",169,713,33)
Edited by Regency
Posted

Yea it is... But its a dupe.. so i dont care plus i quit.. just was gunna post a auto scripter for the people on the site to spoil to fun.. lol

Posted

lol kool ....

but does wnyone know whay i am having bother with win wait active? as it is quite annoying if a page / window take a little longer than notmal to load the clicks are just wasted on my desktop!

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
  • Recently Browsing   0 members

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