Jump to content
Sign in to follow this  
star2

my stupid picture

Recommended Posts

star2

#include <GuiConstants.au3>
GUICreate ("test",365,260)
GUICtrlCreatePic ("test.jpg",5,5)
GUISetState ()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

it doesn't appear

I've been working for so long now and I just can't concentrate

Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites
poisonkiller

Could you post that picture too, please?

Share this post


Link to post
Share on other sites
star2

Could you post that picture too, please?

Posted Image


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites
November

HI,

What kind of picture are we talking about? jpg, bmp, gif, pnp?

Is the image file in the same directory as the script?

cheers.


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites
poisonkiller

Put "test.jpg" in the same dir where script is and run this code:

#include <GuiConstants.au3>
GUICreate ("test",365,260)
GUICtrlCreatePic ("test.jpg",5,5, 355, 80)
GUISetState ()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Share this post


Link to post
Share on other sites
star2

it's already in the same directory

I know how to make the script recognize the location of the file

any way it's jpg file and I'v defined the path correctly but still not showing

note: I tried to put the wiedth and hieght but still the same


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites
November

it's already in the same directory

I know how to make the script recognize the location of the file

any way it's jpg file and I'v defined the path correctly but still not showing

note: I tried to put the wiedth and hieght but still the same

Tested and everything OK with me!

with or without wiedth and hieght ...

; Script Start - Add your code below here

#include <GuiConstants.au3>
GUICreate ("test",365,260)
GUICtrlCreatePic ("test.jpg",5,5, 0, 0, $SS_SUNKEN )
GUISetState ()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Really odd!


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites
MHz

1. Before you start to use relative addressing to a file or folder, then you should check your working directory. Then it is safe for your script to proceed. A couple of extra lines can make the difference (especially for debugging as the script tells you what is wrong).

2. Check your filename against the filename in your script.

#include <GuiConstants.au3>

If Not FileExists('test.jpg') And @ScriptDir <> @WorkingDir Then
    FileChangeDir(@ScriptDir)
    If Not FileExists('test.jpg') Then
        MsgBox(0x40030, 'Error', 'Hmm, test.jpg not found')
        Exit 1
    EndIf
EndIf

GUICreate("test", 365, 260)
GUICtrlCreatePic("test.jpg", 5, 5, 355, 80)
GUISetState()

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

:)

Share this post


Link to post
Share on other sites
star2

thank you all this is very weird

after I transfered all the files I'm using with the script from the desktopdir to a new folder and testes it it worked fine

but if I put them back again on the desktop it didn't

????

without having to put the path (depending on that the files are in the script dir)


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites
November

thank you all this is very weird

after I transfered all the files I'm using with the script from the desktopdir to a new folder and testes it it worked fine

but if I put them back again on the desktop it didn't

????

without having to put the path (depending on that the files are in the script dir)

Happened to me also 1 week ago.

Downloaded the new autoir version and all went fine!

If its working... dont try to understand :)

Cheers


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
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
Sign in to follow this  

×