Jump to content
Sign in to follow this  
bigfattoby

Getting the image into the script permenent

Recommended Posts

bigfattoby

Hey. Does anyone know if there is a code that makes your image be in the script? Cause i want to share my script with some friends. And there is alot of photos, but when i send them my script. but the images are not included.

Forward thanks.

bigfattoby

Edited by bigfattoby

Getting hang on the basic, still much to learn.If I take high class, taking high test im getting highscore right?

Share this post


Link to post
Share on other sites
monoscout999

you can attach the pics in a rar or zip file. you can use FileInstall() and compile the script or you can use InetGet()

Did you want to send a compiled .exe file or the .au3 script?

Edited by monoscout999

Share this post


Link to post
Share on other sites
monoscout999

Here you got an example using InetGet()

#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("Map", 600, 400)
GUICtrlCreatePic($image, 0, 0, 600, 400)
GUISetState(@SW_SHOW)
do

until GuigetMsg() = $GUI_EVENT_CLOSE
FileDelete($image) ; if you want you can delete the file before closing the script.

Share this post


Link to post
Share on other sites
bigfattoby

Thank you! oh and btw, if you got time

Shouldent this script make a image appear if button is clicked?

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 188, 258, 192, 124)
Global $Button1 = GUICtrlCreateButton("Button1", 48, 16, 73, 25)
Global $Pic1 = GUICtrlCreatePic("", 24, 56, 129, 81)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $msg = GUIGetMsg()
    If $msg =-3 Then Exit
    If $msg = $Button1 Then button1()
    WEnd

    Func button1()
GUICtrlSetData($Pic1, "C:\Users\Tobias\Desktop\projects\Autoit\lolbuilder\Images\amptome.jpg")
EndFunc

Getting hang on the basic, still much to learn.If I take high class, taking high test im getting highscore right?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.