Jump to content
Tom75

Sysadmin who are trying to make a script

Recommended Posts

Hello everyone 🙂

I made a script that works (the code is not pretty). ^^  . The file who is attach contain my script for the download of 2 videos..

I would like to make some improvements :
- There are 60 videos per page. To select the first video, I use the "TAB" key 7 times. To select the next video I have to increment this value by 2.
How can I create a variable, which I will increment by 2 for each video?
- I record the video with the title underneath. Some titles contain characters such as ? " . Windows is not able to record with one of its values.
How can I close the Windows warning, and enter a name ? I guess I have to use the "IF" condition ?

;
; 1st Video
;
Sleep("2000")
; Click on the Webpage
MouseClick('Left' , 381 ,105 )
Sleep("4000")
; Select the 1st video with "TAB"
Send("{TAB 7}")
Sleep("4000")
; "Click on the video
Send("{Enter}")
MouseWheel('Down', 2)
Sleep("4000")
; Click on the Title of the video
MouseClickDrag('Left', 98, 743, 600, 743 )
Sleep(4000)
; Copy the title of the video
send("^c")
; Click on the Button "Download"
MouseClick('Right' , 492 ,375 )
Sleep("6000")
; Click on "Save As"
Send("{DOWN 4}")
Sleep("3000")
Send("{Enter}")
Sleep("3000")
; Paste the text on the Dialog Box
Send("{UP}")
Sleep("2000")
send("^v")
Sleep("3000")
Send("{Enter}")
Sleep("3000")
; Click on "Save"
Send("{DOWN}")
Sleep("3000")
Send("{Enter}")
Sleep("3000")
; Return on the Previous Page
Send("!{LEFT}", 0)
Sleep("3000")
MouseWheel('Up', 2)
; Waiting Time for Download
Sleep("210000")
;
; 2nd video
;
;
Sleep("2000")
; Click on the Webpage
MouseClick('Left' , 381 ,105 )
Sleep("4000")
; Select the 2nd video with "TAB". <---- 2 more TAB for the 2nd video
Send("{TAB 9}")
Sleep("4000")
; "Click on the video
Send("{Enter}")
MouseWheel('Down', 2)
Sleep("4000")
; Click on the Title of the video
MouseClickDrag('Left', 98, 743, 600, 743 )
Sleep(4000)
; Copy the title of the video
send("^c")
; Click on the Button "Download"
MouseClick('Right' , 492 ,375 )
Sleep("6000")
; Click on "Save As"
Send("{DOWN 4}")
Sleep("3000")
Send("{Enter}")
Sleep("3000")
; Paste the text on the Dialog Box
Send("{UP}")
Sleep("2000")
send("^v")
Sleep("3000")
Send("{Enter}")
Sleep("3000")
; Click on "Save"
Send("{DOWN}")
Sleep("3000")
Send("{Enter}")
Sleep("3000")
; Return on the Previous Page
Send("!{LEFT}", 0)
Sleep("3000")
MouseWheel('Up', 2)
; Waiting Time for Download
Sleep("210000")

Web video Download.txt

Edited by Jos
insert script

Share this post


Link to post
Share on other sites
7 hours ago, Tom75 said:

; Click on the Webpage

It seems you are trying to automate some Web application.  You should HIGHLY consider using WebDriver UDF (or at least IE UDF if possible).  Usage of sends and clicks are the worst way to script Web apps.  I doubt that someone will be able to help you as this script is not runable to any of us.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...