Jump to content
Sign in to follow this  
SugarBall

Write string between strings?

Recommended Posts

SugarBall

hey guys, anyone knows how to write a string between two other strings like for example:

To write AbzhdfX_d between ElseIf $sVideoLink1 = "   and   " then  _IEAction ($oA, "click")

Simpler: to write a between b and ,but automatically

Share this post


Link to post
Share on other sites
RaiNote

Tried _StringBetween/_StringInsert maybe they should do this.

  • Like 1

  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Share this post


Link to post
Share on other sites
SugarBall

thanks man :)

Share this post


Link to post
Share on other sites
SugarBall

Amazing way, jguinch, thank you ;) :D 

Taking advantage of you reading this i'd like to ask about a loop problem i have:

i want to write several line codes that include $sVideoLink1 and everytime i want to add one i want to make its last number raise 1.. Like this:

$sVideoLink1

$sVideoLink2

$sVideoLink3

$sVideoLink4

sorry for going out of contest but i thought you might know the solution

 

 

Share this post


Link to post
Share on other sites
jguinch

What you need is an array with a loop. I know you're learning the coding with AutoIt, but loops and arrays are part of the learning.

Look at the help file in Language Reference / Loop Statements

Example :

Local $sVideoLink = ["link1", "link2", "link3", "link4", "link5"]

For $i = 0 To UBound($sVideoLink) - 1
    MsgBox(0, "", $sVideoLink[$i] )
Next

 

  • Like 1

Share this post


Link to post
Share on other sites
SugarBall

Again thanks my friend, you have a been a great help for me so far...

i'll get to know with loops and arrays because i have to combine the two part of codes that you wrote....

thanks for letting me count on you

Edited by SugarBall

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
Sign in to follow this  

  • Similar Content

    • Miliardsto
      By Miliardsto
      I got that func
      Func makeHelpImgGUI($title,$width,$height,$img) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, "HERE") EndFunc and I call this func like that
      makeHelpImgGUI("Image",1190, 800,$SETTINGS_JPG)  
      so what is the problem in the parameter where is - "HERE" I need value of img but passed as string
      so $img = $SETTINGS_JPG and how make it "SETTINGS_JPG"
       
      I tried something like that but not work
      Func makeHelpImgGUI($title,$width,$height,$img) $name_str = String($img) $name_str = StringTrimLeft ($name_str, 1 ) $img = GUICtrlCreatePic("",20,40,$width,$height) _ResourceSetImageToCtrl($img, $name_str) EndFunc  
    • smud
      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
    • liagason
      By liagason
      Hello everyone,
      How can I display in ascending  sequence some numbers stored in a string variable?
      $str = "18,03,48,23" MsgBox(0,"test",$str) I would like it to display "03,18,23,48"
    • Rskm
      By Rskm
      Hi, I have the following line in a text file 'input.txt'. I know the line number - say '6'. I wish to replace the text 'WWW' in the below line with a random number (I can generate that with random()).
      WERIS  WWWJP   3.83  8.330  1.000                1097.RAXX 
      The WWW is a 3 digit integer (could be any number between 0 to 999), I can use stringtrimleft and get the numerical value of WWW in this file
      so, basically, I know the string to replace (ie; WWW stored in a variable), I know the line number to work on and the file location/name and the replacement variable (through random()). My requirement is to fill that 3 spaces with my random number (which Is a integer between 1 and 999)
      please put ur suggestions
       
    • nacerbaaziz
      By nacerbaaziz
      Hello Members of this best Forum
      i have a question please
      for example if i have a long string
      and i want to extract a text between two tag
      what i can do to make that?
      note :
      i know that there is a
      StringRegExp function
      it's do that work
      but it result is be as an array
      i want the result to be a string
      is there any function on autoit can do that?
      Thanks in advance.
×