| View previous topic :: View next topic |
| Author |
Message |
kapege.de
Joined: 07 Feb 2005 Posts: 186 Location: Munich, Germany
|
Posted: Wed Feb 09, 2005 1:17 pm Post subject: #directives and if |
|
|
Bug or feature?
The following script does not behave as expected:
myEXE = 0
if myEXE = 1
{
msgbox, %myEXE% ; is NOT executed
#NoTrayIcon ; is EXECUTED!
#SingleInstance force ; is EXECUTED!
FileInstall, default.ini, custom.ini, 0 ; is NOT executed
}
I think It would be better, when the #directives would only be executed if the if-clause is valid. I think that you check for the number signs (#) before running the script.
I for myself always need two versions of a script: One is running in script-mode while developing, another one is running as .exe. When I swap the "myEXE" variable I quickly can change the behaviour of the script before compiling.
Is it planned to change that?
Would be great!
Thanx
Peter |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Wed Feb 09, 2005 5:50 pm Post subject: |
|
|
It's impossible to conditionally pass directives because they are processed before the script actually starts executing. It might help to think of them as a completely separate part of the script, above conditions, blocks, and labels.
The nature of directives and the need for processing them first means this fact won't change, by the way. |
|
| Back to top |
|
 |
kapege.de
Joined: 07 Feb 2005 Posts: 186 Location: Munich, Germany
|
Posted: Mon Feb 14, 2005 10:02 am Post subject: |
|
|
Thanx. I'll comment them out like before.
Peter |
|
| Back to top |
|
 |
|