Jump to content

Recommended Posts

Posted

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
Posted

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 game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Posted (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 by AdmiralManHairAlkex
Posted

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
Posted

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
Posted

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...

Posted Image

Posted

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 .jpg

here's an upload from my own pc(so wont work when i got my pc off)

Posted Image

  • Developers
Posted (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 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.
  :)

Posted

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 ^^'

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...