Jump to content

WinWaitActive


GEOSoft
 Share

Recommended Posts

I didn't realize until now that Win titles are case sensitive. Is there any way to change that

I'm writing a quick window trap and case sensitivity is a bit of a pain.

Opt(WinTitleMatchMode, 2)
WinWaitActive("Notepad")
Do
  Whatever()
Until $I_Quit
oÝ÷ Ùj+Ànµ«­¢+Ù=ÁС]¥¹Q¥Ñ±5Ñ¡5½°È¤)]¥¹]¥ÑÑ¥Ù ÅÕ½Ðí¹½ÑÁÅÕ½Ðì

won't. In the script I'm actually using an InputBox to get the title (hence the pain) but that shouldn't make any difference.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

maybe...

$PID = Run("Notepad.exe")
WinWaitActive("")

Do
    Sleep(10)
    ; your code
Until Not ProcessExists($PID)

 oÝ÷ ÛÏêº^"²Ëa{hë®*mjwZìi©Ú¶*'Â)e+ÞÊmëmz¸y¡b®ËZ²+µìi©Ú¶*'ˬ¢g««yéëºyâÏ~öÉ櫳­zد»¬jwg¡©íÊrÁªÞ楲Z±§ÞÁû§v·~)^²¡ë'ßÛpj{m¢Z,y©Ý¶²j·¬q«mz·jYh½êÓ«lj'fÉø«²×!¢'Â¥v¯y·ªÞ{¦×è®×W¬#ozf§j¶¶Ø^³+-zf¥-rW»­êÞÆW¢Ø^®ØZ´ÈºÇu穱ƧÂ+aj|­)àØî²Û!ºÛ(}ûayÊ&¦ë^¬ZÊ"±Æ®²)àiÊ.¦W¨~«¶'.ªðwhÂËh¦n¥êëjØjYr"y¬!jÛayø¥zv¦z鮲̭ë("­¶¬¶¶«jëh×6Opt ("WinTitleMatchMode", 2)
Opt ("TrayIconDebug", 1)
$OutFile = @DesktopDir & '\Proc_List.txt'
$Ttl = InputBox("Trap Window Process", "Enter any portion of the window title you want to trap" & @CRLF & @CRLF & 'Case sensitive')
$P1 = ProcessList()
WinWaitActive($Ttl)
$P2 = ProcessList()
$Fopen = FileOpen ($OutFile,2)
For $I = 1 To $P1[0][0]
FileWriteLine($Fopen,$P1[$I][0])
Next

FileWriteLine($Fopen,@CRLF & @CRLF & '(List 2)')

For $I = 1 To $P2[0][0]
FileWriteLine($Fopen,$P2[$I][0])
Next
FileClose($Fopen)
MsgBox(0,'Finished',' Process Lists Have been Created')
ShellExecute($OutFile)
Exit
It just runs in the tray until the popup appears and then outputs the 2 ProcessList()'s. After I realized that Win Titles were case sensitive it was fine. But I want to leave it on the system and he may not pay attention to the Case sensitive line in the input.
Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I imagine that you can use the regular expression matching feature and the case insensitivity flag of the regular expression engine to achieve the effect you want.

Thanks Valik;

I'll play with that and see what I can do.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I'm not going to play with the case sensitivity issue any longer since there is a severe shortage of time right now. I made several changes to the script and I will put the new code in Example scripts for those that want to play with it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...