Jump to content
Sign in to follow this  
Braese

More then one AutoIt3Wrapper Definitions

Recommended Posts

Braese

Hi,

is it possible to have more then one #AutoIt3Wrapper Definitions in one au3 File? I test it with an simple IF Statement, but when i compile, it uses the last Variables, in the example always "c". Perhaps someone can help with it if possible.

If $a Then
    #Region
    #AutoIt3Wrapper_icon=icons\a.ico
    #AutoIt3Wrapper_outfile=a.exe
    #EndRegion
Elseif $b Then
    #Region
    #AutoIt3Wrapper_icon=b.ico
    #AutoIt3Wrapper_outfile=b.exe
    #EndRegion
Else
    #Region
    #AutoIt3Wrapper_icon=c.ico
    #AutoIt3Wrapper_outfile=c.exe
    #EndRegion
EndIf
Edited by Braese

Share this post


Link to post
Share on other sites
Jos

Hi,

is it possible to have more then one #AutoIt3Wrapper Definitions in one au3 File? I test it with an simple IF Statement, but when i compile, it uses the last Variables, in the example always "c". Perhaps someone can help with it if possible.

If $a Then
    #Region
    #AutoIt3Wrapper_icon=icons\a.ico
    #AutoIt3Wrapper_outfile=a.exe
    #EndRegion
Elseif $b Then
    #Region
    #AutoIt3Wrapper_icon=b.ico
    #AutoIt3Wrapper_outfile=b.exe
    #EndRegion
Else
    #Region
    #AutoIt3Wrapper_icon=c.ico
    #AutoIt3Wrapper_outfile=c.exe
    #EndRegion
EndIf

These directives are ONLY used at compilation time so will never work like this.

You could add the ICO's to the compiled program and use these to change the Icon of your program.

There is an example shown in teh SciTE4AutoIt3 helpfile.

Jos


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

Share this post


Link to post
Share on other sites
danielkza

I needed to include resource selectively once too, and the best way I could find was to:

- Write a second script, that generated an .au3 file with the correct resource-related directives;

- Include that generated file in the main script;

- Use #AutoIt3Wrapper_Run_Before to run the script automatically at each compile.

Share this post


Link to post
Share on other sites
Jos

I needed to include resource selectively once too, and the best way I could find was to:

- Write a second script, that generated an .au3 file with the correct resource-related directives;

- Include that generated file in the main script;

- Use #AutoIt3Wrapper_Run_Before to run the script automatically at each compile.

How do you determine what ICO to include?

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

Share this post


Link to post
Share on other sites
danielkza

How do you determine what ICO to include?

In my case the resources where not icons, but the idea should work anyway. The generating script just created a file with the compiler directives in the same dir. of the main .au3 file as "Resources.au3", and I just included it. I can try to find the code if it helps (I'm not sure I still have it tough).

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  

×