Braese Posted October 10, 2009 Share Posted October 10, 2009 (edited) 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 October 10, 2009 by Braese Link to comment Share on other sites More sharing options...
Developers Jos Posted October 10, 2009 Developers Share Posted October 10, 2009 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 More sharing options...
danielkza Posted October 10, 2009 Share Posted October 10, 2009 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 More sharing options...
Developers Jos Posted October 10, 2009 Developers Share Posted October 10, 2009 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 More sharing options...
danielkza Posted October 10, 2009 Share Posted October 10, 2009 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 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