Graeme Posted March 8, 2014 Share Posted March 8, 2014 Hi, I have a very simple line in a complex script. If Not FileInstall("Thunderbird update.jpg",$ScriptTargetDir,1) Then SplashOff() MsgBox(0x10,$UpdateID,"Update failed - could not install Thunderbird update.jpg in " & $ScriptTargetDir) Exit(0) EndIf Every time I try to compile this script I get the message: But the file Thunderbird update.jpg exists in the same directory as the script. I tried making it a bmp like the example in the help file - no difference. I tried ".Thunderbird update.jpg" and I tried making it "ThunderbirdUpdate.jpg" gettting rid of the space. The destination file is defined as well. The error message from SciTE isn't very helpful - >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /ShowGui /in "U:Documents5 GraemeQAupdate2_2_0.au3" +>17:38:08 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000809 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000809 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) -> No changes made.. >Running AU3Check (1.54.22.0) from:C:Program Files (x86)AutoIt3 +>17:38:11 AU3Check ended.rc:0 >Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\Aut2Exe\aut2exe_x64.exe /in "U:Documents5 GraemeQAupdate2_2_0.au3" /out "C:UsersGraemeAppDataLocalAutoIt v3Aut2exe~AU3tngpptu.exe" /nopack /comp 4 !>17:38:21 Aut2exe.exe ended errors because the target exe wasn't created, abandon build. (C:UsersGraemeAppDataLocalAutoIt v3Aut2exe~AU3tngpptu.exe)rc:9999 +>17:38:21 AutoIt3Wrapper Finished.. >Exit code: 0 Time: 13.756 Any ideas as to what the problem is would be very appreciated. Blessings Graeme Link to comment Share on other sites More sharing options...
GordonFreeman Posted March 8, 2014 Share Posted March 8, 2014 (edited) Try. but i think will not work why "This must be a literal string; it cannot be a variable or the result of a function call." @scriptdir & "\Thunderbird update.jpg" I think if you send full script (PM) i can help more Edit: .Thunderbird Update.jpg instead of Thunderbird Update.jpg Edited March 8, 2014 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
Graeme Posted March 8, 2014 Author Share Posted March 8, 2014 Thanks Gordon. I had tried that - both the ".Thunderbird update.jpg" and putting the full path in... Blessings Graeme Link to comment Share on other sites More sharing options...
Palestinian Posted March 8, 2014 Share Posted March 8, 2014 $ScriptTargetDir = "C:\" If Not FileInstall("Thunderbird update.jpg",$ScriptTargetDir,1) Then SplashOff() MsgBox(0x10,'',"Update failed - could not install Thunderbird update.jpg in " & $ScriptTargetDir) Exit(0) EndIf Works just fine for me, what version of AutoIt are you using? Link to comment Share on other sites More sharing options...
thatnewguy69 Posted March 9, 2014 Share Posted March 9, 2014 if you are compile from scite then the working directory is changed that could be why it not work Link to comment Share on other sites More sharing options...
guinness Posted March 9, 2014 Share Posted March 9, 2014 Macros don't work apart from @ScriptFullPath which adds the current script to the compiled executable. I just tried compiling with SciTE and no error, so the comment about SciTE changing the working directory is false. Perhaps change the location of where you're compiling, maybe it's your AV?! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Graeme Posted March 10, 2014 Author Share Posted March 10, 2014 Hi Palestinian, I have SciTE 3.3.7 and AutoIt 3.3.8.1. I wondered if this might be a problem .... What versions do you have? Blessings Graeme Link to comment Share on other sites More sharing options...
Graeme Posted March 10, 2014 Author Share Posted March 10, 2014 Hi guiness, Tried changing the location, twice - gave the same result. I've tried commenting out that particular fileinstall and it just comes up with a problem on another file. If I comment that out there's another one - all the same problem... Blessings Graeme Link to comment Share on other sites More sharing options...
Palestinian Posted March 10, 2014 Share Posted March 10, 2014 I have SciTE Version 3.3.7 and AutoIt Version 3.3.10.2 Link to comment Share on other sites More sharing options...
Solution Graeme Posted March 10, 2014 Author Solution Share Posted March 10, 2014 I found the problem! I followed your lead Palestinian and copied the lines into a stand alone program and it worked! No problem. So I commented out each file install that complained, one after the other until I got to the last one! That one was the problem - I had fileinstall("QuickAccess" & $VersionNum & ".exe"..... One might consider this a bug in SciTE that it complains in the wrong place but I've often found programs do that... Now the program works like a dream. Thanks for everyone's comments - they helped me get to the solution. Blessings Graeme Link to comment Share on other sites More sharing options...
guinness Posted March 10, 2014 Share Posted March 10, 2014 It's not SciTE that is at fault here, if there is indeed a fault at all. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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