Jump to content

Avoid script pause on window change


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

<snip>

Edited by Melba23
Suggestion removed
Spoiler

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

Au3Record.exe

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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