Jump to content

Using AutoIt with Windows Task Manger


simonc8
 Share

Recommended Posts

I set up a Windows scheduled task to run an AutoIt script at a specified time. The script simply sent a key combination which was a hot key to stop a process on the computer.

This worked exactly as I wanted for a long time, but recently, possibly after some Windows updates, it stopped working. If I start the task manually in Task Manger it reports that it is Running, but the computer doesn't respond to the sent key combination, meanwhile, the task continues to run and needs to be stopped manually. If I run the AutoIt script, by double clicking the file, it immediately sends the correct key combination, so the problem is obviously with Task Manager.

My Scheduled Task Action simply has the name and path of the .au3 file in quotes. Is there another way of doing this?

Grateful for advice.

Link to comment
Share on other sites

  • Developers
2 minutes ago, simonc8 said:

Seems you can't edit posts on this forum. Additional information:

Welcome, That will be possible at a later stage when you're status has change from "New Member" to "Member". ;)

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

First off, welcome to the forum. Secondly, please see this post regarding how to ask for help - as is the case with this post, one of the bullet points states that it is difficult for us to help if you don't post your code.

Lastly, if you are trying to simply stop a process, please look at ProcessList, ProcessExist and ProcessClose in the help file; no need to a key press, which can be unreliable.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

My optimism was misplaced. I want to stop a screen video recording session, but killing the process results in a corrupt video file. Here is my original AutoIt script:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.14.5
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start


Send("^W")

I don't believe there is a problem with this script, because it works when I run it by double clicking the .au3 file. However, it doesn't work when I try to trigger it with Windows Task Scheduler.

If anyone can suggest how to get this file to run on a schedule I would be very grateful.

Link to comment
Share on other sites

On ‎19‎-‎10‎-‎2018 at 4:40 PM, simonc8 said:

My Scheduled Task Action simply has the name and path of the .au3 file in quotes. Is there another way of doing this?

Maybe compile it and use the exe.

Also see if the button in question retrieves an id through the info tool, so then you can use the id or class in a function to click it or something.

 

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

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