calmnus Posted March 17, 2011 Share Posted March 17, 2011 This script runs perfectly from inside the Script editor. It launches Solitaire, makes it full screen, and sets it to always on top. As soon as I convert it to and run the Executable, it only launches "Solitaire", it doesn't make it full screen or set it to Always on Top. Anyone have any ideas? Am I doing something wrong, or does the EXE just not do full screen and always on top? Thanks, Opt("WinTitleMatchMode", -2) Run("C:\WINDOWS\system32\sol.exe") Run("C:\Program Files\Microsoft Games\Solitaire\Solitaire.exe") Sleep(100) WinSetOnTop("solitaire", "", 1 ) WinSetState("solitaire", "", @SW_MAXIMIZE) Exit Link to comment Share on other sites More sharing options...
DarkestHour Posted March 17, 2011 Share Posted March 17, 2011 I think it might be your sleep command. It's generally not a good idea to sleep if you waiting for a window to load. Instead of Sleep, Try WinWait. So in this case: WinWait("solitaire") Link to comment Share on other sites More sharing options...
calmnus Posted March 17, 2011 Author Share Posted March 17, 2011 Thanks, I changed the "Sleep" to a "WinWait". Still works when run from the Script Editor, but still doesn't work when converted to an EXE Link to comment Share on other sites More sharing options...
bogQ Posted March 17, 2011 Share Posted March 17, 2011 Run("C:\WINDOWS\system32\sol.exe","",@SW_MAXIMIZE) WinWaitActive("Solitaire") WinSetOnTop("Solitaire", "", 1 ) TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
DarkestHour Posted March 17, 2011 Share Posted March 17, 2011 I used your code as follows with the winwait and it works both in scite and as an EXE. Opt("WinTitleMatchMode", -2) Run("C:\WINDOWS\system32\sol.exe") Run("C:\Program Files\Microsoft Games\Solitaire\Solitaire.exe") WinWait("solitaire") WinSetOnTop("solitaire", "", 1 ) WinSetState("solitaire", "", @SW_MAXIMIZE) Exit Link to comment Share on other sites More sharing options...
bogQ Posted March 17, 2011 Share Posted March 17, 2011 My guess is that he have two identical programs on different locations and im still not getting what win is he trying to maximize or to set on top flag if thet have identical win names? TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
calmnus Posted March 17, 2011 Author Share Posted March 17, 2011 ok, I'm an idiot. I just realized what I was doing wrong. I renamed my "solitaire.au3" file to "solLitaire.au3" (added an L in the middle) because when I was running from the script editor it was picking up "solitaire" in the title bar of the script editor and making it top most. The problem was, I was still converting "solitaire.au3" to an EXE instead of "solLitaire.au3". Once I figured out my mistake and converted the correct ".au3" file, the EXE worked as expected. Thanks for all your help, 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