Phaisius 0 Posted March 9, 2014 hey peoples, I am new autoit and i have made a script it all works, Its just there is one thing i would like to change. were i have added my pictures in i have used this: $hPic_background = GUICtrlCreatePic("C:UsersPhaisiusDesktopJaguar.jpg") My question is what code can i use to make it so the picture is getting loaded from the directory of the script so i can put the scipt in a folder and the pictures in a folder in the folder of the script That way i can move the folder and it would still work. Anyone understand were i am coming from? like i said i am learning help would be awsome Thanks, PhaiSiuS Share this post Link to post Share on other sites
Driveskull 0 Posted March 9, 2014 (@WorkingDir & "Images5.png" Use it like this, when you move a script with a image folder it will always use it Share this post Link to post Share on other sites
Phaisius 0 Posted March 9, 2014 Awsome Thanks heeps mate Share this post Link to post Share on other sites
Phaisius 0 Posted March 9, 2014 i am getting errors in this line i dont think i am putting it in correctly, When you say Workingdir do i have to put the name of the folder that the script is in? $hPic_background = GUICtrlCreatePic(@WorkingDir & "ImagesJaquar.jpg" Thats how i have put it in is that what do you reckon i have done wrong? Share this post Link to post Share on other sites
orbs 201 Posted March 9, 2014 @WorkingDir is the working directory, not necessarily the directory where the script is located. for the script directory use @ScriptDir in AutoIt, @ is the prefix for an element called "Macro". search the help file for various macros available. Share this post Link to post Share on other sites
Phaisius 0 Posted March 9, 2014 ok Thank you for your help I got it working Share this post Link to post Share on other sites