Jump to content

Converting an variable to a string


Recommended Posts

Search and replace..:P

Either from the editor or make a search and replace preprocessor.

Something like (untested):

$data = FileRead($sourcefile)
$newdata = StringReplace($data, $search, $replace)
FileWrite($sourcefile, $newdata)
Link to comment
Share on other sites

Search and replace..:P

Either from the editor or make a search and replace preprocessor.

Something like (untested):

$data = FileRead($sourcefile)
$newdata = StringReplace($data, $search, $replace)
FileWrite($sourcefile, $newdata)

But FileInstall doesn't work with an variable in the source.

Go to This site for my best product!

Link to comment
Share on other sites

But FileInstall doesn't work with an variable in the source.

yes, that's exactly what the help file says!

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

I KNOW THAT!!!

THAT'S WHY I'M ASKING FOR A WAY TO CONVERT AN VARIABLE TO A STRING!!!

DON'T SHOUT AT ME! UTEN TOLD YOU HOW TO DO IT !!! WRITE A PREPROCESSOR

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

  • Developers

I KNOW THAT!!!

THAT'S WHY I'M ASKING FOR A WAY TO CONVERT AN VARIABLE TO A STRING!!!

First of all: Don't shout !

Secondly... Fileinstall does not work with a variable for Input since it needs it at Compilation time not execution time.

:P

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

DON'T SHOUT AT ME! UTEN TOLD YOU HOW TO DO IT !!! WRITE A PREPROCESSOR

Sorry for the shouting but I think the problem still isn't clear.

I just want an string to be a variable like:

"string1"=$variable1

So FileInstall wil work.

B.T.W. I will try his way but I tought it was something else then I ment.

Edited by Somebody Someware

Go to This site for my best product!

Link to comment
Share on other sites

Sorry for the shouting but I think the problem still isn't clear.

I just want an string to be a variable like:

"string1"=$variable1

So FileInstall wil work.

The problem is totally clear!

Three people told that it is NOT POSSIBLE what you want and one proposed a solution.... If I were you, I would take the solution...

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

The problem is totally clear!

Three people told that it is NOT POSSIBLE what you want and one proposed a solution.... If I were you, I would take the solution...

Cheers

Kurt

The solution doesn't work.

I think I just have to bundle all files without an IniRead operation.

I thank you all for doing your best and I'm sorry for the shouting etc.

Please forgive me.

Go to This site for my best product!

Link to comment
Share on other sites

The solution doesn't work.

oh, can you tell us why it doesn't work?

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

The solution doesn't work.

I think I just have to bundle all files without an IniRead operation.

I thank you all for doing your best and I'm sorry for the shouting etc.

Please forgive me.

The preprocessor solution will work. It will only add one more step for you when you want to generate and run the file. And you have to put the IniRead (and possibly IniWrite to know wat to replace the next time) in the preprocessor.

So when you want to compile your application you would do:

preprocessor.exe <your script file>

aut2exe.exe <your scriptfile>

Or, if you use SciTE, you could try to figure out something with

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