Sign in to follow this  
Followers 0
Guest Mark7805

Probly a simple script for you guys but.

14 posts in this topic

Ok want to make a bot that clicks a certain place every 2mins.So I need more help on Mouseclick commands and stuff.If possible I would LOVE if some1 could give me live support over msn.

Share this post


Link to post
Share on other sites



You may get a taker on the MSN-live-help, but I doubt it.

You will likely get as much help as you need however if you post some sample code that you are working on and say what you are trying to do and what trouble you are having.

The point is that no one wants to read the helpfile to you... show us the effort you've made first and you'll find this to be a very helpful place.


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Ok want to make a bot that clicks a certain place every 2mins.So I need more help on Mouseclick commands and stuff.If possible I would LOVE if some1 could give me live support over msn.

<{POST_SNAPBACK}>

WinActivate()

Send()

ControlClick()

MouseClick()

This list of functions will get you on your way.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

while 1; simple loop start
mouseclick("right",100,100,1,1); MouseClick ( "button" [, x, y [, clicks [, speed ]]] )
sleep(1000*60*2); pause for 1sec x 60 sec in a min x 2
wend; end loop

be it known that coords don't always work in things like directX games, and make sure you use the right MouseCoordMode

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

this is what I got right now:

;Autoit Version: 3.0

;Language: English

;Platform:2000/XP

;Mark(Author)

sleep(5000)

MouseClick("left"0,131,141,559)

Sleep(15000)

Share this post


Link to post
Share on other sites

this is what I got right now:

;Autoit Version: 3.0

;Language: English

;Platform:2000/XP

;Mark(Author)

sleep(5000)

MouseClick("left"0,131,141,559)

Sleep(15000)

<{POST_SNAPBACK}>

while 1

MouseClick("left"0,131,141,559)

sleep(1000*60*2)

wend

Share this post


Link to post
Share on other sites

while 1

MouseClick("left"0,131,141,559)

sleep(1000*60*2)

wend

<{POST_SNAPBACK}>

Clicking at x = 0, y = 131, for a total of 141 times with a delay of 559 seconds between each click?

Re-examine your syntax.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

sry I'm new..They don't have ranks on forums for no reason:|

Edited by Mark7805

Share this post


Link to post
Share on other sites

sry I'm new..They don't have ranks on forums for no reason:|

<{POST_SNAPBACK}>

:( Yeah, I was at one time too. Don't worry, the shine will wear off and you'll get to be just like us. I find the language more intuitave than some of the other ones out there.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

while 1
MouseClick("left",0,131,141,559); make sure you add the , after the button.
sleep(1000*60*2)
wend

while 1
MouseClick("left",0,131,141,559); make sure you add the , after the button.
sleep(1000*60*2)
wend

this would click 141 times

559 means that it moves to that spot at a speed of 559,

not a delay per tick of one I think

Parameters

button The button to click: "left", "right", "middle", "main", "menu", "primary", "secondary".

x, y [optional]The x/y coordinates to move the mouse to. If no x and y coords are given, the current position is used.

clicks [optional] The number of times to click the mouse. Default is 1.

speed [optional] the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10

so you might just want

while 1
MouseClick("left",0,131,1,1); click left button at 0,131 once 
                                       ;and move there almost instantly.
sleep(1000*60*2); delay of 2 minutes
wend
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Syntax: MouseClick( button, x, y, clicks, speed)

since clicks defaults to 1 and speed to a reasonable value, you probably want something more like:

MouseClick("left",131,141)

As Mark pointed out, placing this into an idle loop (While 1...WEnd) will make it execute until you stop it manually. So the following will sleep for 5 seconds, left-click at 131, 141, wait 15 seconds, click, wait 15 seconds, click etc.

Sleep(5000)
While 1
    MouseClick( "left",131,141)
    Sleep(15000)
WEnd

The next step would be to create a way to get out of the pogram... The following will use the ESC key as a hotkey to exit:

HotKeySet("{ESC}", "Terminate")

Sleep(5000)
While 1
    MouseClick( "left",131,141)
    Sleep(15000)
WEnd

Func Terminate()
    Exit
EndFunc

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

And then later, you might want to pause it

Dim $p
HotKeySet("{ESC}", "Terminate")
hotkeyset("{pause}","pause_me")

Sleep(5000)
While 1
    MouseClick( "left",131,141)
    Sleep(15000)
WEnd

Func Terminate()
    Exit
 EndFunc
 
func pause_me()
 $p=NOT $p
while $p
    sleep(10)
tooltip("paused",0,0)
WEnd
tooltip()
EndFunc

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

And then later, you might want to pause it

<{POST_SNAPBACK}>

But only hog the hotkeys if the window affected window is active, and use a different method of timing.

Dim $p,$mod

Sleep(5000)
While 1
    Sleep(125)

    If WinActive("windowname") then
        HotKeySet("{ESC}", "Terminate")
        hotkeyset("{pause}","pause_me")
    Else
        HotKeySet("{ESC}")
        hotkeyset("{pause}")
    EndIf

; Fire off every two minutes by the computer's clock
   If Mod(@MIN, 2) = 0 And $mod = 0 Then
    MouseClick( "left",131,141)
      $mod = 1
   ElseIf Mod(@MIN, 2) > 0 And $mod = 1 Then
      $mod = 0
   EndIf

WEnd

Func Terminate()
    Exit
 EndFunc
 
func pause_me()
 $p=NOT $p
while $p
    sleep(10)
tooltip("paused",0,0)
WEnd
tooltip()
EndFunc

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Ok want to make a bot that clicks a certain place every 2mins.So I need more help on Mouseclick commands and stuff.If possible I would LOVE if some1 could give me live support over msn.

<{POST_SNAPBACK}>

I'm sure that this thread is not related to this one: http://www.autoitscript.com/forum/index.php?showtopic=11832

Edit: fixed link

Edited by herewasplato

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

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