SugarBall

how to write links between quotes in different numbers?

9 posts in this topic

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

Share this post


Link to post
Share on other sites



what script?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ever heard of arrays and For/Next loops ?  :)

Edited by mikell

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

yes i've searched every section but i cant find nothing similiar to my problem.. maybe you have any example i can use?

i dont know how to make a connection of these two..

Edited by SugarBall

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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

 

1 person likes this

Share this post


Link to post
Share on other sites

Sure my friend, thank you :)

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

  • Similar Content

    • TheAutomator
      By TheAutomator
      Can anyone tell me why this isn't working?..
      #include <array.au3> $regexp = StringRegExp("test 'a b c'", "'([^']|'')*'|\S+", 3) _ArrayDisplay($regexp) trying to split this "test 'a b c'  'some other '' test'' ...'" into:
      0: test
      1: 'a b c'
      2: ...
      but it gives me:
      0: test
      1: c
    • slidy56fr
      By slidy56fr
      Internet Explorer 11, AutoIt 3.3.14.2
      I want to download many files which are published with hyperlink on a web page. I use AutoIt and when there is a few files, it works even if It's on a website with secured links.
      I have a script to download link items with the object method (I gave a partial sample), but when the number of link exceed the web page, there is not an auto scroll, then the links which are not on displayed without scroll are not downloaded.
      Thank you
      From France
       
       
      EchantillonRecepAnonym.au3
    • zetaimmersion
      By zetaimmersion
      I have 2 items (a field box and a bypass checkbox). every time the box is checked i need the field to become writable. unchecked is read only displaying some text.
      this is as far as i got as I am stuck at making it read/write toggle
      #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500) Global $hCombo = GUICtrlCreateInput("", 10, 10, 200, 20, BitOR($ES_AUTOHSCROLL,$ES_READONLY)) GUICtrlSetBkColor($hCombo,0xe7e5e5) Global $cbox = GUICtrlCreateCheckbox ("", 40,50,10,20) GUICtrlSetState($cbox, $GUI_Unchecked) GUISetState() Global $sCurrCombo = "" While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cbox If GUICtrlRead($cbox) <> $sCurrCombo Then $sCurrCombo = GUICtrlRead($cbox) GUICtrlSetStyle ($hCombo, $SS_LEFTNOWORDWRAP) GUICtrlSetBkColor($hCombo,0xFFFFFF) MsgBox(0, "Choice", "PLease enter the text") EndIf EndSwitch WEnd  
    • StMaSi
      By StMaSi
      I'm attempting to code a Run or RunWait command that is a little on the long side and contains multiple sets of embedded quotes (as it would be issued from a CMD prompt), but can't for the life of me figure out the containing quotes as pertains to AutoIt. Here's the one-line command as it would be issued via a CMD prompt...
      "\\AppServ\G$\Connectivity\Clients\Citrix\Receiver\14.5.0.10018\CitrixReceiver.exe" ADDLOCAL="ReceiverInside,ICA_Client,WebHelper,SSON,AM,SELFSERVICE,USB,DesktopViewer,Flash,Vd3d" ALLOWADDSTORE=A ALLOWSAVEPWD=A ENABLEPRELAUNCH=Y ENABLE_SSON=Yes STORE0="AppStore;https://receiver.domain.net/Citrix/Apps/discovery;on;AppStore" /EnableCEIP=false /includeSSON /noreboot /silent I've tried so many different combinations of surrounding quotes with Run and RunWait, I just don't understand why it's this difficult to get past this.
      Can anyone assist with this?
      Thank you.
    • FrancescoDiMuro
      By FrancescoDiMuro
      Hi guys! How are you? Hope you're fine
      I'm trying to insert a text that contains quotes in a SQLite database, and I don't know how to do.
      I tried with:
      Local $sString = "1P6AV2104'0HA04'0AA0" StringReplace($sString, "'", "''") but I didn't managed to, obtaining this error:
      --> Error:    unrecognized token: "0HA04" How can I manage to solve this problem? Thanks