Max in montreal Posted December 9, 2007 Share Posted December 9, 2007 If StringInStr("$max[1][0]", "$table[1][0]") = 1 Then WinMove("untitled -", "", 0, 0, 200, 200) i am trying to check if a string in the title of table, exists in max... i dont think it is working, can anyone tell me where my error is? Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 9, 2007 Share Posted December 9, 2007 If StringInStr("$max[1][0]", "$table[1][0]") = 1 Then WinMove("untitled -", "", 0, 0, 200, 200) i am trying to check if a string in the title of table, exists in max... i dont think it is working, can anyone tell me where my error is? Take off the " = 1 " part. StringInStr() returns 0 if the search string is not found, other wise it returns the character position NOT a 1 (unless it coincidentally happens to be at character position 1). So StringInStr("ABCDEFGHIJK", "DEF") returns 4, not 1. If you leave the value off, it becomes a boolean test. The 0 is False, and anything non-zero is True. So your line becomes: If StringInStr("$max[1][0]", "$table[1][0]") Then WinMove("untitled -", "", 0, 0, 200, 200) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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