Sign in to follow this  
Followers 0
FreeRider

File Compiler & Stamper

7 posts in this topic

Hello Folks,

As I need often to modify and compile several files, I was bored to do that manually. Therefore I decided to make my life easier

and developed a small tool which help to compile ".au3" files as Autoit does. I use the Autoit compiler, but with extended functions

which make possible to compile only one file, several ones or a whole directory (all au3 files), including icons if existing.

On top of that it's also possible to restamp files and choose the exact time stamp you want for the Create Date/Modify Date and Last Accessed Date.

This can be useful if you need to manage versions, having a specific time stamp can make easer such managment.

I called my tool "COAST" for COmplier And STamper, if you want to rename it.. No problem, do it.

This tool can be launched directly (you will have the GUI) or in silent mode (no GUI)with parameters. This feature is useful if you call the compiler

from an other script and you want it to be done silently.

If you get a problem using it, just send me a mail and I'll try to help.

Enjoy scripting,

FreeRider

As the code is quite long I attached the script file.

COAST.au3


FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites



Nice effort... (Might take a look at your main loop, there's no sleep there)

I'm not sure even after looking at the code, what you are meaning by "re-stamp or even stamp"? Are you just changing the Accessed/Modified/Created times?

Also, what does or doesn't this do that SciTe's built in compiler does?

Thanks.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Hi Smoke_N

If the loop is empty it's because I'm using Onventmode instead of GuiGetMsg (Opt("GuiOnEventMode",1) is activated at the beginning of the code.

Regarding your second question, you're correct, the tool can also change file dates.

Regarding the difference with SCITE, is SCITE cannot compile more than one file at once.

This tool can perform unique or mass compilations (hundred of files if needed), but at once, just with a button click

Cheers...


FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites

Hi Smoke_N

If the loop is empty it's because I'm using Onventmode instead of GuiGetMsg (Opt("GuiOnEventMode",1) is activated at the beginning of the code.

Regarding your second question, you're correct, the tool can also change file dates.

Regarding the difference with SCITE, is SCITE cannot compile more than one file at once.

This tool can perform unique or mass compilations (hundred of files if needed), but at once, just with a button click

Cheers...

Ok, thanks, I do something similar with a few of my apps.

On the loop thing though, you need at least a Sleep(10), my CPU was going nuts.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Well... I already used empty loops in other autoit scripts and I Never had any problem.

However I'll try the "Sleep" statement. Using the "OnEventMode" instead of the "GetMsg" makes the script longer to give you back the hand on the computer but it's not systematic.

Put a sleep in the loop would maybe help to avoid or at least reduce this "side effect" ?

Thanks for your comments and see you...


FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites

Well... I already used empty loops in other autoit scripts and I Never had any problem.

However I'll try the "Sleep" statement. Using the "OnEventMode" instead of the "GetMsg" makes the script longer to give you back the hand on the computer but it's not systematic.

Put a sleep in the loop would maybe help to avoid or at least reduce this "side effect" ?

Thanks for your comments and see you...

Without a resting point, the loop just continues to to eat at your CPU. If your not doing anything in a loop, you should always use at least a Sleep(10) to prevent it.

You say you've never had any problems, well you're probably running a system with a lot of memory, but if you mapped it, you'd see you have a lot of problems.

There's no concern with GUIOnEventMode vs GUIGetMsg(), if you use a Sleep() in the loop, GUIGetMsg() acts as that sleep buffer itself for regular Non-OnEventMode GUIs.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

My machine has 1Gb memory and I discovered that running several scripts in parallel generates small delays...

I include the Sleep right now and make tests.

I'll tell you what's the result...


FreeRiderHonour & Fidelity

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