jtr Posted January 22, 2005 Posted January 22, 2005 I searched "wildcard*" (heh) and could not find the answer to my question. I want to make this work with wildcards: Select Case $torrent = "Naruto*" Send($naruto &"{ENTER}") WinWaitActive("BitTorrent Files for [dattebayo] Anime") Case $torrent = "One Piece*" Send($onepiece &"{ENTER}") WinWaitActive("Kaizoku-Fansubs - BitTorrent") Case $torrent <> "zzzz" Send("http://www.animesuki.com{ENTER}") WinWaitActive("BitTorrent @ AnimeSuki.com") Sleep(3000) EndSelect But when I type something like Naruto 120, it goes to animesuki.com. I tried ?'s .'s and *'s. Please can someone provide me with the answers that I so seek.
SlimShady Posted January 22, 2005 Posted January 22, 2005 (edited) Wildcards are not supported in conditional statements. This is the closest thing. Select Case StringLeft($torrent, 6) = "Naruto" OR StringInStr($torrent, "Naruto") Send($naruto &"{ENTER}") WinWaitActive("BitTorrent Files for [dattebayo] Anime") Case StringLeft($torrent, 9) = "One Piece" OR StringInStr($torrent, "One Piece") Send($onepiece &"{ENTER}") WinWaitActive("Kaizoku-Fansubs - BitTorrent") Case $torrent <> "zzzz" Send("http://www.animesuki.com{ENTER}") WinWaitActive("BitTorrent @ AnimeSuki.com") Sleep(3000) EndSelect Edited January 22, 2005 by SlimShady
therks Posted January 22, 2005 Posted January 22, 2005 (edited) You'll need to do something with the string functions. It all depends on what you want exactly, have a look at the functions and decide which will work best for your situation. Here is a little bit that will help in the meantime Replace this: Case $torrent = "Naruto*" With this: Case StringInStr($torrent, "Naruto") This will work more like "*Naruto*" though. Er.. damn I typed too slow. And then I didn't even realize it until now! Hehe. Edited January 22, 2005 by Saunders My AutoIt Stuff | My Github
jtr Posted January 22, 2005 Author Posted January 22, 2005 Hurray StringInStr worked, I love you guys.
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