Wiggyboy Posted July 26, 2011 Posted July 26, 2011 what's wrong?? it won't show my picture.. it's in the same folder as the au3 file so i don't see the problem? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIConstants.au3> #include <EditConstants.au3> GUICreate("Spammer",500,300) GUISetState(@SW_SHOW) GUICtrlCreateTab(0,0,500) GUICtrlCreateTabItem("Hero") GUICtrlCreatePic("test.jpg",50,50) GUICtrlCreateButton("MUHAHA",10,10) GUICtrlCreateTabItem("Announcment") GUICtrlCreateTabItem("Taunt") While 1 $trigger = GUIGetMsg() If $trigger = $GUI_EVENT_CLOSE Then Exit WEnd
kaotkbliss Posted July 26, 2011 Posted July 26, 2011 two things I would do. I would move the GuiSetState at the end of the gui creation (after creating all tabs, buttons labels etc.) The other would be instead of simply "test.jpg" I would do @ScriptDir & "\test.jpg" 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
AdmiralAlkex Posted July 26, 2011 Posted July 26, 2011 (edited) @Wiggyboy You know Windows will look in the working directory, and not "where the au3 is" (whatever that would be called), right? It's probably all right, but you should use @ScriptDir just to be sure. @ScriptDir & "\test.jpg" Also, try setting some width and height on your stuff, that looks weird. Edit: And what kaotkbliss said. Edited July 26, 2011 by AdmiralManHairAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Wiggyboy Posted July 26, 2011 Author Posted July 26, 2011 Okey so i changed it but still wont work, ;Name = Spammer ;Author = Wiggy boy ;Verison = 1.2 ;Danger = 2 ;Desciption = This is my advanced spamming program. ;Scripts #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <GUIConstants.au3> #include <EditConstants.au3> ;Variables ;Funcs ;Start of Script GUICreate("Spammer",500,300) GUICtrlCreateTab(0,0,500) GUICtrlCreateTabItem("Hero") GUICtrlCreatePic(@ScriptDir & "test.jpg", 0, 0) GUICtrlCreateButton("MUHAHA",10,10) GUICtrlCreateTabItem("Announcment") GUICtrlCreateTabItem("Taunt") GUISetState(@SW_SHOW) While 1 $trigger = GUIGetMsg() If $trigger = $GUI_EVENT_CLOSE Then Exit WEnd
AdmiralAlkex Posted July 26, 2011 Posted July 26, 2011 Directory containing the running script. (Result does not contain a trailing backslash) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Wiggyboy Posted July 26, 2011 Author Posted July 26, 2011 (edited) ohh ye i tried both, none worked i tried this to, not working Dx GUICtrlCreatePic("C:\Users\Wiggy boy\Desktop\CustomIt\test.jpg", 0, 0) Edited July 26, 2011 by Wiggyboy
monoscout999 Posted July 26, 2011 Posted July 26, 2011 try to use it this way @scriptdir&"\test.jpg" Look at this example... the pic would be downloaded from the Internet #include <GUIConstantsEx.au3> $image = @Scriptdir&"\test.jpg" If not Fileexists($image) Then Inetget("http://i273.photobucket.com/albums/jj239/StarcraftImages/MCR.jpg",$image) $MainGui = GUICreate("Test", 600, 400) GUICtrlCreatePic($image, 0, 0, 600, 400) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd
Wiggyboy Posted July 26, 2011 Author Posted July 26, 2011 try to use it this way @scriptdir&"\test.jpg" Look at this example... the pic would be downloaded from the Internet #include <GUIConstantsEx.au3> $image = @Scriptdir&"\test.jpg" If not Fileexists($image) Then Inetget("http://i273.photobucket.com/albums/jj239/StarcraftImages/MCR.jpg",$image) $MainGui = GUICreate("Test", 600, 400) GUICtrlCreatePic($image, 0, 0, 600, 400) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd works fine, buy asoon as i want it to load my "test.jpg"... won't work? something wrong with the picture O.o? this is the picture...
AdmiralAlkex Posted July 26, 2011 Posted July 26, 2011 But that's a png... Why have you been saying .jpg all the time? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Wiggyboy Posted July 26, 2011 Author Posted July 26, 2011 ohh well, i'm afraid it's not... when u said that i got pretty sceared i was retarded, but it seems when i upload it at imageshack it recreats it to a .png, it's actully a .jpghere's an upload from my own pc(so wont work when i got my pc off)
Developers Jos Posted July 26, 2011 Developers Posted July 26, 2011 (edited) Calling a .PNG file .JPG doesn't make it a .JPG: --------------------------- IrfanView --------------------------- Warning ! The file: "D:\Development\AutoIt3\pictures\test.jpg" is a PNG file with incorrect extension ! Rename ? --------------------------- Yes No --------------------------- Edited July 26, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Wiggyboy Posted July 26, 2011 Author Posted July 26, 2011 Calling a .PNG file .JPG doesn't make it a .JPG:---------------------------IrfanView---------------------------Warning !The file: "D:\Development\AutoIt3\pictures\test.jpg" is a PNG file with incorrect extension !Rename ?---------------------------Yes No ---------------------------ohh, well i always save all files as png and then i read png didn't work so i just renamed it and since it worked fine looking at it i thought it converted itself when i changed it... well i saved it as a .jpg now works just fine, thanks ^^'
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