Jump to content
SugarBall

how to write links between quotes in different numbers?

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

Share this post


Link to post
Share on other sites

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

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?

Share this post


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

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

 

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

    • By nacerbaaziz
      good morning sirs.
      please i have a request from you.
      i have an variable to Read a data from a file
      this data is Encrypted
      and when i read it i Decrypte it.
      for that i need a function to Write a ini data to string.
      ;#Function# ===================================================================================================================== ; Name............: _IniReadFromString ; Description.....: Returns the value of a key in a specific section of an ini-formatted string ; Syntax..........: _IniReadFromString($szInput, $szSection, $szKey, $Default) ; Parameters......: ;   $szInput - The string that contains data in ini format ;   $szSection   - The sectionname (just as in IniRead) ;   $szKey   - The keyname (just as in IniRead) ;   $Default - The default value if the key does not exist or reading failed (just as in IniRead) ; Return values ..: ;   Success  - Returns the read value ;   Failure  - Returns $Default ; Author .........: FichteFoll ; Remarks ........: Works for Unicode as well as for ANSI ; Related ........: IniRead, _IniReadSectionFromString ; Link ...........; See on top ; Example ........; $var = _IniReadFromString(StringFormat("[Sect]\r\nMyKey1=value1\r\nMyKey2=value2"), "Sect", "MyKey2", "no_value") ; =============================================================================================================================== Func _IniReadFromString($szInput, $szSection, $szKey, $Default) $szInput = StringStripCR($szInput) ;~  Local $aRegMl = StringRegExp($szInput, "\[" & __StringEscapeRegExp($szSection) & "\]\n+(?:[^\[].*?=.*\n)*" & __StringEscapeRegExp($szKey) & "=(.*)\n?(",3) Local $aRegMl = StringRegExp($szInput, "\[" & __StringEscapeRegExp($szSection) & "\]\n+(?:[^\[].*?=.*\n)*" & __StringEscapeRegExp($szKey) & "=(.*)\n?", 3) If @error Then Return SetError(1, 0, $Default) ; key not found    Return $aRegMl[0] EndFunc;==>_IniReadFromString ; ############################################################################################################################### ; =============================================== ; = Internal Use Only ; =============================================== Func __StringEscapeRegExp($szExp) Return StringRegExpReplace($szExp, "([\(\)\[\]\{\}\\\/\?\.\\|\+])", "\\$1") ; ()[]{}\/?.|+ EndFunc;==>__StringEscapeRegExp like this  function Read the ini from string.
       
       
      please ihelp me
      thanks in advance
    • By Stew
      (Edited from original.  Please note that I AM NOT AN AUTOIT EXPERT.  I write code using Autoit frequently but I am no expert, especially when it comes to I/O.  So any remarks that start with "Why did you..." can be answered by referring to the first sentence.  This project was done in Autoit because of an interface I built to display the data.)
      Attached is a program and ascii input file I wrote to read stock price data, convert it to binary and then read it back into the program in binary.  The goal was to show increased performance for reading the files in binary and provide a demo on how to read/write binary for int32, int64, double and strings for anyone who might find it helpful.  The results on my PC show the following:
      Time to read ascii file only: 456.981951167202
      Ascii read & process time: 6061.83075631701
      Binary write file time: 14787.9184635239
      Time just to read binary file: 42.418867292311
      Binary read and process time: 4515.16129830537
      A couple things to note:
      1) The 32 MB ascii file took 10x longer to read than the 15 MB binary file.  Not entirely sure why.  Both were read into a buffer.
      2) The Binary write takes a long time but I made no effort to optimize this because the plan was to write this file one time only so I don't mind if it takes longer to write this file.  I care much more about how long it takes to read the file because I will be reading it many times.
      3) There was a modest gain in converting the ascii file to binary in terms of file size and reading speed.
      So big picture... not sure it's worth the effort to convert the files to binary even though most of the data is numerical data in the binary file.  That was actually surprising as I expected there would be more of a difference.  Any ideas on how to get the binary data to read at a faster rate would be great.
       
      binary.au3
      2019_02_08.zip
    • By smud
      Currently, I'm working on a program that will display Dialog boxes with either Yes or No.
      For each dialog, I reward the user with X amount of Credits.
      I'm hoping to output the amount of credits to a cell in a column (there will be 20 different columns).
      It will only post to a row that is equal to today's date (first column). If no row exists yet with the current date, it will start a new row.
      Any suggestions?
      Thank you
    • By argumentum
      AutoIt Machine Code Algorithm Collection
      By Ward, November 11, 2010 in AutoIt Example Scripts 
      Posted November 11, 2010 (edited) I have already published a lot of AutoIt UDF about algorithm, but all of them only support 32 bits or so called X86 system. Recently I got a computer with Windows 7 64 bits, so I finally added X64 support to most of my old projects. Besides, I also added some new. For example, some compression algorithm and SHA3 Candidates.
      Following are the algorithms list:
      Checksum   CRC16   CRC32   ADLER32 Compression   FastLZ   LZF   LZMA   LZMAT   MiniLZO   QuickLZ Encode   Base64   ARC4   XXTEA   DES   AES Hash   Checksums (CRC16/CRC32/ADLER32)   MD2   MD4   MD5   SHA1   SHA2 (SHA224/256/384/512)   SHA3 Candidates     BLAKE     BMW (Blue Midnight Wish)     CUBEHASH     ECHO     SHABAL     SKEIN Some points to mention:
      All of the subroutines have one or more examples to demonstrate the usage. Since the function and usage of subroutine are easy to understand. A complete subroutines and parameters list are unavailability now. Sorry for my lazy. All of the subroutines here invoked by Lazycat's method (through CallWindowProc API). My MemoryDLL UDF is not necessary this time. Although MemoryFuncCall (part of MemoryDLL) is still good, but inevitably, it is slower than CallWindowProc. Some subroutines have the same name with my old machine code version UDF. But for some reason, I rearrange the position of the parameters. Please not mix up. If you notice, yes, checksums are duplicated. But they receive different parameters. One is the old style, and another use the same interface as other hashes. Choose what you like, but don't use them in the same time. Some algorithm already supported by the standard UDF "Encryption.au3". But I still provide them, because some system lack of the full support of Windows Crypt Library. If you are looking for only one hash algorithm, for example, used in encryption, I suggested "SHABAL_TINY.au3". Although it is a bit slower then SHABAL, but it is smaller, and it supports different size of output (from 32 to 512 bits).
    • By goodmanjl531
      Hope someone can help as quotes within quotes is always confusing.  I am creating a silent install of printer software and want to call via runwait comspec line.
      The call within a cmd line is below
      samsung.exe /s /n"Samsung SL-M3220ND" /p"xxx"
      xxx will be stored as a variable  $PrinterIP which would be as example  10.10.10.20    I need to use a variable as i am doign this for a business and need it to be based on the store i install at that has a specific IP range.
       
      I started with the below as 2 possibilities but no luck..
      RunWait(@ComSpec & "/c " & "samsung.exe /s /n""Samsung SL-M3220ND"" /p""" & $PrinterIP ") RunWait(@ComSpec & "/c " & "samsung.exe /s /n'Samsung SL-M3220ND' /p'" & $PrinterIP '") but i cant get it to compile as i have errors on the line..  thanks in advance.
×
×
  • Create New...