Hypertrophy Posted January 10, 2010 Share Posted January 10, 2010 (edited) $var[$n][0] holds a string value equaling: "John walked up the mountain."Does the expression: If $var[$n][0] > "John walked" check to see if "John walked" is contained in $var[$n][0] Edited January 10, 2010 by Hypertrophy Link to comment Share on other sites More sharing options...
Yashied Posted January 10, 2010 Share Posted January 10, 2010 (edited) If StringInStr($var[$n][0], "John walked") Then Edited January 10, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
jchd Posted January 11, 2010 Share Posted January 11, 2010 $var[$n][0] holds a string value equaling: "John walked up the mountain." Does the expression: If $var[$n][0] > "John walked" check to see if "John walked" is contained in $var[$n][0] The answer to "is contained in" has been made by Yashied. I'd like to point out that even if you can compare strings with ordering using >, >=, <=, <, lookup Operators in the help file. > Tests if the first value is greater than the second. Strings are compared lexicographically even if the contents of the string happen to be numeric. This implies that "2" > "11" is True. So ordering strings can be done and give useful results but you have to be well aware of the way it works to avoid surprises. OTOH, "2" > 11 is False. ConsoleWrite(("2" > "11") & @LF & ("2" > 11) & @LF) This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Hypertrophy Posted January 14, 2010 Author Share Posted January 14, 2010 Thank you both. 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