EMadxcs Posted March 12, 2014 Share Posted March 12, 2014 (edited) HI allhow compiler "File install" in exe ... !expandcollapse popup#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 March 12, 2014 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 12, 2014 Moderators Share Posted March 12, 2014 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 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
EMadxcs Posted March 12, 2014 Author Share Posted March 12, 2014 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! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 12, 2014 Moderators Share Posted March 12, 2014 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? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
EMadxcs Posted March 12, 2014 Author Share Posted March 12, 2014 I want to make FIle install working through the gui interface used by anyone even without the use of code every time .. like setup Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 12, 2014 Moderators Share Posted March 12, 2014 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? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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