Sign in to follow this  
Followers 0
mactable

#include

7 posts in this topic

for example:

select

case $a = 1

$filename = "script1.au3"

case $a = 2

$filename = "script2.au3"

endselect

#include $filename

how can i make it works or same result?

thx for hints

Share this post


Link to post
Share on other sites



for example:

select

  case $a = 1

          $filename = "script1.au3"

  case $a = 2

          $filename = "script2.au3"

endselect

#include $filename

how can i make it works or same result?

thx for hints

<{POST_SNAPBACK}>

doesn't really work like that....

Can you give an example what you would want to do here ?


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

Share this post


Link to post
Share on other sites

select

case $a = 1

#include "script1.au3"

case $a = 2

#include "script2.au3"

endselect


Who else would I be?

Share this post


Link to post
Share on other sites

select

case $a = 1

#include "script1.au3"

case $a = 2

#include "script2.au3"

endselect

<{POST_SNAPBACK}>

yes i know this way to make my script works but is there any way to #include $myVariable ?

i know it may not possible, but i would like to confirm au3 script *CANNOT* #include $myVariable.

thx for all.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Well at the least try your own syntax.

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Help file

Parameters

filename The filename of the current script to include. Path is optional. This must be a string--it cannot be a variable.

If "..." is used, the filename is taken to be relative to the current script.

If <...> is used the filename is taken to be relative to include library directory (usually C:\Program Files\AutoIt3\Include). The include library contains many pre-written user-functions for you to use!

This must be a string--it cannot be a variable.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Quite crazily, you can try making on-the-fly the right .au3 file and start it.

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  
Followers 0