Jump to content
Sign in to follow this  
LeHuynhNam

problem with string

Recommended Posts

LeHuynhNam

i want this sentence can be available in my script

"This is an example!"

but i can't use ", i don't know how to resolve it? Help me!


4m848p10.gif 

Share this post


Link to post
Share on other sites
Valuater

After everything I have seen you do, this should be easy.... lol

Maybe...

Global $Message = "This is an example!"

Do_Function()

Func Do_Function()

    MsgBox(4096, "Message", $Message & "   ", 5)

EndFunc   ;==>Do_Function

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
jebus495

i want this sentence can be available in my script

"This is an example!"

but i can't use ", i don't know how to resolve it? Help me!

You need to "double up" the amount of "'s you are using.

Here is an example.

MsgBox (0, "This is a MsgBox" , """This is an example!""")

This will display your desired "This is an example!".

If you only wanted it to look like this ' This "is an" example '

Then it would look like this.

MsgBox (0, "This is a MsgBox" , "This ""is an"" example!")

:)

Share this post


Link to post
Share on other sites
KaFu
LeHuynhNam

oh, thank for helping!

if i wanna use this sentence for my gui, like a label?

honesty, i wanna add line in a file. Such as

$LineAdd &= "$Skin_Folder =""&$var&"""& @CRLF & @CRLF

i just want to write this line to file:

$Skin_Folder = "D:\designs\program\autoit\Xskin\Skins"

and i don't know how to do it! i've try some way but don't have result

Edited by LeHuynhNam

4m848p10.gif 

Share this post


Link to post
Share on other sites
KaFu
LeHuynhNam

Thank you! i did it!

I have more question

i have file.au3 which has line

$1=GUICreate("MsgBox Wizard v.1.0", 440, 540, 100, 100)

and i wanna make a script which can change $1 to $a and all the word after the third comma "," have to delete and replace by another!

after changing this should be:

$a=GUICreate("MsgBox Wizard v.1.0", 440, 540,$something)

how can i do?

Edited by LeHuynhNam

4m848p10.gif 

Share this post


Link to post
Share on other sites
Innovative

StringSplit and StringReplace might be useful in this case..

Search that in the help files.

Share this post


Link to post
Share on other sites
AlmarM

MsgBox(0,"",'"This is an example!"')
I think this would be the best sollution :)

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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  

×