Image doesnt show

06/22/2013 12:17 exivion#1
Hi guys when i run my script the image doesnt show to other people

Code:
#Region ### START Koda GUI section ###
$Form1 = GUICreate("Exivion", 650, 474, 713, 160)
GUISetIcon("C:\Users\User\Desktop\elogo.ico", -1)
GUICtrlSetState(-1, $gui_checked)
GUICtrlSetState(-1, $gui_disable)
$Pic1 = GUICtrlCreatePic("C:\Users\User\Desktop\exi.jpg", 176, 0, 473, 473)
$button1 = GUICtrlCreateButton("Exivion", 0, 0, 179, 473)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
(C:\Users\User\Desktop\exi.jpg) I know this is the problem but how can i fix this? so that ppl who download my .exe file also can see the image If my coding is wrong please correct it THX.
06/22/2013 12:22 Njahs#2
[Only registered and activated users can see links. Click Here To Register...]
06/22/2013 12:23 Croco™#3
You can use macros.
The macro for the desktop path is @DesktopDir.

Quote:
GUISetIcon(@DesktopDir&"\elogo.ico", -1)
A full list of all macros: [Only registered and activated users can see links. Click Here To Register...]
And all users need your images so send them with your code or use FileInstall
06/22/2013 12:44 exivion#4
so basically thats the function that allows other people to see the image like installing the image into their PC?
06/22/2013 12:48 Croco™#5
Yes, when the image does not exist the script create it.
Otherwise you can send the images with the .exe.
06/22/2013 12:54 exivion#6
but still then if i send the image with the file they still cant see caz of the directory and im talking about this one

$Pic1 = GUICtrlCreatePic("C:\Users\User\Desktop\exi.jpg", 176, 0, 473, 473)
06/22/2013 12:56 EinfachSö#7
use @DesktopDir
06/22/2013 12:58 exivion#8
still when they download or recieve the file it will be some where in the documents and stuff
06/22/2013 13:21 omer36#9
post your script
06/22/2013 13:23 exivion#10
Code:
FileInstall("C:\Users\User\Desktop\exi.jpg",@DesktopDir&"\exi.jpg") 
#Region ### START Koda GUI section ###
$Form1 = GUICreate("Exivion", 650, 474, 713, 160)
GUISetIcon(@DesktopDir&"\elogo.ico", -1)
GUICtrlSetState(-1, $gui_checked)
GUICtrlSetState(-1, $gui_disable)
$Pic1 = GUICtrlCreatePic(@DesktopDir&"\exi.jpg", 176, 0, 473, 473) 
$button1 = GUICtrlCreateButton("Exivion", 0, 0, 179, 473)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
06/22/2013 13:55 Croco™#11
Are you sure that the exi.jpg is on the desktop when you start the script ?
FileInstall works only if the programm is compiled and the image is at the given path while AutoIT compile your script !
06/27/2013 21:35 a.m.a.s#12
use @TempDir its better ,,, but when you compile the script you should put all resources in the same folder
its should be look like this

Code:
FileInstall("exi.jpg", @TempDir & "\exi.jpg") 
#Region ### START Koda GUI section ###
$Form1 = GUICreate("Exivion", 650, 474, 713, 160)
GUISetIcon(@DesktopDir&"\elogo.ico", -1)
GUICtrlSetState(-1, $gui_checked)
GUICtrlSetState(-1, $gui_disable)
$Pic1 = GUICtrlCreatePic(@TempDir & "\exi.jpg", 176, 0, 473, 473) 
$button1 = GUICtrlCreateButton("Exivion", 0, 0, 179, 473)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###