Somebody Someware Posted January 3, 2007 Share Posted January 3, 2007 I have made an installation program but the problem is that I have to use a variable to get the file details but I can't put an variable in the "source" part of FileInstall. Is there a way to convert an variable to a string? Please help me. Go to This site for my best product! Link to comment Share on other sites More sharing options...
Uten Posted January 3, 2007 Share Posted January 3, 2007 Search and replace.. 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) Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Somebody Someware Posted January 4, 2007 Author Share Posted January 4, 2007 Search and replace.. 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 More sharing options...
/dev/null Posted January 4, 2007 Share Posted January 4, 2007 But FileInstall doesn't work with an variable in the source.yes, that's exactly what the help file says!CheersKurt __________________________________________________________(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 More sharing options...
Somebody Someware Posted January 4, 2007 Author Share Posted January 4, 2007 yes, that's exactly what the help file says!CheersKurtI KNOW THAT!!!THAT'S WHY I'M ASKING FOR A WAY TO CONVERT AN VARIABLE TO A STRING!!! Go to This site for my best product! Link to comment Share on other sites More sharing options...
/dev/null Posted January 4, 2007 Share Posted January 4, 2007 (edited) 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 January 4, 2007 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 More sharing options...
Developers Jos Posted January 4, 2007 Developers Share Posted January 4, 2007 (edited) 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. Edited January 4, 2007 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 More sharing options...
Somebody Someware Posted January 4, 2007 Author Share Posted January 4, 2007 (edited) 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 January 4, 2007 by Somebody Someware Go to This site for my best product! Link to comment Share on other sites More sharing options...
/dev/null Posted January 4, 2007 Share Posted January 4, 2007 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 More sharing options...
Somebody Someware Posted January 4, 2007 Author Share Posted January 4, 2007 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...CheersKurtThe 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 More sharing options...
/dev/null Posted January 4, 2007 Share Posted January 4, 2007 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 More sharing options...
Uten Posted January 4, 2007 Share Posted January 4, 2007 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 Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now