Title=Security Warning
Class=SunAwtDialog
Process Name=jp2launcher.exe
Handle=0x170a70
Reply to java security popup
-
- Posts: 11
- Joined: 19 Feb 2022, 22:29
- JoeWinograd
- Posts: 2214
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Reply to java security popup
OK, that's what I was expecting...specifically, the Title is Security Warning...and that's what my code checks for, so it should work. Now run the script in my previous post (the one with the three MsgBox debugging commands) and let me know what dialogs you get. For example, when I run it here, I get these:
It then sends two Tab keys and the Enter key...works perfectly. Regards, Joe
It then sends two Tab keys and the Enter key...works perfectly. Regards, Joe
-
- Posts: 11
- Joined: 19 Feb 2022, 22:29
- JoeWinograd
- Posts: 2214
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Reply to java security popup
Was the Security Warning dialog on the screen during that time? If so, I can't explain what's happening. You're getting inside the loop that checks for the title (the debug2 MsgBox) and the title check [If (WinExist(Title))] should certainly be true if the Security Warning dialog is on the screen, which would result in the debug3 MsgBox and sending the keys. All I can think of is that you changed the script and are not running what I posted. With that in mind, please post the actual script that you're running. Regards, Joe
Re: Reply to java security popup
Joe and OP, maybe play with adding the below as an alternative... Curious, since you appear to have the exe that launches the window.JoeWinograd wrote: ↑21 Feb 2022, 23:11Was the Security Warning dialog on the screen during that time? If so, I can't explain what's happening. You're getting inside the loop that checks for the title (the debug2 MsgBox) and the title check [If (WinExist(Title))] should certainly be true if the Security Warning dialog is on the screen, which would result in the debug3 MsgBox and sending the keys. All I can think of is that you changed the script and are not running what I posted. With that in mind, please post the actual script that you're running. Regards, Joe
Code: Select all
if WinExist("ahk_exe jp2launcher.exe")
{
WinActivate, ahk_exe jp2launcher.exe
}
Code: Select all
Loop ; run forever - exit via system tray icon
{
If WinExist("ahk_exe jp2launcher.exe") ; check if window exists
{
WinActivate, ahk_exe jp2launcher.exe
Send,{Tab}{Tab}{Enter} ; need two tabs to get to Continue button
}
Sleep,%TimeCheckInterval% ; wait until next check
}
Code: Select all
Loop ; run forever - exit via system tray icon
{
If WinExist("ahk_exe jp2launcher.exe") AND WinExist(Title); check if window exists
{
WinActivate, %Title%
Send,{Tab}{Tab}{Enter} ; need two tabs to get to Continue button
}
Sleep,%TimeCheckInterval% ; wait until next check
}
- JoeWinograd
- Posts: 2214
- Joined: 10 Feb 2014, 20:00
- Location: U.S. Central Time Zone
Re: Reply to java security popup
Hi SOTE,
Yes, I thought about that, which is one reason why I had him run the script that shows the process name (which is typically a more reliable check than the title text), and it goes along with my thought that maybe he changed the title in the assignment statement, perhaps making it lower case (which would fail, since it is case sensitive). I also thought about setting title match mode to 1 (starts with...maybe there are spaces at the end) or 2 (contains) instead of 3 (matches exactly), but at the end of the day, I'd really like to understand why it isn't working as is...it should...and it does here (with a test dialog that has a title of Security Warning). All of that said, your idea is worthy of a test. Regards, Joe
Yes, I thought about that, which is one reason why I had him run the script that shows the process name (which is typically a more reliable check than the title text), and it goes along with my thought that maybe he changed the title in the assignment statement, perhaps making it lower case (which would fail, since it is case sensitive). I also thought about setting title match mode to 1 (starts with...maybe there are spaces at the end) or 2 (contains) instead of 3 (matches exactly), but at the end of the day, I'd really like to understand why it isn't working as is...it should...and it does here (with a test dialog that has a title of Security Warning). All of that said, your idea is worthy of a test. Regards, Joe
Who is online
Users browsing this forum: apeironn, Bing [Bot], madensuyu1, peter_ahk and 333 guests