Sign in to follow this  
Followers 0
Harlan Witherspoon

Can AutoIt run Notepad when no one's logged in?

2 posts in this topic

Here's what I'd like to be able to automate from Scheduled Tasks (which requires that I supply logon credentials) so that it runs when I have either LOGGED OFF of the console session on my server or when my workstation is LOCKED:

* Launch Notepad

* Type the keystrokes for "AutoIt ROCKS!"

* Type the keystrokes for File, Save As, and then specify the file name: "C:\TEST.TXT"

* Type the keystrokes for File, Exit or otherwise kill the Notepad process.

Sure, I can do this --and more!-- when I'm logged into the machine. But I need to run things when I'm away.

Anyone?

Thank you in advance!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I think when your workstation is locked something like this still works.

Opt("WinTitleMatchMode", 2)  
Run("notepad.exe")
WinWaitActive("Unbenannt - Editor")
for $i = 1 to 1000
ControlSend("Unbenannt - Editor", "", 15, "I is = " & $i & @CRLF)
Sleep(1000)
Next
Exit(0)

So, you can start the script, lock your workstation and the script will still run. So, the script can login to your server and do some things although your workstation is locked.

Surely, you have to stay locked in.

Just a thought. Hope that helps...

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
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
Sign in to follow this  
Followers 0