Jump to content

Unstable Script


Bookman
 Share

Recommended Posts

  • Moderators

Do you want the script running constantly, and only used when the set windows are active?

Opt("WinTitleMatchMode", 3); I would use the exact title since both have the word "Print" in them
While 1
    Sleep(100)
    
    While WinExists("Print Setup")
        WinWaitActive("Print Setup")
        Send ($CmdLine[1])
        Sleep(50)
        Send ("{ENTER}")
        ExitLoop
    Wend
    
    While WinExists("Print")
        WinWaitActive("Print")
        Send("!r")
        
        If $CmdLine[1] = "R" Then
            Send ("{HOME}")
        ElseIf $CmdLine[1] = "C" Then
            Send ("{HOME}")
            Send("{DOWN}")
        EndIf
        
        Send ("{TAB}")
        Send ($CmdLine[2])
        Send ("!A")
        Send("!c")
        Send ($CmdLine[3])
        Send ("{ENTER}")
        ExitLoop
    Wend
Wend

Just a shot in the dark, hope I understood what you were trying to do.... Good Luck.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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