Jump to content

Getting the image into the script permenent


Recommended Posts

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?

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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?

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