Jump to content

variables...


Recommended Posts

:evil:

Hello all!

I have one interesting question... Let's say I have variable $var.

And now I need that AutoIt check if there's any " in variable and if there's then before them add /". So result should be /""

Is it possible to do it? :)

Marius back in da hood! :)
Link to comment
Share on other sites

  • Developers

sorry... wrong forum. Maybe any mod could put this in right forum?

<{POST_SNAPBACK}>

why ? this is the support forum so is the right place.

To answer your question: check the helpfile for the StringReplace() command...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

what I need to write for stringreplace to search for "   ?

Because stringreplace won't recognize " as text.  :)

<{POST_SNAPBACK}>

Something like ?:

StringReplace($var,'"','/""')
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

YES! It works! I didn't even knew, that I can use ' instead of "

Thank You.

<{POST_SNAPBACK}>

this works as well:

StringReplace($var,"""","/""""")

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

ok. now a bigger one:

;---------

$super = 0

For i=1 to 5

If GUICtrlRead($additional1) <> ""

$super = $super + 1

EndIf

Next

;---------

I want that "for" used $additional1, then $additional2, $additional3 and so on.

I can't use:

If GUICtrlRead($additional & $i)

What should I do?

Marius back in da hood! :)
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...