Jump to content

Code fills address bar with URL but will not return webpage


Recommended Posts

I apologize for my poor coding skills, but only on occasion do I have a need to automate a repetitious task to save time.  In a nutshell the following code is supposed to go to a website, save the site using Scrapbook (a plugin used by an older version of Firefox), rename the folder in Windows Explorer that Scrapbook assigns a random name for and then moves on to the next website, of which there are hundreds.  Everything works, except after the address bar gets populated with the URL, it's like the ENTER key never gets pushed.  The weird thing is, this worked yesterday before I left to go home and when I came in this morning it didn't work.  The next thing I'll be trying to learn is to loop this with a the list of the websites.  Thank you for your help!

WinActivate( "[CLASS:MozillaWindowClass]" ) ;Apply focus to the open Mozilla firefox window
Sleep(500)
Send("^k") ;Apply focus to the address bar
Sleep(500)
Send("www.WEBSITE.com {ENTER}") ;Send the website to the address bar
Sleep(10000) ;Wait for the website to fully open
Send("!c") ;Opens the drop down menu for Scrapbook
Sleep(2000)
Send("{ENTER}") ;Selects the default drop down selection of save
Sleep(20000)
WinActivate( "[CLASS:CabinetWClass]" ) ;Applies focus to the open Windows Explorer window where the websites are saved
Sleep(1000)
Send("{SPACE}") ; Selects a folder in the folders list
Sleep(200)
Send("{HOME}") ;Moves to the top folder
Sleep(200)
Send("{F2}") ;Keyboard shortcut to rename the folder
Sleep(200)
Send("www.WEBSITE.com {ENTER}") ;Applies the new name to the folder

 

Link to comment
Share on other sites

xcaliber13,

Thanks for the reply, I tried your suggestion and unfortunately it did not work, it's as if the code inserts the URL for the webpage and then the address bar looses focus, so the enter command has no effect.

Rocker

Link to comment
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
 Share

×
×
  • Create New...