Jump to content

Image included in the program itself.


DJI
 Share

Recommended Posts

Hi,

Does anyone know how i could make an image file be included in the program itself?

That way, when the program is ran and it has an image, it displays it without linking to an external file.

<GuiCtrlCreatePic("wow.gif",0,0, 450,79)>

This would make the program display at 450 79 wow.gif that is located in the scripts directory.

How could i make it show an image that's somehow "internal", it the script.

I thought maybe #include <wow.gif> could work, but apperently, it doesnt.

Please help me out! :lmao: Thank you for your time and help. ;)

Link to comment
Share on other sites

Hi,

Does anyone know how i could make an image file be included in the program itself?

That way, when the program is ran and it has an image, it displays it without linking to an external file.

<GuiCtrlCreatePic("wow.gif",0,0, 450,79)>

This would make the program display at 450 79 wow.gif that is located in the scripts directory.

How could i make it show an image that's somehow "internal", it the script.

I thought maybe #include <wow.gif> could work, but apperently, it doesnt.

Please help me out! :lmao: Thank you for your time and help. ;)

FileInstall()
Link to comment
Share on other sites

Hi,

Does anyone know how i could make an image file be included in the program itself?

That way, when the program is ran and it has an image, it displays it without linking to an external file.

<GuiCtrlCreatePic("wow.gif",0,0, 450,79)>

This would make the program display at 450 79 wow.gif that is located in the scripts directory.

How could i make it show an image that's somehow "internal", it the script.

I thought maybe #include <wow.gif> could work, but apperently, it doesnt.

Please help me out! :lmao: Thank you for your time and help. ;)

Lookup FileInstall in the help files.

Edit - Pipped at the post.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Hmm... I don't really get it?

Lets say my file is blah.exe

And in that program theres an image. What must I do so that that image isn't external but acctualy in the .exe script. Doesnt FileInstall ( "source", "dest" [, flag] ) just change X.gif from src to another location?

Link to comment
Share on other sites

Hmm... I don't really get it?

Lets say my file is blah.exe

And in that program theres an image. What must I do so that that image isn't external but acctualy in the .exe script. Doesnt FileInstall ( "source", "dest" [, flag] ) just change X.gif from src to another location?

It includes the file in the exe when compiled and when the exe is run it installs it to the dest.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Ok and how what do i write in the "Destination", so that it goes in the same path as where the script is located?

If you just use the imagename without any path it will be installed in the same folder that you are running the compiled exe in.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

OK thank you :lmao:

Now I'm wondering another thing...

How can i make a text label in a program change after a certain time delay?

____________________________

| |

| TEXT 1 |

| |

| |

| |

| |

-------------------------------------- |

Then after Sleep(1500)

____________________________

| |

| TEXT 2 |

| |

| |

| |

| |

-------------------------------------- |

etc... So after a certain delay a txt label changes... is that possible?

Edited by DJI
Link to comment
Share on other sites

  • Moderators

GUICtrlSetData($LabelToChange, 'Text to change it to')

Sleep(1500)

GUICtrlSetData($LabelToChange, 'Text to change it to')

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thank you.

ANother question lol...

$Command = "programB.exe"

Run(@ComSpec & " /c " & @ScriptDir & "\" & $Command, @TempDir)

Now lets say i used that...It works... But programB.exe contains an .avi animation and doesnt display it when it's launched that way... and theres also a cmd.exe window running in the background when i do that... Could that be the cause?

Nice display pic by the way smoke_n lol

Link to comment
Share on other sites

  • Moderators

Inside of ProgramB.exe you would use a FileInstall() / Then followed by that a run() command.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hmm... I don't really get it...

I have programA.au3

and in that program i have

$Command = "bnet.au3"

Run (@ComSpec & " /c " & @ScriptDir & "\" & $Command, @TempDir)

Now bnet.au3 launches but the .avi video in bnet.au3 doesnt display.

However, if i run bnet.au3 myself(by clicking it), the .avi image does display...

And i think it might be cause of @ComSpec or something... because the avi doesnt display only when its launched by programA.au3

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