joen0s Posted January 5, 2007 Share Posted January 5, 2007 hi i hope someone can help me with my script CODEOpt("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 Link to comment Share on other sites More sharing options...
sugi Posted January 5, 2007 Share Posted January 5, 2007 CODEif 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. Link to comment Share on other sites More sharing options...
MadBoy Posted January 5, 2007 Share Posted January 5, 2007 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) Link to comment Share on other sites More sharing options...
joen0s Posted January 5, 2007 Author Share Posted January 5, 2007 thnx you all it is now working, Link to comment Share on other sites More sharing options...
sugi Posted January 5, 2007 Share Posted January 5, 2007 I would say it's missing EndIf ;pYep, that was another error, I only saw the first error. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now