Jump to content
Macro Express Forums

Firefox, Pull-down menu keystroke equivalents


Recommended Posts

Hello All,

 

Hoping someone might know the answer to this. I've scoured some of the Firefox online documentation and haven't come across a solution yet.

 

I'm trying to get ME Pro to fill out an online form in a Firefox window. The form has pull-down menus. Easy enough to tab through and set selections in each pull-down, except, one of the pull-down menus has a related conditional pull-down menu (e.g. when you select "A" in the pull-down, a 2nd pull-down menu displays with further sub-choices) that doesn't seem to want to cooperate with keystrokes.

 

The way one would normally interact with the Web page would be to:

-click on the pull down menu

-mouse down to the desired selection

-click on desired selection and the 2nd pull-down menu appears

 

The way I'm trying to have ME Pro do this:

-<tab> to the pull down menu

-<alt><Arrow Down> to open up list of menu selections

-<Arrow Down> to the desired choice

-<Enter>

 

Nothing happens upon <Enter>. The selection in the first menu is maintained however the 2nd, contingent, menu does not appear.

 

I've also tried a left mouse click and middle mouse click in place of the <Enter> key with the same lack of results.

 

Any suggestions appreciated.

 

Thanks,

 

Marc

Link to comment
Share on other sites

I don't have an answer for you but I know in IE I've been using the automation API instead and in researching it I have learned that FF has some automation tools as well. A quick google returned several items like this.

 

 

Link to comment
Share on other sites

The way I'm trying to have ME Pro do this:

-<tab> to the pull down menu

-<alt><Arrow Down> to open up list of menu selections

-<Arrow Down> to the desired choice

-<Enter>

 

Nothing happens upon <Enter>. The selection in the first menu is maintained however the 2nd, contingent, menu does not appear.

 

 

You may need a time delay before <ENTER>.

 

Alternatively, instead of pressing <ENTER>, try substituting <TAB>. That will move focus to the next object, but it should leave your selection intact.

 

Also, instead of navigating through the list using down arrow key, can you use letters instead? For example, if you want to choose "Denmark" from the list, pressing D should get to the item, or close to it. Sometimes, it works to press the first several letters of the target: "Den..."

Link to comment
Share on other sites

Hello Cory and Alan,

 

Thank you both for taking the time to read and reply.

 

Cory, I wasn't aware of the iMacros for Firefox add-on. This looks like a very interesting tool.

 

I still haven't come up with a keystroke that will work on this form. I've contacted the administrator of the Web form site to see if there is a way that the code can be modified to accommodate better access through keystrokes. Failing that, in this case, I have the luxury of ending the macro at the pull-down menu that needs manual intervention.

 

Thanks again,

 

Marc

Link to comment
Share on other sites

With the IE automation API I was able to simply set the field to the value. Just needed to make sure it was perfect though. And when I run my script VB opens the page and before one can see what's happening all the fields are already set and enter is pressed and the window is gone. It all happens so quick I had to put delays in just for my peace of mind when testing because it seemed incredible that the whole thing could go so fast.

 

One thing I have not experimented with yet is bypassing the web browser altogether. One can use the HTTP POST method to send form data directly to the form handler using other methods like VBScript. I've seen some samples and it looks relatively simple. The setup and testing would take more time of course but after that one could invisibly push all kinds of data to the web server with no timing issues, user interference, and with a high degree of accuracy. If anyone is ever interested in experimenting with this please let me know. I just haven’t had time yet.

 

 

Link to comment
Share on other sites

Hello Terry and other curious folks,

 

I'm unable to provide the actual Web page as it is behind a PIN server. However I was able to copy and paste most of the source code and post it as a html download from a google site. The page has enough functionality to demonstrate the issue I'm having.

 

Warning this link leads directly to an attachment download: https://sites.google.com/site/meproform/form.html?attredirects=0 It is a single HTML page.

 

Specifically:

 

Under the "Type" pull-down, I want to have the macro select "E-book" so that the sub-menu "E-book collection:" appears underneath the "E-book" pull-down. This works fine when you use a mouse and click (e.g. click on the type pull-down, click e-book and the 2nd pull-down box appears). However, I can't seem to get the 2nd box to appear using only keystrokes. I've written the macro so that it tabs over to the "E-book" pull-down menu, I use <Alt><Arrow Down> to display the full list of menu selections, and then I <Arrow Down> to "e-book" and use the <Enter> function. The result is the menu choice "E-book" is maintained but the 2nd menu does not display. I've also tried using the Left Click and Middle Click function instead of <Enter> with the same results. I'm using Firefox.

 

Macro Express Pro 4.1.7.1 Snippet I've been playing with:

 

<COMMENT/>

<COMMENT Value="Start with cursor on \"status\" pull down."/>

<COMMENT/>

<DELAY Flags="\x02" Time="1000"/>

<COMMENT/>

<TEXT TYPE Action="0" Text="<TAB>"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<TEXT TYPE Action="0" Text="<ALTD><ARROW DOWN><ALTU>"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<DELAY Flags="\x02" Time="1000"/>

<TEXT TYPE Action="0" Text="<ARROW DOWN>"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<DELAY Flags="\x02" Time="1000"/>

<COMMENT/>

<TEXT TYPE Action="0" Text="<ENTER>" _COMMENT="alternately have tried \"left mouse click\" and \"center mouse click\""/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<DELAY Flags="\x02" Time="1000"/>

<COMMENT/>

<TEXT TYPE Action="0" Text="<TAB>"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<COMMENT/>

<TEXT TYPE Action="1" Text="%NetLibrary_ID%"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<COMMENT/>

<TEXT TYPE Action="0" Text="<TAB><TAB>"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<COMMENT/>

<TEXT TYPE Action="1" Text="http://www.netlibrary.com/ebook_info.asp?product_id=%NetLibrary_ID%"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<COMMENT/>

<TEXT TYPE Action="0" Text="<TAB>"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<COMMENT/>

<TEXT TYPE Action="1" Text="%NetLibrary_email%"/>

<WAIT FOR TEXT PLAYBACK Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/>

<COMMENT/>

 

 

I'd like to avoid using Control variables and screen coordinates if possible.

 

Also Cory's HTTP POST solution sounds very interesting, I'd love to be able to do something like that, but unfortunately I have no real coding skills.

 

Thanks for any advice,

 

Marc

Link to comment
Share on other sites

Marc,

 

Leaving aside for now the puzzle of why keystrokes (or combination keystrokes) cannot apparently access that second level menu, why are you reluctant to use simple mouse clicks? That approach seems to work reliably for me on your example form.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...