Jump to content
Sign in to follow this  
mactable

#include

Recommended Posts

mactable

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
Jos

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                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
this-is-me

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
mactable

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
this-is-me

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
scriptkitty

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
ezzetabi

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.