DarkBoost Posted February 19, 2009 Posted February 19, 2009 (edited) Hi I have used the following command _GUIImageList_AddBitmap and added a macro @tempdir and found it will not pickup the image, however if I add a variable or direct path it works fine. I tested with @desktopdir with same results, so it appears to be with macro's not @tempdir specifically. Anyone else ran into this? Edited February 19, 2009 by DarkBoost
Zedna Posted February 19, 2009 Posted February 19, 2009 Post piece of your code. But I think you probably forgot '\' Resources UDF ResourcesEx UDF AutoIt Forum Search
DarkBoost Posted February 19, 2009 Author Posted February 19, 2009 ;WORKS$file = "c:\image.bmp"$button = GUICtrlCreateButton("",60,130,88,68)$image = _GUIImageList_Create(80,60,5,1)_GUIImageList_AddBitmap($image,$file)_GUICtrlButton_SetImageList($button,$image);FAILS$file = @TempDir & "\image.bmp"$button = GUICtrlCreateButton("",60,130,88,68)$image = _GUIImageList_Create(80,60,5,1)_GUIImageList_AddBitmap($image,$file)_GUICtrlButton_SetImageList($button,$image)
Zedna Posted February 19, 2009 Posted February 19, 2009 Try $file = FileGetShortName(@TempDir & "\image.bmp") Resources UDF ResourcesEx UDF AutoIt Forum Search
DarkBoost Posted February 19, 2009 Author Posted February 19, 2009 Try $file = FileGetShortName(@TempDir & "\image.bmp") Yeah tried that before posting I restarted AutoIT and it started working!? ... weird
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now