Jump to content

I wanna keep a script running


Haikiri
 Share

Recommended Posts

Hi
I made this and its working but I have to run it every time I need, I wish it could be running on the background.
 

Sleep (334)
Global $until = 1
Do
   WinActivate("flypop")
   Send("{ENTER}")
   $until += 1
Until $until = 80

I have many instances of this running and when a pop-up appears there is many at the same time so the little script closes them all.

Link to comment
Share on other sites

11 hours ago, Haikiri said:
9 hours ago, Haikiri said:

Gonna have to wait the pop-ups happen but I think it will work

I have many instances of this running and when a pop-up appears there is many at the same time so the little script closes them all.

What would be the ideal scenario? The things you would like the script to do?

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

7 hours ago, careca said:

What would be the ideal scenario? The things you would like the script to do?

There are 12 instances of the flypop running, when a certain event happen all of them give a pop-up message and if the event happens 5 times I get 60 pop-up messages to close so the purpose of the script is to keep running in the back waiting for the pop-ups to happen and then close them automatically when they do.

Link to comment
Share on other sites

Ok, i understand, so i assume ripdad's solution solved it yes?

In adition to his solution, i'd like to sugest the possibility of having something like that loop,

but just a winexists + winkill, so no need to activate it and pressing enter, simply, if it exists, close it, and you're done.

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

Just an update... didn't work.
They way it is the pop-up must be the active window or it won't do anything.
Most of the time the pop-ups stay behind the active window if I'm holding any key.
So I have to select them one by one and the script will close them.

Link to comment
Share on other sites

Hello,

How about using WinExists()?

$Title = "flypop"
While 1
    If WinExists($Title) Then ControlSend($Title,"","","{ENTER}")
    Sleep(10)
WEnd

Or this (in case ControlSend() isn't enough):

$Title = "flypop"
While 1
    If WinExists($Title) Then
        WinActivate($Title)
        WinWaitActive($Title)
        Send("{ENTER}")
    EndIf
    Sleep(10)
WEnd

 

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

  • Recently Browsing   0 members

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