Jump to content

More then one AutoIt3Wrapper Definitions


Braese
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Developers

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?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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).
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...