Sign in to follow this  
Followers 0
MarkLee

How to convert Javascript to _FFCmd

8 posts in this topic

  • This is code for address bar on web browser.

    javascript:{var evnt = window.document.createEvent('KeyboardEvent');evnt.initKeyEvent('keypress', true, true, window, false, false, false, false, 13, 13);window.document.getElementById('masthead-search-term').dispatchEvent(evnt);void(0)}

    How convert to _FFcmd ?

     

    thanks very much!

Share this post


Link to post
Share on other sites



What are you trying to do?

Share this post


Link to post
Share on other sites

press Enter Key

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Send("{ENTER}")

ask silly questions get silly answers

Edited by mpower

Share this post


Link to post
Share on other sites

I trying 

_FFCmd("evnt = window.document.createEvent('KeyboardEvent');evnt.initKeyEvent('keypress', true, true, window, false, false, false, false, 13,13);window.document.getElementById('masthead-search-term').dispatchEvent(evnt);")

Share this post


Link to post
Share on other sites

No no. I want press Enter key from FF.au3 UDF.

Thanks for reply.

Share this post


Link to post
Share on other sites

are you able to provide the full html code of the target page?

Share this post


Link to post
Share on other sites

Have you tried this?

$input = _FFXPath('//*[@id="masthead-search-term"]')
_FFDispatchEvent($input, 'keypress', 13)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0