fred666777 Posted October 17, 2009 Share Posted October 17, 2009 (edited) i've tried a few things to do this but they all involve me typing in exact text im trying to get this expandcollapse popup#NoTrayIcon While 1 Sleep(10) If WinExists("YouTube - party in the usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Party in the USA - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Party in the Usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Party In The Usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Party In The usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - miley cyrus party in the usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley cyrus party in the usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus Party in the Usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus Party In The Usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus Party In The USA - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus Party In The usa - Mozilla Firefox")Then Lockup() If WinExists("YouTube - miley cyrus - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley cyrus - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus - Mozilla Firefox")Then Lockup() If WinExists("YouTube - Miley Cyrus - Mozilla Firefox")Then Lockup() HotKeySet ("{esc}", "nothing") HotKeySet ("{rwin}", "nothing") HotKeySet ("{lwin}", "nothing") HotKeySet ("{rctrl}", "nothing") HotKeySet ("{lctrl}", "nothing") HotKeySet("{Pause}", "ExitFunc") WEnd Func ExitFunc () ConsoleWrite ("> Loop Ended" & @CRLF) Exit EndFunc Func Lockup() ProcessClose("firefox.exe") While 2 MouseMove(0,0) WEnd EndFunc Func nothing() EndFunc to work but as you can see i have to type in exact text is there anyway for this to work just when the words "miley cyrus" or "party in the usa" come up? i only have it workig on youtube right now i almost want it to work like this example but w/ firefox AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of a notepad window that contains "this one" $handle = WinGetHandle("classname=Notepad", "this one") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else ; Send some text directly to this window's edit control ControlSend($handle, "", "Edit1", "AbCdE") EndIf Edited October 17, 2009 by fred666777 Link to comment Share on other sites More sharing options...
FuryCell Posted October 17, 2009 Share Posted October 17, 2009 Take a look at "window titles and text (advanced)" in the help file. You can use mode 2 to match any substring. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Bowmore Posted October 17, 2009 Share Posted October 17, 2009 This will match any of the window titles you listed with just one line.(?i) at the start of the regular expression pattern makes the match case insensitive. If WinExists("[REGEXPTITLE:(?i)party in the usa|Miley Cyrus]")Then Lockup() "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 Link to comment Share on other sites More sharing options...
fred666777 Posted October 18, 2009 Author Share Posted October 18, 2009 (edited) thanks works perfectly Edited October 18, 2009 by fred666777 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