Jump to content

Interesting Limitation in AutoIt


Recommended Posts

...the purge function that the OP mentioned could be done via AutoIt instead of xxcopy...

What!

Is this Jeopardy?

Should I have made my post in the form of a question. :-)

Maybe I should have posted:

Could the purge function that the OP mentioned could be done via AutoIt instead of xxcopy?

:-)

Seriously, if you answered lokster back on the suggestion to use StdinWrite, I missed it.

Please run this little test:

change the frequency of the beep lines as desired

run it once with your system unlocked and see what it does

then run it again with the system locked and hear what it does

obviously you can lock the system during the 5+ second loop of beeps

Opt("WinTitleMatchMode", 2)

$fh = FileOpen("test.bat", 2)
FileWrite($fh, "pause")
FileClose($fh)

For $i = 1 To 5
    Sleep(1000)
    Beep(8000, 1)
Next

$pid = Run("test.bat", "", @SW_SHOW, 1)
WinWait("cmd.exe")
StdinWrite($pid, "{SPACE}")
Beep(5000, 1)

Sleep(2222)

Run("cmd")
WinWait("cmd.exe")
If WinExists("cmd.exe") Then
    WinSetTitle("cmd.exe", "", _
            "StdinWrite, WinWait, WinExists and WinSetTitle will work when locked")
EndIf
Beep(5000, 1)
If this works for your script, then this should give you a work around while you learn how to do it all via AutoIt.

Let me know how/if it works for you...

[size="1"][font="Arial"].[u].[/u][/font][/size]

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