Jump to content

works in SciTE Script Editor, doesn't work as EXE


Recommended Posts

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

Run("C:\WINDOWS\system32\sol.exe","",@SW_MAXIMIZE)
WinWaitActive("Solitaire")
WinSetOnTop("Solitaire", "", 1 )

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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 connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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

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
 Share

  • Recently Browsing   0 members

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