Sign in to follow this  
Followers 0
Wacken

source must be string

8 posts in this topic

Using the function: FileInstall ( "source", "dest" [, flag] )

I would to make an installer for multiple different but simmilar applications.

I would like to place the "source" paths and "dest" paths that go with it on top of the file.

However: "The source path of the file to compile. This must be a literal string; it cannot be a variable."

Is there no option in the compiler to make words that will be replaced by the string i provide with for word and can be used for this function?

I used this in CPP in the past, but i don't know the right word for it :whistle: sort of constants that are replaced at compile time.

Share this post


Link to post
Share on other sites



Well as stated it has to be a string... You may though write a little script by the side to help you write all the file installs :whistle:

Sleep(5000)

;To target Scite

For $i = 0 To 10

Send('FileInstall("C:\MyDest\' & $i & '.exe", "C:\dest")' & @CRLF )

Next


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Well as stated it has to be a string... You may though write a little script by the side to help you write all the file installs :whistle:

Sleep(5000)

;To target Scite

For $i = 0 To 10

Send('FileInstall("C:\MyDest\' & $i & '.exe", "C:\dest")' & @CRLF )

Next

http://www.autoitscript.com/forum/index.ph...c=34805&hl=

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Baah no fun for me... everytime i make a smallscript to help, you already have a fully script with a nice interface :whistle:


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Baah no fun for me... everytime i make a smallscript to help, you already have a fully script with a nice interface :whistle:

No worries, I've been here a tad longer :) .

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

No worries, I've been here a tad longer :whistle: .

Yes but now I have the ultimate program to ALL ANSWERS


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Be careful with that script Shevilie, line 40 should be Random(0,19). Not 20. If it hits 20, your program will crash with an array subscript error.

Share this post


Link to post
Share on other sites

My bad :whistle: The random should be

$i = Random(0,19,1)

Thanks to Smoke to clear out the integer :)


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

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