Jump to content

Recommended Posts

Posted

hi i hope someone can help me with my script

CODE
Opt("MouseCoordMode",0)

if fileexists("c:\inventarisatie.txt") then Exit

else

Run("everest.exe")

WinWait("EVEREST Ultimate Edition 2006","",20)

If Not WinActive("EVEREST Ultimate Edition 2006","") Then WinActivate("EVEREST Ultimate Edition 2006","")

WinWaitActive("EVEREST Ultimate Edition 2006","")

Send("{ALTDOWN}{ALTUP}rr")

WinWait("Rapport Assistent - EVEREST","")

If Not WinActive("Rapport Assistent - EVEREST","") Then WinActivate("Rapport Assistent - EVEREST","")

WinWaitActive("Rapport Assistent - EVEREST","")

Send("vvvk")

ProcessWait("Bericht - EVEREST", 10)

WinWait("Bericht - EVEREST","")

If Not WinActive("Bericht - EVEREST","") Then WinActivate("Bericht - EVEREST","")

WinWaitActive("Bericht - EVEREST","")

Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{F4}{ALTUP}")

WinWait("EVEREST Ultimate Edition 2006","")

If Not WinActive("EVEREST Ultimate Edition 2006","") Then WinActivate("EVEREST Ultimate Edition 2006","")

WinWaitActive("EVEREST Ultimate Edition 2006","")

Send("{ALTDOWN}{F4}{ALTUP}")

Run("notepad.exe")

WinWait("Naamloos - Kladblok","")

If Not WinActive("Naamloos - Kladblok","") Then WinActivate("Naamloos - Kladblok","")

WinWaitActive("Naamloos - Kladblok","")

Send("{CTRLDOWN}v{CTRLUP}{CTRLDOWN}s{CTRLUP}")

WinWait("Opslaan als","")

If Not WinActive("Opslaan als","") Then WinActivate("Opslaan als","")

WinWaitActive("Opslaan als","")

Send("c:\inventarisatie.txt")

Send("{ALTDOWN}{F4}{ALTUP}")

with this script i get a error

N:\EVEREST Ultimate Edition\abc.au3 (3) : ==> "Else" statement with no matching "If" statement.:

else

help me please

Posted

CODE

if fileexists("c:\inventarisatie.txt") then Exit

else

Use either one-line If statements, or multiple lines. If you have a command on the same line after "then", then it is a one-line statement, so the Else is NOT part of this statement. And that's why AutoIt complains that there is no matching If/then.

Just put the "Exit" on a new line.

Posted

Use either one-line If statements, or multiple lines. If you have a command on the same line after "then", then it is a one-line statement, so the Else is NOT part of this statement. And that's why AutoIt complains that there is no matching If/then.

Just put the "Exit" on a new line.

I would say it's missing EndIf ;p

Opt("MouseCoordMode",0)
If fileexists("c:\inventarisatie.txt") then
    Exit
Else
    Run("everest.exe")
EndIf
WinWait("EVEREST Ultimate Edition 2006","",20)
If Not WinActive("EVEREST Ultimate Edition 2006","") Then WinActivate("EVEREST Ultimate Edition 2006","")
WinWaitActive("EVEREST Ultimate Edition 2006","")
Send("{ALTDOWN}{ALTUP}rr")
WinWait("Rapport Assistent - EVEREST","")
If Not WinActive("Rapport Assistent - EVEREST","") Then WinActivate("Rapport Assistent - EVEREST","")
WinWaitActive("Rapport Assistent - EVEREST","")
Send("vvvk")
ProcessWait("Bericht - EVEREST", 10)
WinWait("Bericht - EVEREST","")
If Not WinActive("Bericht - EVEREST","") Then WinActivate("Bericht - EVEREST","")
WinWaitActive("Bericht - EVEREST","")
Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}{ALTDOWN}{F4}{ALTUP}")
WinWait("EVEREST Ultimate Edition 2006","")
If Not WinActive("EVEREST Ultimate Edition 2006","") Then WinActivate("EVEREST Ultimate Edition 2006","")
WinWaitActive("EVEREST Ultimate Edition 2006","")
Send("{ALTDOWN}{F4}{ALTUP}")
Run("notepad.exe")
WinWait("Naamloos - Kladblok","")
If Not WinActive("Naamloos - Kladblok","") Then WinActivate("Naamloos - Kladblok","")
WinWaitActive("Naamloos - Kladblok","")
Send("{CTRLDOWN}v{CTRLUP}{CTRLDOWN}s{CTRLUP}")
WinWait("Opslaan als","")
If Not WinActive("Opslaan als","") Then WinActivate("Opslaan als","")
WinWaitActive("Opslaan als","")
Send("c:\inventarisatie.txt")
Send("{ALTDOWN}{F4}{ALTUP}")
]

My little company: Evotec (PL version: Evotec)

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