thenewkid Posted November 19, 2006 Share Posted November 19, 2006 Hi if u have a few min and dont mind looking over my code and telling me whats wrong it would mean a lot theres a erorr in there some where and i dont know how to fix it thanks expandcollapse popupFunc init() Local $X, $Y, $Z, $A WinActivate("Magic Online V2") If @DesktopDepth < 24 Then _ShowError( "Your color depth should be 24bit or 32bit") EndIf If @DesktopHeight > 768 And @DesktopWidth > 1024 Then WinMove( "Magic Online V2", "", 0, 0, 1024, 755) $Y = 0 While PixelGetColor(500, $Y) <> 0 $Y = $Y + 1 WEnd ;~ 721 $X = 0 While PixelGetColor($X, $Y) <> 0 $X = $X + 1 WEnd $Z = $Y + $X $Y = $Y - 19 WinMove( "Magic Online V2", "", -$X, -$Y, 1024 + 2 * $X, 721 + $Z) Else WinSetState( "Magic Online V2", "", @SW_MAXIMIZE) $A = WinGetClientSize( "Magic Online V2") If $A[0] <> 1024 Or $A[1] <> 721 Then _ShowError( "There's an error on your system configuration." & @CRLF & @CRLF & "If you can't solve the problem, please send the latest screenshot at " & @CRLF & """" & @ScriptDir & "\support"" to cammy-14@hotmail.co.uk") EndIf EndIf some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with Link to comment Share on other sites More sharing options...
Valuater Posted November 19, 2006 Share Posted November 19, 2006 You didn't state the actual problem.. but this,, While PixelGetColor(500, $Y) <> 0 $Y = $Y + 1 WEnd will never end until it crashes... this is the same While PixelGetColor($X, $Y) <> 0 $X = $X + 1 WEnd 8) Link to comment Share on other sites More sharing options...
thenewkid Posted November 19, 2006 Author Share Posted November 19, 2006 o srry the erorr is in the bit If $A[0] <> 1024 Or $A[1] <> 721 Then ; ^ here some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with Link to comment Share on other sites More sharing options...
Developers Jos Posted November 19, 2006 Developers Share Posted November 19, 2006 & "\support"" to cammy-14 @ ") mmmm.... where did I see that name before today ...... 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...
tresa Posted November 19, 2006 Share Posted November 19, 2006 (edited) o srry the erorr is in the bit $A = WinGetClientSize( "Magic Online V2") If $A[0] <> 1024 Or $A[1] <> 721 Then ; ^ here the WinGetClientSize returns 0 if the window is'nt found. With 0 the array dos'nt exists anymore so AutoIt says there cannot be a subscript. To avoid this test the @error to 0 and do the if only in this case. If @error<>0 you have to write what you'll do $A = WinGetClientSize( "Magic Online V2") if @error=0 then If $A[0] <> 1024 Or $A[1] <> 721 Then .... EndIf else ... EndIf Edited November 20, 2006 by tresa Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 19, 2006 Share Posted November 19, 2006 could also be done using Isarray 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