Sign in to follow this  
Followers 0
Marius

variables...

13 posts in this topic

: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! :)

Share this post


Link to post
Share on other sites



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


Marius back in da hood! :)

Share this post


Link to post
Share on other sites

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...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

it's already been moved :)


Marius back in da hood! :)

Share this post


Link to post
Share on other sites

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

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


Marius back in da hood! :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

Thank You.


Marius back in da hood! :)

Share this post


Link to post
Share on other sites

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

Thank You.

<{POST_SNAPBACK}>

this works as well:

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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! :)

Share this post


Link to post
Share on other sites

like this...

For $i=1 to 5

If GUICtrlRead($additiona[$i]) <> ""

$super = $super + 1

EndIf

Next

you may need to add " dim $additiona[6] " to the beginning of the script

enjoy

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Tried but no effect. It shows me that $super is 0

Edited by Marius

Marius back in da hood! :)

Share this post


Link to post
Share on other sites

For $i=1 to 5
  If GUICtrlRead(Eval('additional' & $i)) <> ""
    $super = $super + 1
  EndIf
Next

Share this post


Link to post
Share on other sites

Whow!!! This one works. Thanks :) Topic can be closed :evil:


Marius back in da hood! :)

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  
Followers 0