Sign in to follow this  
Followers 0
StefzX

Avoid script pause on window change

6 posts in this topic

#1 ·  Posted (edited)

Hello everyone,

I have a problem : I've been looking on the net for an easy working autocliker, but I couldn't find it, so i decided to make my own one with autoit.

I made many researches on this forum and then i found some good codes to use.

I finally could make my autoclicker, but still i have a problem : i need to run the script on a window, and when i start the script and click on the window i need, the script pauses..

So I tried to find a solution for this problem, but I couldn't find one yet..

Here's the code of my script until now

$title = WinGetTitle("iPad-di-Stefano - VNC Viewer")
WinActivate($title)

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

Func Terminate()
Exit 0
EndFunc

$i = 0

Do

MouseClick("left", 1481, 865, 2)
Sleep (1000)
MouseClick("left", 1054, 743, 2)
Sleep (1000)
MouseClick("left", 1051, 616, 2)
Sleep (2000)
$i = $i + 1
Until $i = 100

so I do activate the window from the script, but after doing it it will pause..and if i click somewhere else on the screen it will go back running..

How could i solve?

Thanks for your help,

Stefano

Edit : I just realized the script works for example on IE and Chrome, so it must be a problem of the software i want to run the autoclicker on..(VNC Viewer)

Edited by StefzX

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

StefzX

You are very close. Take a look at WinActive / WinWaitActive. They can tell your script whether that window is active, or to wait until it is.

You can pause your script or force it to be active again otherwise.

Out of curiosity, what are you trying to automate on your ipad?

rgds

Edited by Vincor

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

First of all thanks for your reply, i'll check those methods now,

and second, hehe i knew someone would ask what was i trying to do, so basically there is a game, called Curiosity, where people from the entire world have to destroy a giant cube, that is made of millions and millions of smallest cubes..

So, there is an object that cost 3 bilions, and it s too much for a person to reach(but I'm just so curious to see what will it do)...but in-app you can purchase 500k money at time, so since my iPad is ja*****ken, i wanted to let it reach 3 bils automatically...(it would take too much manually)..that's why i tried to make that script, but maybe it could be used for many other things..

however i ja*****ken my iPad not to cheat on games but because you can customize it much more than you can with native iOS

Edit : that's how i changed my code

$title = WinGetTitle("iPad-di-Stefano - VNC Viewer")
WinActivate($title)

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

Func Terminate()
Exit 0
EndFunc

$i = 0
if WinActive($title) then
Do
MouseClick("left", 1481, 865, 2)
Sleep (1000)
MouseClick("left", 1054, 743, 2)
Sleep (1000)
MouseClick("left", 1051, 616, 2)
Sleep (2000)
$i = $i + 1
Until $i = 3
endif

but still not working on vnc viewer..still i tried this on photoshop and it works, so i think there must be some kind restriction from vnc or something else...guess i'll have to do it manually :P

Edited by StefzX

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

<snip>

Edited by Melba23
Suggestion removed

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

StefzX, read the Forum Rules. Game automation is not allowed. You will probably not receive any more help, unless someone else wants to keep breaking the rules here.

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

StefzX,

somdcomputerguy is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. :naughty:

But welcome to the AutoIt forum - and see you soon with a legitimate question I hope. :)

careca,

In future, please read the posts carefully before you answer. :naughty:

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