Jump to content

Help me with small problem


 Share

Recommended Posts

Hi i need your help with the following...

i am making a script for errors.

so if there is an error it have to go back i do the same thing again till it works...

so i begin with scripting and made this

If WinActive ("Session Error", "Unrecognised panel received unexpextedly during logon" ) Then
    Sleep (500)
    Send ("{enter}")
                    
        WinWaitActive ("JBA System 21")
            
            Exit
            
    Else

   EndIf

but how can i make it so my script go's back to the steps before this....

thanks!...

Link to comment
Share on other sites

  • Moderators

Wrap it in a While/WEnd loop or:

Do
    Sleep(10)
Until WinActive ("Session Error", "Unrecognised panel received unexpextedly during logon" )
Sleep (500)
Send ("{enter}")
WinWaitActive ("JBA System 21")
ExitoÝ÷ ØGb´êÚºÚ"µÍÚ[ØZ]XÝ]J   ][ÝÔÙÜÚ[ÛÜ][ÝË ][ÝÕ[XÛÙÛÙY[[XÙZ]Y[^^YH[ÈÙÛÛ][ÝÈ
BÛY
L
BÙ[
    ][ÝÞÙ[I][ÝÊBÚ[ØZ]XÝ]H
    ][ÝÒHÞÝ[HI][ÝÊB^]

Edited by SmOke_N

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

sleep (2000)


While Send ("!A")
     send ("P")
      Send ("{enter}")
    sleep (1000)

If WinActive ("Session Error", "Unrecognised panel received unexpextedly during logon" ) Then
    Sleep (500)
    Send ("{enter}")
                    
    
    Sleep (1000)
    
    Send ("{F12}")
            
    Sleep (500)     
            Exit
            
    Else

   EndIf    
   
   WEnd

like this?

but it don't go out the loop now

Link to comment
Share on other sites

K thanks Smoke i have the salution...

While Send ("!A")
     send ("P")
      Send ("{enter}")
    sleep (1000)

If WinActive ("Session Error", "Unrecognised panel received unexpextedly during logon" ) Then
    Sleep (500)
    Send ("{enter}")
                    
                else 
                    ExitLoop 

   EndIf    
   
   WEnd

thanks again

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