Control-O and Alt-FO key stroke problems

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Randall
Junior Coder
Posts: 38
Joined: Fri Jan 13, 2012 4:39 am

Control-O and Alt-FO key stroke problems

Post by Randall » Tue Jun 11, 2013 1:59 am

I have been burning up some hours trying to get MJT macros to work with Internet Explorer.

If I bring up IE manually, I can hit CTRL-O keys and it will automatically bring up the open box.

However if I bring up IE and then run MJT to send the following

>Press CTRL
>SendText>O
>Release

IE acts like it never saw the sequence.

However if I send ALT - FO, to open up the menu, under the File selection then send O to open up the Open selection, sometimes that fails too, unless I put at least a 0.3 second delay between the F and the O characters. IE acts as if it is not ready for two characters right next to each other, but must prepare itself for the "O" character.

I really want to be able to select the Open box using CTRL-O, but I have been unable so far to accomplish this simple task.

Thanks if you have insight to this or can point out something which I have missed

olllllliii
Pro Scripter
Posts: 60
Joined: Tue Dec 22, 2009 9:51 am
Location: Mannheim ( Germany )
Contact:

Post by olllllliii » Tue Jun 11, 2013 2:51 am

Paste This..
i think it will work

Code: Select all

Press LCTRL
Send>o
Release LCTRL
or ALT-FO

Code: Select all

Let>delay=0.25

Press ALT
Send>f
Wait>delay
Send>o
Release ALT
Wait>delay
Press>Enter
Kind Regard O.Hilger
Oliver Hilger Mannheim
alias Olllllliii

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jun 11, 2013 3:09 am

Also Try A Set Focus.

You Need To Send A Small o (LowerCase) Not A O (Uppercase).

This Worked For Me.

Code: Select all

SetFocus>Internet Explorer*
Press LCTRL
Send>o
WaitWindowOpen>Open
Release LCTRL
If Your Wanting To Open A URL, You Could Try The Below.
iexplore http://www.google.com.au

If Ever In Doubt, Try Recording The Actions Using The Macro Recorder, Then Analyze The Script.
FIREFIGHTER

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Jun 11, 2013 3:36 am

Hi olllllliii,
You may abbreviate your script:
olllllliii wrote:Paste This..

Code: Select all

Let>SK_Delay=2
Press ALT
Send>f
Release ALT
Send>o
Press>Enter

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Jun 11, 2013 3:42 am

Hi CyberCitizen,
I prefer:

Code: Select all

Let>WW_TIMEOUT=10
SetFocus>Internet Explorer*
Press CTRL
Send>o
Release CTRL
WaitWindowOpen>Open
If>WW_Result=FALSE
  MDL>IE FAILURE-Report to CyberCitizen
Endif

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jun 11, 2013 4:32 am

LOL Very Funny Armstrong,

Yes I Maybe Should Have Included A Timeout On The Wait Window.

The Main Point Was To Ensure That The Character Being Send Was A Lowercase o.
FIREFIGHTER

Randall
Junior Coder
Posts: 38
Joined: Fri Jan 13, 2012 4:39 am

Post by Randall » Tue Jun 11, 2013 4:40 am

[quote="armsys"]Hi olllllliii,
You may abbreviate your script:
[quote="olllllliii"]Paste This..
[code]
Let>SK_Delay=2
Press ALT
Send>f
Release ALT
Send>o
Press>Enter[/code][/quote][/quote]

okay, the script with LCTRL and small letter "o" works. I found previously that I need SK_DELAY = 30 for the IE to have enough time to set up from the file menu box.

Also RCTRL works as I expected to find, once I knew that LCTRL works. It is still odd that CTRL does NOT work, and that a capital letter O does not work, although that's what IExplorer wants to see from the keyboard.

I like the control-o approach better than the alt-f-o approach since I am assured that I will get the correct open window if IE recognized the key sequence.

Thanks for the assist, this is appreciated

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Jun 11, 2013 5:30 am

Hi Randall,
Randall wrote: It is still odd that CTRL does NOT work, and that a capital letter O does not work, although that's what IExplorer wants to see from the keyboard.
Thanks for informing us your script works.
Press CTRL should work as expected.
Give it one more shot:

Code: Select all

CapsOff
Let>WW_TIMEOUT=10
Let>WF_TYPE=2
Let>SK_Delay=5
SetFocus>Internet Explorer*
WaitReady>1
Press CTRL
// Remember: CyberCitizen reminds us a small "o" here 
Send>o
Release CTRL
WaitWindowOpen>Internet Explorer*
If>WW_Result=FALSE
  MDL>IE FAILURE-Report to Randall immediately!
Endif

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jun 11, 2013 5:33 am

@armsys: Wait Ready>1 Didn't Work For Me, I Had To Use 0 Or Comment It Out.
FIREFIGHTER

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Jun 11, 2013 5:39 am

Hi Cy,
CyberCitizen wrote:@armsys: Wait Ready>1 Didn't Work For Me, I Had To Use 0 Or Comment It Out.
What do you mean by "Didn't Work For Me"?
Please narrate the symptom.
For graphics intensive webpages, I always use WaitReady>1 to ensure the webpage is ready receive keyboard/mouse actions.
BTW, why is there a space in your weird command "Wait Ready>"

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jun 11, 2013 5:53 am

The space was only cause I was typing it. Not linking code.

It didn't display the open dialog as it got stuck waiting for a paint event.
FIREFIGHTER

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Jun 11, 2013 5:59 am

CyberCitizen wrote:It didn't display the open dialog as it got stuck waiting for a paint event.
Thanks for your reply.
Yes, your test webpage likely contains mainly plain text, isn't it?
Yes, in this case, it takes excruciatingly long time.
Yes, in this case, you're better off using WaitReady>0.
Thanks pointing out a potential issue.

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Tue Jun 11, 2013 6:06 am

Correct it was a blank IE window, we had already set focus, we then needed to open the open address dialog (Ctrl+o). This is where the paint event was failing. All good, looks like Randall is all sorted now anyway.
FIREFIGHTER

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Jun 11, 2013 6:16 am

Capital O = Shift o.

So CTRL-O may be seen as CTRL-SHIFT-o which is not what you want.

Therefore always use lower case for shortcut key sends.

This is explained here:
http://www.mjtnet.com/blog/2006/01/17/h ... on-script/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Jun 11, 2013 6:23 am

CyberCitizen wrote:Correct it was a blank IE window, we had already set focus, we then needed to open the open address dialog (Ctrl+o). This is where the paint event was failing. All good, looks like Randall is all sorted now anyway.
Hi CyberCitizen,
Thanks for your testing result.
Why does WaitReady>1 take excruciatingly long time for a text-only screen? Why couldn't MS automatically detect the existence of graphics? I hope Marcus will help us resolve the puzzling myth.

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