Synth Posted October 28, 2007 Posted October 28, 2007 (edited) When I type a sentence into InputBox with the String "(Lol)" . It doesnt find it. Is there any way to fix this? CODE$b = InputBox("This" ,"Doesn't work" ,"","") If $b == "(Lol)" Then MsgBox(0,"It works","but,it doesnt") EndIf Edited October 28, 2007 by Synth
BigDod Posted October 28, 2007 Posted October 28, 2007 Lose the brackets $b = InputBox("This" ,"Doesn't work" ,"","") If $b == "Lol" Then MsgBox(0,"It works","but,it doesnt") EndIf Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Synth Posted October 28, 2007 Author Posted October 28, 2007 With the thing that Im doing i need the brackets. And I tried it,it doesn't work..
Bowmore Posted October 28, 2007 Posted October 28, 2007 With the thing that Im doing i need the brackets.And I tried it,it doesn't work..I don't understand what the problem is. I just ran the code you posted and it worked fine for me.I typed "(Lol)" without the quotes and $b was returned with exactly that and the message box displayed.Have I misunderstood something here? "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
picaxe Posted October 28, 2007 Posted October 28, 2007 (edited) You are aware that $b == "(Lol)" is case sensitive. $b = "(Lol)" is case insensitive Your example fails if you enter "(lol)". Edited October 28, 2007 by picaxe
Synth Posted October 28, 2007 Author Posted October 28, 2007 I mean't when i type a sentence (ie: "This makes me go (Lol)" without the quotes ) it doesn't return the message box. But if i just type "(Lol)" It does. picaxe > Im aware of that.
Synth Posted October 28, 2007 Author Posted October 28, 2007 (edited) Nope that doesn't work for me... I already made it case sensitive,but that's not what i want. Ps: Look at the 6# post. Edited October 28, 2007 by Synth
Sardith Posted October 28, 2007 Posted October 28, 2007 (edited) Try this. $Input = InputBox("This" ,"Doesn't work" ,"","") $b = StringInStr($Input, "(Lol)", 1); '1' makes it case sensitive. If $b > 0 Then MsgBox(0,"It works","but,it doesnt") EndIf I made a mistake I believe. Give that a shot. Edited October 28, 2007 by Sardith [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
Xenobiologist Posted October 28, 2007 Posted October 28, 2007 Hi, If StringInStr(InputBox("This", "Doesn't work", ""), "(Lol)", 1) Then MsgBox(0, "It works", "Works") So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
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