Share this post

Link to post

Share on other sites

BrewManNH 978

No there isn't a way to do this, as all directives (preceeded by #) are processed before compile. There's no way for the compiler to read your code and execute it prior to compiling. Make 2 different scripts or deal with it inside the code and just include both files, I'm sure the size difference won't be all that much.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Share this post

Link to post

Share on other sites

BrewManNH 978

Won't work, the includes have to be literal strings, they can't be variables because you'd have to run the script to get the value it's supposed to contain, and the compiler doesn't run the script.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Similar Content

This is my first time here so please dont bombard me that what a silly question I am asking!!
I have 500 rows (A1:A500) in a spreadsheet and I just want to copy one by one row and then paste into another application and then press enter, loop should repeat this until finishes all 500 rows.
I have looked at clipget(), clip(put() but dont know how to select next row in next turn. I also looked at Array to store but again no luck. Can some guide me please..

0down votefavorite
In my current project, Excel macro open AutoIt script using a function Call Shell("location of autoit script").
For proper functioning of AutoIt script it's need to be close parent Excel workbook, so this closing Excel action is written in AutoIt script itself.
But as soon as AutoIt script close parent Excel workbook then script get pause and it do nothing.
How open the AutoIt script from Excel workbook and after that parent Workbook get close?

I want to animate transparent GIFs on my gui.
I searched, read and tested a lot UDFs
At the end none fits to me
I wrote my own animated function, but its flickering sometimes just for a miliseconds but still doesnt looks good.

I am maintaining all the reusable code in a separate file as library.au3.
In that file I have referenced some dependent files using fileinstall, so that they will be extracted when necessary.

Problem is, if I use a function in the library.au3 in another script which doesn't require this dependent file, as I am including the whole file using include tag, it is embedding that file also.
Is there any way to exclude that.