Sign in to follow this  
Followers 0
cjohnjohn

autoit how to write a script to click on background

9 posts in this topic

Hi

are there anyone know how to write a script that it can continuesly clicking on background window while I am browsing other webpages with other window?

Thanks in advance

Share this post


Link to post
Share on other sites



Hi

are there anyone know how to write a script that it can continuesly clicking on background window while I am browsing other webpages with other window?

Thanks in advance

I think NO WAY! ;)

Share this post


Link to post
Share on other sites

welcome to the forum !

What's your background window ?

Be more precise...Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

I don't hope this is for cheating purposes, but i suppose not.

If you meant mouse clicks left, right, middle etc. then this should do the job for ya

While 3
Controlclick("YourWindowTitle","","","Right",1)
sleep(1000)
wend

Tyranlol


[u]Only by Attempting the Impossible You Can Earn the Remarkable[/u]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I think NO WAY! :)

Correcting myself: YES, These is a way! ;)

I don't hope this is for cheating purposes, but i suppose not.

If you meant mouse clicks left, right, middle etc. then this should do the job for ya

While 3
Controlclick("YourWindowTitle","","","Right",1)
sleep(1000)
wend

Tyranlol

I knew ControlClick() function but I thought it would not work for background windows, but I just tried it and it works with background windows too.

So cjohnjohn you have to use ControlClick() function as Tyranlol suggested...

Edited by ALTIN

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I am playing a webpage game, it need to click on certain monster to kill them. But sometimes it is boring to do the same clicking the whole day. So i usually check some other news or other webpages while playing this game, but it is irritating to change back to the game window to click on it and back to my news every 5 seconds.

I use pixelSearch to search a certain pixel from the monster and if the monster avaiable on screen, then it will auto click on it. but it only works when the game screen is activate and is to the front screen. if i am browsing other webpage, then it can't perform the click function.

this is basic function i wanna do, this is just part of it.

$B = PixelSearch($startXY[0], $startXY[1], $endXY[0], $endXY[1], 0xed8681)

while 1

if IsArray( $B ) then

MouseClick("left",$B[0],$B[1],1,1)

SLEEP(5000)

endif

wend

I search the forum, someone say that pixelSearch doesn't work on background.

So what i need is, some functions that can search certain pixel and click on it on background window and don't irritate my current window.

Is there any function for it.

Thanks in advance.

Edited by cjohnjohn

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

i think i write all correct, but still i dont see click on window.

Do i have to write anything else exept this?

ControlClick ("Online support - Google Chrome", "" , "" , "" , 1 , 1026, 716 )
Edited by Crackeraki

Share this post


Link to post
Share on other sites

Crackeraki,

Please do not necro threads - particularly those that deal with currently prohibited subjects. ;)

I would also like to point out that your first 2 posts on this forum have resulted in thread locks - please do not make it a hat-trick or you will find that your ability to continue posting may well suffer. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0