Jump to content

Recommended Posts

Posted

Hello people

I have a problem

my script:

Mouseclick("left",380,186,1,5)
WinWaitactive("","Ahoj " & $a & "!",5)

now script waits for window containing "Ahoj " & $a & "!" and timeout is 5 second

i don´t know how to make condition: IF scrip will not find reguestet expresion ("Ahoj " & $a & "!") in 5 seconds then DO something, otherwise continue performing script commands

(i am sorry i usually programming too MathCad)

thanks a lot

  • Moderators
Posted

krboun,

You very nearly have the code set out in your text! :)

Mouseclick("left",380,186,1,5)
WinWaitactive("","Ahoj " & $a & "!",5)
; Check if GUI exists
If Not WinExists(("","Ahoj " & $a & "!") Then
    ; Do what you need to do if there is no GUI
EndIf
; There is a GUI so carry on with the script

Depending on the way your script is written you might need to look at an If...Else...EndIf structure, but I cannot tell from that short snippet. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

that is perfect thanks a lot

my problem is that script works with unstable program so if program crashes i need to switch it on again

mana thanks again

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...