I'm implementing a command in a chatbot which will open the user's browser and send the search query to Google.
I'm not sure why, but this isn't working:
If txtSend.text = Mid("/google", 9) Then
googlesearch = Mid(txtSend.text, 9)
ShellExecuteA Me.hWnd, "Open", "http://www.google.com/search?q=" & googlesearch & "&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official", 0&, 0&, 0&
Exit Sub
End If
I believe its to do with the fact that it's only being read after KeyPress, and at that point txtSend.Text is cleared.
Quote from: Topaz on August 04, 2005, 12:02 PM
If txtSend.text = Mid("/google", 9) Then
At first glance, this line is at fault. Your code is somewhat backwards. :)
Yeah, I just noticed my error:
If Left(txtSend.Text, 9) = "/google " Then
Quote from: Topaz on August 04, 2005, 12:11 PM
Yeah, I just noticed my error:
If Left(txtSend.Text, 9) = "/google " Then
Shoulden't that be left(text, 8 )
edit: damned smilys
pandachatcopycat!
Yea both bad ideas!
So, I don't know what that is. I do know, though, that /google was a command I put in PC. :)