engagewithrage Posted November 10, 2022 Share Posted November 10, 2022 (edited) Quote $CitrixWindowExists = "?" While 1 If WinExists($CitrixWindowExists) Then $CitrixExists = 1 Else MsgBox(0, "Ruh Roh", "Citrix Window Closed.", 30) Shutdown(0) ;logoff here Exit Sleep(200) WEnd This is something simple, but me being a newbie to AutoIT, I'd REALLY appreciate some help.. I really just need to monitor for a Citrix Window that closes, I know I can target that window title when it's active, but in my testing I am having trouble making it consistent and I am sure it's something I am doing wrong, in addition to this being a learning process for me. Any clarification or wisdom is appreciated. I just need to actively and continuously monitor when the window closes and then perform the logoff..as long s the window is active, nothing needs to be done. Edited November 10, 2022 by engagewithrage Link to comment Share on other sites More sharing options...
rudi Posted November 10, 2022 Share Posted November 10, 2022 Hello $CitrixTitle="TextOfCitrixWindowTitle" while WinExists($CitrixTitle) Sleep 200 WEnd MsgBox(64,"Citrix Window closed","Going to logoff",30) Shutdown(0) SkysLastChance and engagewithrage 2 Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
engagewithrage Posted November 10, 2022 Author Share Posted November 10, 2022 8 hours ago, rudi said: Hello $CitrixTitle="TextOfCitrixWindowTitle" while WinExists($CitrixTitle) Sleep 200 WEnd MsgBox(64,"Citrix Window closed","Going to logoff",30) Shutdown(0) Well s#@$... Link to comment Share on other sites More sharing options...
engagewithrage Posted November 11, 2022 Author Share Posted November 11, 2022 14 hours ago, rudi said: Hello $CitrixTitle="TextOfCitrixWindowTitle" while WinExists($CitrixTitle) Sleep 200 WEnd MsgBox(64,"Citrix Window closed","Going to logoff",30) Shutdown(0) If I may ask, MsgBox(64"blahblah"m30) what does the 64 mean? Link to comment Share on other sites More sharing options...
OJBakker Posted November 11, 2022 Share Posted November 11, 2022 64 is the value of the flag-parameter of the MsgBox function. Meaning and possible values are very well explained in the manual. engagewithrage 1 Link to comment Share on other sites More sharing options...
rudi Posted November 12, 2022 Share Posted November 12, 2022 (edited) 64 is the info symbol, one of a few values I know by heart. 30 is the timout value for the MsgBox() As @OJBakker mentioned already, pls have a look at the documentation for MsgBox() A very nice tool is the Message Box Code Wizzard, available by pressing [alt]+[w] from SciTE editor. There you can set a lot of things to design your message boxes. Many things are done through this numeric, fist value to be passed to the MsgBox() function. The wizzard will calculate the value as needed to match your selections. And finally a suggestion: MsgBox(64"blahblah"m30) is messed up, broken sample code. Pls. try to be precisely! Edited November 12, 2022 by rudi engagewithrage 1 Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
engagewithrage Posted November 18, 2022 Author Share Posted November 18, 2022 (edited) On 11/10/2022 at 5:14 AM, rudi said: Hello $CitrixTitle="TextOfCitrixWindowTitle" while WinExists($CitrixTitle) Sleep 200 WEnd MsgBox(64,"Citrix Window closed","Going to logoff",30) Shutdown(0) This is not consistent enough, sometimes it detects when the window closes, often times not.. I've been reading the below, so we'll see if I can find a way to always target the window and perform the logoff when it closes..we'll see how it goes lol https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Edited November 18, 2022 by engagewithrage Link to comment Share on other sites More sharing options...
engagewithrage Posted November 18, 2022 Author Share Posted November 18, 2022 (edited) $CitrixWindowTitle = "Something - More Something Stuffs" While WinExists("[TITLE:$CitrixWindowTitle; CLASS:Transparent Windows Client; INSTANCE:1]", "") Sleep(500) WEnd Are there escape characters I need to use a variable in the advanced window titles thingy? Or do I need to use plain text? Edited November 18, 2022 by engagewithrage Link to comment Share on other sites More sharing options...
engagewithrage Posted November 18, 2022 Author Share Posted November 18, 2022 (edited) 28 minutes ago, engagewithrage said: $CitrixWindowTitle = "Something - More Something Stuffs" While WinExists("[TITLE:$CitrixWindowTitle; CLASS:Transparent Windows Client; INSTANCE:1]", "") Sleep(500) WEnd Are there escape characters I need to use a variable in the advanced window titles thingy? Or do I need to use plain text? $CitrixWindowTitle = "Something - Something Else" While WinExists("[TITLE:" & $CitrixWindowTitle & "; CLASS:Transparent Windows Client; INSTANCE:1]", "") Sleep(500) WEnd ? Edited November 18, 2022 by engagewithrage Link to comment Share on other sites More sharing options...
CzarnyKhaki Posted September 5 Share Posted September 5 (edited) Replying to this topic instead making new one, I'd like to ask you: How to wait untill the window with permanent removing files disappears (and than continue the loop)? I don't know if it's related with DirectUIHWND or more with msctls_progress32 or anything. Can you give me the exact code fragment to paste? Edited September 5 by CzarnyKhaki Link to comment Share on other sites More sharing options...
rudi Posted September 17 Share Posted September 17 this is a 2 years old topic. Pls. start a new one describing your full problem, and provide some code. 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