Jump to content

Recommended Posts

Posted

I want to make a script to auto-click add reply on my forums site. anyone know how to do it? i heard to scan for the image on the screen then to click on it. I dont even know how to scan for anything, how do i? any help would be much appreciated.

Posted

I want to make a script to auto-click add reply on my forums site. anyone know how to do it? i heard to scan for the image on the screen then to click on it. I dont even know how to scan for anything, how do i? any help would be much appreciated.

Please clarify what you're trying to do, I don't really understand. You want to make a script that will automatically click 'add reply' on a forums site? Is it YOUR forums, and it's for the forum members? If it's for personal use, you could use Mouseclick()... Most forum buttons all look the same, unless it has unique colors on it you could use Pixelsearch() and an If statement declaring that if it finds the color it will Mouseclick() on the coords. But since most buttons are the same colors, it wouldn't do much good.

I would just manually click 'add reply'... but if that's not an option, you could try making a hotkey and once that key is pressed, send a mouseclick to the coords of the 'add reply' button.

Sorry, i'm pretty new to Autoit v3 myself, but I love it already, automation ftw.

[center][/center]

Posted (edited)

my own forum and jsp. i just want it to hit auto reply and say something every 30 seconds. know how to do that? ty in advance

edit: how do i pixel search?

Edited by DaBoSS
Posted

my own forum and jsp. i just want it to hit auto reply and say something every 30 seconds. know how to do that? ty in advance

edit: how do i pixel search?

Well, using Autoit's Help file will help, but this code might guide you in the right direction. This is how I would do it... and you cannot do anything else while this program is running, the forums must be on top and you cannot do anything else (mouse movement wise, other programs, etc)... Until you close it.

CODE
WinWaitActive ('Title')

Sleep (4000)

While 1

Mouseclick('left', x, y, 1, 0) ; X, Y is where you enter the add reply button coords.

Send('What you want to send.')

Sleep (30000) ; Sleep goes by milliseconds, so 1000 = 1 second

Wend

[center][/center]

Posted (edited)

make a function to type something and then call it every 30sec

like:

While 1
PostIt()
WEnd
Func PostIt()
Send("how are you?")
Send("{ENTER}")
sleep(3000)
EndFunc ;==> PostIt()

i think you should look into HelpFile...

Edited by zFrank
[font="Georgia"]GSM Expert[/font] but not AutoIt :DProud to be Admin Of : http://www.gsmhosting.net/visit my Forum... http://www.gsmhosting.net/vbb/index.php
$Life = "Happy"
If @Error Then
$Life = "Risk"
Posted

To use PixelSearch(), you need to use Autoit Window Info (easiest way)

PixelSearch(), Searches a rectangle of pixes for the color provided.

So.

CODE
Local $coords

While 1

$coords = PixelSearch (0, 0, @DesktopWidth - 1, @DesktopHeight - 1, Hexcolorhere, Shadevariationherecoulduse0) ; that would search the whole screen for the pixel.

If @Error Then

Else

MouseClick('left', $Coords[0], $Coords[1], 1, 0)

EndIf

That would search for the pixel (using whole screen), then if it finds the pixel, mouseclick on it.

[center][/center]

Posted

ty but how i find this:

X, Y is where you enter the add reply button coords.

how i find add reply button coords?

You need to DL Autoit v3, if you haven't already, and use Autoit Window Info. There will be a prev/next button by the tabs, click next until you get to Mouse. There will be a finder tool, drag that to the button and look at the Position under Mouse tab: Value will be X, Y.

[center][/center]

Posted

i get this message: Posted Image

when i use this text:

Local $coords

While 1

$coords = PixelSearch (0, 60, @DesktopWidth - 1024, @DesktopHeight - 639, Hexcolorhere, Shadevariationherecoulduse0) ; that would search the whole screen for the pixel.

If @Error Then

Else

MouseClick('left', $Coords[790], $Coords[583], 1, 0)

EndIf

Posted

i get this message: Posted Image

when i use this text:

Local $coords

While 1

$coords = PixelSearch (0, 60, @DesktopWidth - 1024, @DesktopHeight - 639, Hexcolorhere, Shadevariationherecoulduse0) ; that would search the whole screen for the pixel.

If @Error Then

Else

MouseClick('left', $Coords[790], $Coords[583], 1, 0)

EndIf

No no no! =P, the Hexcolorhere and Shadevariationherecoulduse0 are values that YOU must find and enter, i don't know the hex color of the graphic button, and shade variant just allows you to look for slightly different variation in color that it will accept. Once again, you must use AutoIt window info. to find Hex colors.

[center][/center]

Posted

like what part of the info in that s/s is the color thing etc. srry im new to scripting anything other than diablo 2 rules.

Nothing, you're not in the right spot on the autoit window info. You have to press Next until you get to 'Mouse' then you will see Color, Values are in Hex.

[center][/center]

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