rudi Posted February 21, 2008 Share Posted February 21, 2008 (edited) Hello, doesn't WinWaitClose() accept a windows handle set through $handle = WinGetHandle("Title","Text") ? When working with "title","text" this script works fine: While 1 While ProcessExists("newsreader3.exe") If WinActive("Post Message") Then ; es wird neu gepostet $Forum = ControlGetText("Post Message", "", "Edit2") If StringInStr($Forum, "novell.support.netware") Then ; Das ist ein Netware Forum $handle = WinGetHandle("PostMessage") ControlFocus($handle, "", "TExRichEdit1") Send("^a") Send("{del}") FillClip() Send("^v") ControlFocus($handle, "", "TExRichEdit2") ; set focus to 'subject' EndIf ConsoleWrite("Warte auf Fenster wech..." & @LF) WinWaitClose($handle, "") ConsoleWrite("Fenster wieder weg" & @LF) EndIf WEnd Sleep(10000) ;XN nicht gestartet, länger loopen... WEnd This way ($handle in stead of "title","text") the script doesn't recognize when the window is gone I want this script to fill in a calculated signature using XanaNews. Regards, Rudi. Edited February 21, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
weaponx Posted February 21, 2008 Share Posted February 21, 2008 I would wager a guess that since this line: $handle = WinGetHandle("PostMessage") Is in your If...Then...EndIf condition, the condition is not being met. You can test the by trying to display the handle: MsgBox(0,"",$handle) WinWaitClose($handle, "") You should just put WinGetHandle() before the If...Then...EndIf Link to comment Share on other sites More sharing options...
GEOSoft Posted February 21, 2008 Share Posted February 21, 2008 In addition to what Weapon_X posted: Make sure that Opt("WinTitleMatchMode") is properly set. Titles are case sensitive See the help file for Window Titles and Text (Advanced) under Using AutoIt. 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 More sharing options...
rudi Posted February 21, 2008 Author Share Posted February 21, 2008 I would wager a guess that since this line: $handle = WinGetHandle("PostMessage") Is in your If...Then...EndIf condition, the condition is not being met. You can test the by trying to display the handle: MsgBox(0,"",$handle) WinWaitClose($handle, "") You should just put WinGetHandle() before the If...Then...EndIf <Doh!> You are so right!! Anyways, I tried to change it the way you mentioned and this like, still doesn't work: While 1 While ProcessExists("newsreader3.exe") If WinActive("Post Message") Then ; es wird gepostet $Forum = ControlGetText("Post Message", "", "Edit2") If StringInStr($Forum, "novell.support.netware") Then ; Das ist ein Netware Forum $handle = WinGetHandle("PostMessage") ControlFocus($handle, "", "TExRichEdit1") Send("^a") Send("{del}") NW65EOL() Send("^v") Send("{home}") Send("{down 2}") ControlFocus($handle, "", "TExRichEdit2") ConsoleWrite("Warte auf Fenster wech..." & @LF) WinWaitClose($handle) ConsoleWrite("Fenster wieder weg" & @LF) EndIf EndIf WEnd WEnd What do I mess up this time? Thanks, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
GEOSoft Posted February 21, 2008 Share Posted February 21, 2008 <Doh!> You are so right!! Anyways, I tried to change it the way you mentioned and this like, still doesn't work: While 1 While ProcessExists("newsreader3.exe") If WinActive("Post Message") Then ; es wird gepostet $Forum = ControlGetText("Post Message", "", "Edit2") If StringInStr($Forum, "novell.support.netware") Then ; Das ist ein Netware Forum $handle = WinGetHandle("PostMessage") ControlFocus($handle, "", "TExRichEdit1") Send("^a") Send("{del}") NW65EOL() Send("^v") Send("{home}") Send("{down 2}") ControlFocus($handle, "", "TExRichEdit2") ConsoleWrite("Warte auf Fenster wech..." & @LF) WinWaitClose($handle) ConsoleWrite("Fenster wieder weg" & @LF) EndIf EndIf WEnd WEnd What do I mess up this time? Thanks, Rudi.$handle = WinGetHandle("PostMessage") 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 More sharing options...
rudi Posted February 21, 2008 Author Share Posted February 21, 2008 Hi. $handle = WinGetHandle("PostMessage") What's wrong with that line? $handle is working fine for all other lines I use it? Confused, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
GEOSoft Posted February 21, 2008 Share Posted February 21, 2008 (edited) Hi.What's wrong with that line? $handle is working fine for all other lines I use it? Confused, Rudi.You have "PostMessage" as one word Edited February 21, 2008 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 More sharing options...
rudi Posted February 21, 2008 Author Share Posted February 21, 2008 (edited) You have "PostMessage" as one word I need a new smiley to use here, pls: Hit my head against a wall.... Remains the question, why all the other uses of $handle DO work even with my typo? If these would have failed as well, I would have recognized my typo... Now it's working as expected: While 1 While ProcessExists("newsreader3.exe") If WinActive("Post Message") Then ; es wird gepostet $Forum = ControlGetText("Post Message", "", "Edit2") If StringInStr($Forum, "novell.support.netware") Then ; Das ist ein Netware Forum $handle = WinGetHandle("Post Message") ControlFocus($handle, "", "TExRichEdit1") Send("^a") Send("{del}") FillClip() Send("^v") Send("{home}") Send("{down 2}") ControlFocus($handle, "", "TExRichEdit2") ConsoleWrite("Warte auf Fenster wech..." & @LF) WinWaitClose($handle) ConsoleWrite("Fenster wieder weg" & @LF) EndIf EndIf WEnd WEnd Thanks, Rudi. Edited February 21, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
GEOSoft Posted February 21, 2008 Share Posted February 21, 2008 I need a new smiley to use here, pls: Hit my head against a wall.... Remains the question, why all the other uses of $handle DO work even with my typo? If these would have failed as well, I would have recognized my typo... Now it's working as expected: While 1 While ProcessExists("newsreader3.exe") If WinActive("Post Message") Then ; es wird gepostet $Forum = ControlGetText("Post Message", "", "Edit2") If StringInStr($Forum, "novell.support.netware") Then ; Das ist ein Netware Forum $handle = WinGetHandle("Post Message") ControlFocus($handle, "", "TExRichEdit1") Send("^a") Send("{del}") FillClip() Send("^v") Send("{home}") Send("{down 2}") ControlFocus($handle, "", "TExRichEdit2") ConsoleWrite("Warte auf Fenster wech..." & @LF) WinWaitClose($handle) ConsoleWrite("Fenster wieder weg" & @LF) EndIf EndIf WEnd WEnd Thanks, Rudi.Because as far as I could see you only made the mistake in one place and you did that when you made your last change. BTW Do you mean like this 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 More sharing options...
rudi Posted February 21, 2008 Author Share Posted February 21, 2008 (edited) BTW Do you mean like this Oh, yes, mad2 is exactly what I was looking for :D Is there a complete list of all smileys not available in the smiley dropdown selection list?Thanks, regards, Rudi.-- :mad1: :mad3: Edited February 21, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
GEOSoft Posted February 21, 2008 Share Posted February 21, 2008 Oh, yes, mad2 is exactly what I was looking for :D Is there a complete list of all smileys not available in the smiley dropdown selection list?Thanks, regards, Rudi.-- :mad1: :mad3:Smiley Dropdown. Top item (Show All) 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 More sharing options...
rudi Posted February 21, 2008 Author Share Posted February 21, 2008 (edited) Smiley Dropdown. Top item (Show All)Great collection! Thanks, Rudi. Edited February 21, 2008 by rudi Earth is flat, pigs can fly, and Nuclear Power is SAFE! 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