Ganzor Posted December 16, 2007 Share Posted December 16, 2007 Here is the script I am trying to make...I am trying to grab the size of the window in an if statement. Is there a command to do it? ;AutoLogin script for Eve Online ;Game must be in full screen ;Must have logged in once manually before using this script ;initialize variables $num = 0 $width = 1680 $height = 1050 $account = "AccountName" $pass = "Password" $gamepath = "C:\Program Files\CCP\EVE\eve.exe" #requireadmin ;Run the 'Eve Online' Game Run($gamepath) ;Go through a while loop until the window is active, in full screen, and the commands are sent. ;PS: Yes, I know WinSize is not a real command, I'm looking for a real command to replace it. While $num < 1 If WinSize=($height,$width) Then If WinActive("EVE") Then $num = 1 Sleep(250) Send("{TAB}{TAB}") Send("^a") Send($account) Send("{TAB}{TAB}") Send($pass) Send("{ENTER}") EndIf EndIf WEnd Link to comment Share on other sites More sharing options...
Developers Jos Posted December 16, 2007 Developers Share Posted December 16, 2007 WinGetPos() 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...
Ganzor Posted December 16, 2007 Author Share Posted December 16, 2007 WinGetPos() I saw a related command: WinGetClientSize("") When trying to use it I keep getting a syntax error. $size = WinGetClientSize("") If $size[0]=($width) & $size[1]=($height) Then What is the correct syntax? Link to comment Share on other sites More sharing options...
Developers Jos Posted December 16, 2007 Developers Share Posted December 16, 2007 I saw a related command: WinGetClientSize("") When trying to use it I keep getting a syntax error. $size = WinGetClientSize("") If $size[0]=($width) & $size[1]=($height) Then What is the correct syntax?The client size is different from the window size... anyways: your IF is coded wrong ... use AND not & 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...
Ganzor Posted December 16, 2007 Author Share Posted December 16, 2007 (edited) The client size is different from the window size... anyways: your IF is coded wrong ... use AND not &Awesome, got that part working :-) One last question, if AND replaces &, what replaces '!=' - NotEqual?Edit: I think I found it - this will check to make sure the background at that point is black, correct? $color = PixelGetColor(10, 100) If Hex($color, 6) = Not 000000 Then Edited December 16, 2007 by Ganzor Link to comment Share on other sites More sharing options...
grham Posted December 16, 2007 Share Posted December 16, 2007 Awesome, got that part working :-) One last question, if AND replaces &, what replaces '!=' - NotEqual?Edit: I think I found it - this will check to make sure the background at that point is black, correct? $color = PixelGetColor(10, 100) If Hex($color, 6) = Not 000000 ThenIf Hex($color, 6) <> 000000 Then ...............? Link to comment Share on other sites More sharing options...
Ganzor Posted December 16, 2007 Author Share Posted December 16, 2007 If Hex($color, 6) <> 000000 Then ...............?Ignore whats after the then...I just wanted to make sure that it would check the pixel color correctly :-) What are the <> for? Are they necessary? (It's my first day trying out autoit, sorry about all the questions ) Link to comment Share on other sites More sharing options...
Developers Jos Posted December 16, 2007 Developers Share Posted December 16, 2007 your If is wrong... should be: If Hex($color, 6) <> "000000" Then Because Hex returns a string and the "= not" is something totally different . 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...
Ganzor Posted December 16, 2007 Author Share Posted December 16, 2007 I see. So <> is used as a "not equals" for strings then. Awesome :-) Thanks for all your help Jos and grham!! 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