Sign in to follow this  
Followers 0
laurin1

Command Line Compile - Determine Failure?

11 posts in this topic

Why doesn't the command line compiler throw an error or something on failure? When I use Scite to compile, an error is show, but when I compile a script that has an error using the command line, it just quits. I'm trying to write a bulk compiler, but there is no way to determine failures, except if the .exe is not update (modification date / time.)


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites



laurin1,

I am intrigued - how are you producing these error-ridden scripts that do not compile from the command line? :huh:

And why not run them through AU3Check before compiling - that should highlight most of the errors. ;)

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

Use parameter /ErrorStdOut when running your exe and pipe the output to a file.

2 people like this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

What is the error? If SciTE displays an error don't ignore it, fix it.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I'm not getting email notifications from the forum for these replies.

Strange responses. Of course, I am going to fix the errors. Here is what I am trying to accomplish. I use some common AU3 files amongst all of my scripts - libraries of sorts. When I change the common files, I want to re-compile all of my scripts all at once, instead of having to do each one of them indidivually - takes too long, and sometimes I forget to compile them all. I am probably going to write a bulk compiler in C#, but I need to be able to capture what errors occur OR AT LEAST capture that a script failed, which I can then open in Scite and compile normally and fix the error.

I will try parameter /ErrorStdOut suggestion.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

And why not run them through AU3Check before compiling - that should highlight most of the errors. ;)

I was unaware of this process. I've always just compiled in Scite. Awesome. Perfect solution!


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

laurin1,

Interesting topic, I assume that you are writting a source manager, of sorts. I am interested in your results, if you do not mind sharing. I'm trying to organize my spaghetti mess of code fragments and functions.

Anyone care to weigh in on this? (if this is considered hijacking then please disregard!)

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Well, for starts, just the ability to buk syntax check and bulk compile, but eventually deployment and possibly more down the road.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

A bulk compile can be done relatively easy. You can create an AutoIt3 script or use a batch file like:

@Echo off
REM BatchCompile
call:Compile test.au3
call:Compile test1.au3
Exit

:Compile
ECHO Compiling %~1
"%Programfiles%AutoIt3SciteAutoIT3wrapperAutoIT3wrapper.exe" /in "%~1" /nostatus > "%~1.log"
Echo Done RC: %ERRORLEVEL%
GOTO:EOF

This will create a LOG file for each script compiled that you can check or you could dump it all into a single log file ....

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Does it really make sense to compile all scripts just because you made a change to a library?

If you add functionality I would only compile those scripts that need this new functionality. But to use it you need to change the script as well. In this case you could compile manually after changing the code.

For me it only makes sense to compile all scripts when you fixed a bug.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

@water -

Does it really make sense to compile all scripts just because you made a change to a library?

No, of course not. This is the idea of a source/version manager, change control and recovery. Perhaps this is beyond the scope of the OP.

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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