goldenix Posted May 26, 2008 Posted May 26, 2008 in this example you see that it will return 7 I was found, yet there is no I in Label ii. And what if I cant predict $string2 value, it can be upper/lower/or upper & lower all mixed up, how should I check if there is $string2 value in the $string in this case ?$string = 'Label ii' $string2 = 'I' $result = StringInStr($string, $string2) If $result > 0 Then MsgBox(0, "Result: " & $result,'I was found') Else MsgBox(0, "Result: " & $result,'I was not found') EndIf My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
monoceres Posted May 26, 2008 Posted May 26, 2008 StringInStr("HELLO","e",1) ; Case sensitive search Broken link? PM me and I'll send you the file!
goldenix Posted May 26, 2008 Author Posted May 26, 2008 StringInStr("HELLO","e",1) ; Case sensitive search Ya logish. looks like i need a break ....thanx for reply. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
sandin Posted May 26, 2008 Posted May 26, 2008 $CaseSensitive = 0 ;set to 1 if you wanna be case sensitive or 0 if you don't want it to be case sensitive $i = 0 $rec = "I" ;can be letter, word or number $text = "Label ii" do $i += 1 $foo = StringInStr($text, $rec, $CaseSensitive, $i) Until $foo = 0 MsgBox (0, "Counter", "Word/letter/number [ " & $rec & " ] has [ " & $i-1 & " ] inputs in your sentence") Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
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