Jump to content

how to write links between quotes in different numbers?


 Share

Recommended Posts

hello guys, i have this list of youtube links: 

         youtu.be/3bGqROF5ZWk
          youtu.be/mWRsgZuwf_8
          youtu.be/DK_0jXPuIr0
          youtu.be/NywWB67Z7zQ
          youtu.be/9fL5iWgWwno
          youtu.be/jofNR_WkoCE
          youtu.be/olFEpeMwgHk
          youtu.be/IgKWPcpwFDs

and i'd like to put them between these quotes below: 

          ElseIf $sVideoLink1 = " " then
             _IEAction ($oA, "click")
          ElseIf $sVideoLink2 = " " then
             _IEAction ($oA, "click")
          ElseIf $sVideoLink3 = " " then
             _IEAction ($oA, "click")
          ElseIf $sVideoLink4 = " " then
             _IEAction ($oA, "click")
          ElseIf $sVideoLink5 = " " then
             _IEAction ($oA, "click")
          ElseIf $sVideoLink6 = " " then
             _IEAction ($oA, "click")
          ElseIf $sVideoLink7 = " " then
             _IEAction ($oA, "click")

but the problem is i have a lot of video links i want to put in there and everytime i put one, the VideoLinkNr. must be +1 if you know what i mean...

can anyone help or give a clue

Link to comment
Share on other sites

Maybe a better explanation of the end game would help us steering you n the right direction.

do you want to eventually click all these links in succession (one after the other) via script?

Link to comment
Share on other sites

ElseIf $sVideoLink1 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)
          ElseIf $sVideoLink2 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)
          ElseIf $sVideoLink3 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)
          ElseIf $sVideoLink4 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)
          ElseIf $sVideoLink5 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)
          ElseIf $sVideoLink6 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)
          ElseIf $sVideoLink7 = " " then
             _IEAction ($oA, "click")
             Sleep(1000*60*4)

no, i'd like to click after 4 minutes and i have already figured out that part through "Sleep()" ,

But i cant find out to write those links between quotes and for every new link i'd like to change the $sVideoLink attribute by raising its nr +1 as i have highlighted at the top post..

Edited by SugarBall
Link to comment
Share on other sites

Here is the example for FileReadToArray from the Help File changed a bit...  see notes and play around with it and see if you can get it to do what you want:

#include <IE.au3>

$myFile = "C:\Users\yourname\Desktop\test.txt"   ;===============(path to your text file with links)

Example()

Func Example()
    ; Read the current script file into an array using the filepath.
    Local $aArray = FileReadToArray($myFile)   ;======================(changed to variable of your txt file path)

    If @error Then
        MsgBox(0, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file.
    Else
        For $i = 0 To UBound($aArray) - 1 ; Loop through the array.
;~             MsgBox(0, "", $aArray[$i]) ; Display the contents of the array.


_IECreate( $aArray[$i], 1, 1, 0)   ;====(executes the browwser open link function)
;  Put your sleep 4 minutes here

        Next
    EndIf
EndFunc   ;==>Example

 

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...