supraspecies Posted February 1, 2015 Share Posted February 1, 2015 (edited) Can't get OR statement to work with both windows. Need for script to exit if either window exists. Tried: While Not WinExists ('[TITLE:ActiveMovie Window;CLASS:VideoRenderer]') Or Not WinExists ('[TITLE:Hover Ace;CLASS:D3D Window]') sleep(1000) WEnd Exit Tried: While Not WinExists ('[TITLE:ActiveMovie Window;CLASS:VideoRenderer]') Or WinExists ('[TITLE:Hover Ace;CLASS:D3D Window]') Tried: While Not WinExists ('[TITLE:ActiveMovie Window;CLASS:VideoRenderer]') Or ('[TITLE:Hover Ace;CLASS:D3D Window]') Neither works. Windows TITLE and CLASS are proper. Tried them separately - works. But doesn't work with both. Can't figure out what am I doing wrong. Used OR statement before, never had this problem. EDIT: Do/Ultil loop worked fine. Do ShellExecute(@ScriptDir & '\HoverAce.exe', '', @ScriptDir) sleep(1000) Until WinExists ('[TITLE:ctiveMovie Window;CLASS:VideoRenderer]') Or WinExists ('[TITLE:Hover Ace;CLASS:D3D Window]') But I'm still wondering why While loop failed. It's practically the same thing here, so I dont see a reason for failure. Maybe it has something to do with NOT? Topic can be marked as solved (looks like I can't mark my first post as a solution) unless someone cares to give an explanation to this. I'd appreciate it. Edited February 1, 2015 by supraspecies Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted February 1, 2015 Developers Solution Share Posted February 1, 2015 (edited) When testing for "Not WinExists: you need to change it to an And relation eg: While Not WinExists ('[TITLE:ActiveMovie Window;CLASS:VideoRenderer]') And Not WinExists ('[TITLE:Hover Ace;CLASS:D3D Window]') sleep(1000) WEnd Exit Jos Edited February 1, 2015 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
supraspecies Posted February 1, 2015 Author Share Posted February 1, 2015 Ohhh, I get it now. Thank you, now I see the flaw. Solved. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2015 Developers Share Posted February 1, 2015 Ohhh, I get it now. Thank you, now I see the flaw. Solved. I was just made aware you seem to be doing game automation, so advice you to read our forum rules carefully! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
supraspecies Posted February 1, 2015 Author Share Posted February 1, 2015 (edited) I was just made aware you seem to be doing game automation, so advice you to read our forum rules carefully! Jos No, you misunderstood. The game is not optimized for 64-bit operating systems. It does launch, but it launches from third or fifth try. What I was doing is creating a launcher that will launch the game until the game window appears (i.e. it succeeds to actually launch the game). This is my full script: #notrayicon #include <Misc.au3> _Singleton("Hover Ace Launcher", 0) While Not WinExists ('[TITLE:ActiveMovie Window;CLASS:VideoRenderer]') And Not WinExists ('[TITLE:Hover Ace;CLASS:D3D Window]') While Not ProcessExists ('HoverAce.exe') Run(@ScriptDir & '\HoverAce.exe', @ScriptDir) WEnd WEnd What I do is fix games, not hack them. Besides, it's a Single Player game. No hacks or alterations of any kind are involved. Edited February 1, 2015 by supraspecies Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 1, 2015 Moderators Share Posted February 1, 2015 The rules aren't specific to multiplayer games. If you need a reminder. 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 More sharing options...
Recommended Posts