Dava Posted June 18, 2008 Share Posted June 18, 2008 Hi, I am trying to get the "percentage complete" indication from DVD Decrypter whilst ripping so as to show it on an external display in my HTPC. while ProcessExists('DVDDecrypter.exe') $title=WinGetTitle('DVD Decrypter',"") $pct=0 $pct=StringLeft($title,3) MsgBox( 0,"Rip",$title,5) Wend I can see that in the Windows taskbar at the bottom that the title is "12% - DVD Decrypter" but the Window title is always just "DVD Decrypter" and that is what is returned to AutoIT. Any ideas how I can get the Taskbar version of the title including the percentage? Link to comment Share on other sites More sharing options...
Dava Posted June 18, 2008 Author Share Posted June 18, 2008 Cracked it! Using Winlist() shows that there are multiple windows, one of which has the percentage at the front. Link to comment Share on other sites More sharing options...
MHz Posted June 18, 2008 Share Posted June 18, 2008 ; use regex $var = "12% - DVD Decrypter" Run('notepad') WinWait('Untitled') WinSetTitle('Untitled', '', $var) While ProcessExists('Notepad.exe') $title = WinGetTitle('[REGEXPTITLE:[[0-9]]*% - DVD Decrypter]') $pct = 0 $pct = StringLeft($title,3) MsgBox( 0, "Rip", $title, 5) WEndoÝ÷ Ù«¢+ØìÕÍÍÕѥѱµ½)=ÁÐ ÅÕ½Ðí]¥¹Q¥Ñ±5Ñ¡5½ÅÕ½Ðì°È¤(ÀÌØíÙÈôÅÕ½ÐìÄÈ´YÉåÁÑÈÅÕ½Ðì)IÕ¸ Ìäí¹½ÑÁÌäì¤)]¥¹]¥Ð ÌäíU¹Ñ¥Ñ±Ìäì¤)]¥¹MÑQ¥Ñ± ÌäíU¹Ñ¥Ñ±Ìäì°ÌäìÌäì°ÀÌØíÙȤ)]¡¥±AɽÍÍá¥ÍÑÌ Ìäí9½ÑÁ¹áÌäì¤(ÀÌØíѥѱô]¥¹ÑQ¥Ñ± Ìäì´YÉåÁÑÈÌäì¤(ÀÌØíÁÐôÀ(ÀÌØíÁÐôMÑÉ¥¹1Ð ÀÌØíѥѱ°Ì¤(5Í ½à À°ÅÕ½ÐíI¥ÀÅÕ½Ðì°ÀÌØíѥѱ°Ô¤)]¹ You could also try and use the class of the window or other. Check the help page on "Window Titles and Text (Advanced)". Link to comment Share on other sites More sharing options...
Dava Posted June 18, 2008 Author Share Posted June 18, 2008 Thanks, I managed to extract the percentage, only to the console at the moment but I got the exact functionality I needed with this: run ('d:\Program Files\dvd decrypter\DVDDecrypter.exe /start /close /overwrite yes',"",@SW_MINIMIZE) Opt("WinTitleMatchMode", 2) AutoItSetOption("WinDetectHiddenText",1) while ProcessExists('DVDDecrypter.exe') $var = WinList("% - DVD Decrypter") if $var[0][0] > 0 Then ConsoleWrite ($var[1][0]) $pct=0 $pct=StringLeft($var[1][0],4) while not StringIsDigit($pct) $pct=StringLeft($pcT, stringlen($pct)-1) WEnd ConsoleWrite (":" & $pct & @lf) EndIf sleep (1000) WEnd 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