Jump to content
Sign in to follow this  
NELyon

Trying to write an autoit script

Recommended Posts

NELyon

I'm making a program that generates a FileInstall from the FileOpenDialog. I got it to write the $Region part, but i can't get it to write FileInstall.

#Include <GUIConstants.au3>
MsgBox(64, "Easy Setup Code Maker!", "Welcome to the Setup Code Maker. This will"&@CRLF&"Make a custom setup program for your program!")
FileWrite("Installcode.au3", '#region----Code Generated by Easy Setup Generator'&@CRLF)
MsgBox(64, "Easy Setup Code Maker!", "Get ready to select the file the installer will install")
$file = FileOpenDialog("Open a file","","All Files (*.*)")
FileWrite("Installcode.au3", 'FileInstall('&$file&', "C:\"');<<<<<Right there>>>>>

Share this post


Link to post
Share on other sites
Jos

I'm making a program that generates a FileInstall from the FileOpenDialog. I got it to write the $Region part, but i can't get it to write FileInstall.

How would this ever work ?

FileInstall() will include the File-to-be-Installed into the EXE at compilation time.

so how would aut2exe know what to include in the EXE ?


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
NELyon

I'm gonna make it write the path into the FileInstall code, so when compiled, it includes the file they selected.

Share this post


Link to post
Share on other sites
NELyon

sorry, still only writes the region part

Share this post


Link to post
Share on other sites
MHz

FileOpenDialog changes working directory so you FileWrite is continued in the new directory.

Share this post


Link to post
Share on other sites
GaryFrost

ok see what you are doing now.. my bad... try:

FileWrite("Installcode.au3", 'FileInstall("'&$file&'", "C:\"')
Was that missing something?

FileWrite("Installcode.au3", 'FileInstall("'&$file&'", "C:\")')


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
NELyon

FileOpenDialog changes working directory so you FileWrite is continued in the new directory.

XD

XD

XD

That was the problem!

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  

×