Jump to content
Sign in to follow this  
bacon1937

Newbie question: commas

Recommended Posts

bacon1937

Hi there,

I'm pretty new to Autoit, but I've been working on a number of practice projects and think I'm starting to get it more now. It really is quite versatile! 

I'm currently making something which basically rips the source code from a site, loads it to a variable and then does a stringbetween to find URLS. 

The problem i'm coming across is that i need a comma as part of the left part of the string.

Here's a short code snippet:

Local $left ='hi=0&ext=cpid=site', event);" href="'
Local $right ='" target="_blank" class="f_link_'
Local $sourcecode = _IEBodyReadHTML($oIE)

$source = _StringBetween($sourcecode, $left, $right)
_ArrayDisplay($source,"results")

I basically need to know what to put instead of the comma in this string, so that autoit will not assume its a parameter. I have tried searching the help documentation, but i can't seem to find the section that this information would be in. I also checked the forums, but mainly found info related to split strings and use of CSV files.

Another problem is that the:

;" href=" became a comment, when it should be part of the string.

If someone could help me out i'd be grateful, even if you could just direct me to the section of the help guide where this information is.

Share this post


Link to post
Share on other sites
bacon1937

Well I've just looked over it once and answered my own question....

because the string has a ' quotation mark in it, it marks the end of the string, by putting a '' (double singlequote) it is now fine.

Local $left ='hi=0&ext=cpid=site'', event);" href="'

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.