Cannot click ENTER on pop-up box

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
catbox
Junior Coder
Posts: 26
Joined: Mon Dec 03, 2012 6:43 pm

Cannot click ENTER on pop-up box

Post by catbox » Mon Sep 30, 2013 3:01 pm

Hi! I sure hope someone can help...I am sure this is an easy fix? I created a great macro last year to mass create records...now, I am trying to mass close these records w/ a macro.


I have one last step in my script to finish it off and cannot, for the life of me, get it to work. Ok, I have spent about 3 days trying to figure out this one step. I have searched through the help and seen other issues about the same....

My script mimics and end user entering data. There are several pop-up boxes and I can successfully use the PRESS ENTER code w/ great success. There is one last pop-up where the script has to "Press ENTER", but it doesn't work....my Press ENTER code isn't working for this pop-up.

I then tried to SetFocus... when I use the Code Builders, SetFocus....in the Window Title, I do see what looks like the name of the pop-up window, so I select it, using the SetFocus and it doesn't work.

I also tried the 'Keyboard Commands' send Keys to try to send the 'enter' key...also to no avail. When I use the Recorder to send keys, it is just entering a null.

Every time, I have to close out and the error pops that says 'Specified Window 'Question -- Webpage Dialog' is not present.

It just seems like my macro isn't getting into the pop-up. I can manually click enter or space bar and it works like a charm. I have tried so many different combos, and none work. Obviously, I just don't know what to do to get this right :(

Code: Select all

        SetFocus>Question -- Webpage Dialog
        Press ENTER
Thanks so much for your input!!
Anke

hagchr
Automation Wizard
Posts: 327
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Post by hagchr » Mon Sep 30, 2013 3:29 pm

Sometimes I have had problems with hidden windows confusing my script. Then I try to look for visible windows only by adding

Let>WF_TYPE=2

before the SetFocus. Not sure if the issue here, but maybe worth trying, also adding a wait before the ENTER.


Let>WF_TYPE=2
SetFocus>Question -- Webpage Dialog*
Wait>0.2
Press ENTER

User avatar
JRL
Automation Wizard
Posts: 3500
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Sep 30, 2013 3:29 pm

While your "Question -- Webpage Dialog" window is open, try using the last script I posted in this thread. Run the script, hold the CTRL key while you use the mouse to click on the "Question -- Webpage Dialog" window. What does the script tell you the name of the window is?

Copy and paste the name. Are there spaces at the end? While the window is open can you write a short script to move the window to a new location, 0,0 for example, using the name "Question -- Webpage Dialog"?

MoveWindow>Question -- Webpage Dialog,0,0

catbox
Junior Coder
Posts: 26
Joined: Mon Dec 03, 2012 6:43 pm

Name is correct, still nothing

Post by catbox » Mon Sep 30, 2013 3:57 pm

HagChr, your suggestion didn't work :(

JRL- This is what I got when I clicked CTRL:

Code: Select all

1-0	555	368	508	202	1378364		Internet Explorer_TridentDlgFrame		Question -- Webpage Dialog
1-1	8	30	492	164	2625196		Internet Explorer_Server
It looks like the name is the 'Question -- Webpage Dialog'.

When I tried to move the box, it didn't do anything, but...I noticed for a fraction of a second, right when I 'x'd' out of the box to cancel that the box then moved (just a flash). It is like, when I click Save from the program (with webrecorder), it is creating a hard stop...but I cannot get into the box to say 'Yes' or get any key strokes to work :cry:
Thanks, Anke

User avatar
JRL
Automation Wizard
Posts: 3500
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Sep 30, 2013 4:39 pm

You have mentioned keystroke attempts. Have you tried moving the mouse to the button location and LClick>ing

MouseMove>Xloc,Yloc
Wait>0.5
LClick

catbox
Junior Coder
Posts: 26
Joined: Mon Dec 03, 2012 6:43 pm

Finally -- success!

Post by catbox » Mon Sep 30, 2013 5:46 pm

The mouse move didn't work/ or x/y click...those were previous attempts.

However, I was able to get it to work! I was able to use good 'ol windows shortcut keys to get it to work.

I still wonder why it refuses to work any other logical way...but will settle with this.

I used the Keyboard Commands/Keyboard Wizard to record the (click on screen) then, CTRL+ALT+S and CTRL+ALT+Y for save and the Y for yes on the pop up.

Code: Select all

SetFocus>
    CapsOff
    Press LCTRL
    Press LALT
    Wait>0.34
    Send>s
    Wait>0.36
    Release ALT
    Wait>6.08
    Press LALT
    Wait>0.3
    Send>y
    Wait>0.27
    Release ALT
Coolness! Thanks for everyone's help on this!
Anke

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts