scythetleppo Posted May 7, 2006 Share Posted May 7, 2006 expandcollapse popup$darkred = 4522241 $lightred = 16711680 $darkblue = 55 $lightblue = 255 if not processexists("Game.exe") then ;this process assumes game.exe, you can add errors here or whatever endif If Not WinActive("Diablo II","") Then WinActivate("Diablo II","") WinWaitActive("Diablo II", "") WinMove("Diablo II", "", 0, 0) WinSetOnTop ("Diablo II", "", 1) Sleep(1000) WinWaitActive("Diablo II") Sleep(100) $w6401 = PixelGetColor(77,424) $w6402 = PixelGetColor(577,424) $f6401 = PixelGetColor(67,400) $f6402 = PixelGetColor(577,400) $w8001 = PixelGetColor(90,570) $w8002 = PixelGetColor(750,570) $f8001 = PixelGetColor(75,514) $f8002 = PixelGetColor(744,514) if $w6401 > $darkred and $w6401 < $lightred and $w6402 > $darkblue and $w6402 < $lightblue then splashtexton("Color", "Windowed 640 res", 200, 200) sleep(10000) elseif $f6401 > $darkred and $f6401 < $lightred and $f6402 > $darkblue and $f6402 < $lightblue Then splashtexton("Color", "Fullscreen 640 res", 200, 200) Sleep(10000) elseif $w8001 > $darkred and $w8001 < $lightred and $w8002 > $darkblue and $w8002 < $lightblue Then splashtexton("Color", "Windowed 800 res", 200, 200) sleep(10000) elseif $f8001 > $darkred and $f8001 < $lightred and $f8002 > $darkblue and $f8002 < $lightblue Then splashtexton("Color", "Fullscreen 800 res", 200, 200) sleep(10000) else splashtexton("Color", "Not Recognized.", 300, 200);if you aren't getting the res sleep(10000) EndIf This code will tell you if D2 is running in Windowed 640, Fullscreen 640, Windowed 800 or Fullscreen 800 (the only possible resolutions). If it is not working for you, please tell me so I can make it more universal, but it should work. Diablo title must be "Diablo II" for this simple code. Link to comment Share on other sites More sharing options...
Busti Posted May 7, 2006 Share Posted May 7, 2006 why you dont use : WinGetSize() =?= My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
scythetleppo Posted May 7, 2006 Author Share Posted May 7, 2006 why you dont use :WinGetSize()=?=doesn't that say diablo is 800 if its windowed 800 and fullscreen 800? Link to comment Share on other sites More sharing options...
Busti Posted May 7, 2006 Share Posted May 7, 2006 dunno, test it My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity Link to comment Share on other sites More sharing options...
scythetleppo Posted May 7, 2006 Author Share Posted May 7, 2006 (edited) dunno, test it I'm not finding it >< is it included with beta?edit: oh is this it?WingetclientsizeI'll try it Edited May 7, 2006 by scythetleppo Link to comment Share on other sites More sharing options...
scythetleppo Posted May 7, 2006 Author Share Posted May 7, 2006 Yeah, it reports that it is 800, fut it doesn't know ifit's fullscreen or not, which offsets the click points. Link to comment Share on other sites More sharing options...
Simucal Posted May 7, 2006 Share Posted May 7, 2006 (edited) Nice effort and all, but this script could be replaced with a couple lines of code. $a_size = WinGetPos("Diablo II") If @error = 1 Then MsgBox(0,"Diablo Size", "Window not found") Else MsgBox(0,"Diablo Size","Width: "& $a_size[2]&" Height: "&$a_size[3]) EndIf Similarly, you can use WinGetState to see if it is in windowed or fullscreen mode. No messy pixel functions. Edited May 7, 2006 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
scythetleppo Posted May 7, 2006 Author Share Posted May 7, 2006 Nice effort and all, but this script could be replaced with a couple lines of code. $a_size = WinGetPos("Diablo II") If @error = 1 Then MsgBox(0,"Diablo Size", "Window not found") Else MsgBox(0,"Diablo Size","Width: "& $a_size[2]&" Height: "&$a_size[3]) EndIf Similarly, you can use WinGetState to see if it is in windowed or fullscreen mode. No messy pixel functions. Once again: things that should have been brought to my attention YESTERDAY (when I asked =[ )! Link to comment Share on other sites More sharing options...
Simucal Posted May 7, 2006 Share Posted May 7, 2006 Once again: things that should have been brought to my attention YESTERDAY (when I asked =[ )! No need to get upset, I was just trying to help out AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) 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