Killer Posted April 20, 2006 Share Posted April 20, 2006 Does anyone know how to have AutoIT to execute a program in its compatibility mode such as run in Win95, run in 256 colours etc? Link to comment Share on other sites More sharing options...
Paulie Posted April 20, 2006 Share Posted April 20, 2006 I think you'd pretty much have to do a mouse coordinate click program using "MouseMove" I would write one for you, but it would be different depending on where the icon was on your screen Just use the Autoit on-screen info thingy and find the coordinates Just run it every time Link to comment Share on other sites More sharing options...
neogia Posted April 20, 2006 Share Posted April 20, 2006 I think you'd pretty much have to do a mouse coordinate click program using "MouseMove" I would write one for you, but it would be different depending on where the icon was on your screen Just use the Autoit on-screen info thingy and find the coordinates Just run it every timeThat sounds complicated expandcollapse popup$path = "Full path to exe" $check = _SetCompat($path) If @error == 1 Then MsgBox(0,"Error", "Incorrect Operating System Version.") ElseIf @error == 2 Then MsgBox(0,"Error", "Path to .exe file does not exist.") EndIf Func _SetCompat($pathToExe, $OS_Version = "", $256_Mode = 0, $640_480_Mode = 0, $Disable_Themes = 0, $Disable_Adv_Text = 0) $regString = "" Select Case StringInStr($OS_Version, "95") $regString &= "WIN95 " Case StringInStr($OS_Version, "98") Or StringInStr($OS_Version, "ME") $regString &= "WIN98 " Case StringInStr($OS_Version, "NT") $regString &= "NT4SP5 " Case StringInStr($OS_Version, "2000") $regString &= "WIN2000 " Case $OS_Version <> "" SetError(1) Return 0; Incorrect OS Version EndSelect If $256_Mode <> 0 Then $regString &= "256COLOR " EndIf If $640_480_Mode <> 0 Then $regString &= "640X480 " EndIf If $Disable_Themes <> 0 Then $regString &= "DISABLETHEMES " EndIf If $Disable_Adv_Text <> 0 Then $regString &= "DISABLECICERO " EndIf If StringRight($regString, 1) == " " Then $regString = StringTrimRight($regString, 1) EndIf If FileExists($pathToExe) Then RegWrite("HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $pathToExe, "REG_SZ", $regString) Return 1; Success Else SetError(2) Return 0; EXE file does not exist EndIf EndFunc [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia 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