Jump to content

Basic "Show Picture" script not working..


 Share

Recommended Posts

Alright, so I've done this many of times but for some reason my picture just will NOT show up on my GUI. Here is the script, its just to display an image.

#include <GUIConstantsEx.au3>
#include <GDIPlus.au3>

$image = "C:\Users\****\Desktop\BLMap.jpg"


$MainGui = GuiCreate("Map", 600,400)
GUICtrlCreatePic($image, 0, 0, 600, 400)
GuiSetState(@SW_SHOW)

While 1
        $msg = GUIGetMsg()
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

All I have is a blank, grey GUI.

:)

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

I try with another JPG and it work.

#include <GUIConstantsEx.au3>
Inetget("http://i273.photobucket.com/albums/jj239/StarcraftImages/MCR.jpg",@Scriptdir&"\test.jpg")
$image = @Scriptdir&"\test.jpg"
$MainGui = GUICreate("Map", 600, 400)
GUICtrlCreatePic($image, 0, 0, 600, 400)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

PD: Why the ****?

Edited by monoscout999
Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 600, 400, 301, 54)
Global $Pic1 = GUICtrlCreatePic("C:\Users\****\Desktop\BLMap.jpg", 272, 96, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Edited by ussr
Link to comment
Share on other sites

*** doesnt auto fill the path!

Try using:

@DesktopDir &"\BLMap.jpg"

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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