Sign in to follow this  
Followers 0
evg64

How to use @DesktopCommonDir?

6 posts in this topic

I can`t understand how to use @DesktopCommonDir.

I tried some variants:

#include "@DesktopCommonDir\MyFile.au3"

or

#include "@DesktopCommonDir&\MyFile.au3"

But all of them doesnt work. MyFile.au3 exists on my Desktop.

Share this post


Link to post
Share on other sites



First of all:) @DesktopCommonDir is used to get to the Desktop:)

Lets make it that you want the script to make a .ini file at the desktop, then you write

IniWrite(@DesktopCommondir & "\Settings.ini", "Main","Data", "")

When you execute the script it will make a Ini file with the name "Settings.ini" on the desktop. Check the Helpfile for Macro's and you will find what the different "@"-items is used for:)

the @-macros arent used in "#include" just place the .au3 file as far as i know:)

Hope it helped:)


Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Share this post


Link to post
Share on other sites

Its Better To Use @DesktopDir Then @DesktopCommonsDir I've had problems in the past using it...but if you want to write to a file? go ahead...and for #Include...you Dont use the macro @(blah) you just put #Include "File.au3" and it comes from where ever the script is..basically...@ScriptDir...hope this helps.

Share this post


Link to post
Share on other sites

But what if the script will be executed on another computer, where the is the same file on desktop? Just to write path like

#include "path to desktop\MyFile.au3"

won`t work, here must be used @DesktopCommonDir macro, but how exactly to use it?

Share this post


Link to post
Share on other sites

But what if the script will be executed on another computer, where the is the same file on desktop? Just to write path like

#include "path to desktop\MyFile.au3"

won`t work, here must be used @DesktopCommonDir macro, but how exactly to use it?

You can't use variables in the include path...

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