Jump to content
Sign in to follow this  
EMadxcs

how compiler "File install"...

Recommended Posts

EMadxcs

HI all

how compiler "File install" in exe ... !

#include <Guiconstants.au3>
Global $file1
Global $file2

gui_()
Func gui_()
$EMad=GUICreate("EMad",400,300,@DesktopWidth/3.5,@DesktopHeight/4,-1,"","")
$open1=GUICtrlCreateButton("open File 1",30,100,70,30)
$open2=GUICtrlCreateButton("open File 2",30,140,70,30)
$inte=GUICtrlCreateButton("inte",160,210,70,40)
GUICtrlCreateListView(".jpg",120,103,150,20)
GUICtrlCreateListView(".exe",120,143,150,20)

guisetstate()

while 1
Switch GUIGetMsg ()

Case $GUI_EVENT_CLOSE
Exit
Case $open1
$file1=FileOpenDialog("select","","(*.jpg)")
GUICtrlCreateListView($file1,120,103,150,20)
case $open2
$file2=FileOpenDialog("select","","(*.exe)")
GUICtrlCreateListView($file2,120,143,150,20)
case $inte
FileInstall_($file1,$file2)
EndSwitch
WEnd
EndFunc

Func FileInstall_($file1,$file2)
;error !!? & Not compiler in exe file
FileInstall($file1,@TempDir & "/TEST.jpg")
FileInstall($file2,@TempDir & "/TEST.exe")
ShellExecute("TEST","",@TempDir)
;

EndFunc
Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites
Melba23

EMadxcs,

Welcome to the AutoIt forum. :)

As explained in the Help file, the "source" for FileInstall MUST be a literal string so that the compiler knows which file to use. You CANNOT use a variable as in that script. ;)

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
EMadxcs

EMadxcs,

Welcome to the AutoIt forum. :)

As explained in the Help file, the "source" for FileInstall MUST be a literal string so that the compiler knows which file to use. You CANNOT use a variable as in that script. ;)

M23

thx

What should I do to accomplish this program!

Share this post


Link to post
Share on other sites
Melba23

EMadxcs,

As you are only copying selected files to the Temp folder, FileCopy would seem to be all you need. FileInstall is used when you need specific files which might not be on the machine running the script. ;)

But if that is all you want why not run the exe directly? What are you trying to do with this script? :huh:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
EMadxcs

I want to make FIle install working through the gui interface used by anyone even without the use of code every time .. like setup

Share this post


Link to post
Share on other sites
Melba23

EMadxcs,

That is not what FileInstall does. You use it to store required files that might not be on the machine running the compiled AutoIt script inside the script itself. That is why it needs a literal string to identify the file as it needs this at compile time, not runtime. Does that make it clearer? :huh:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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  

×