Sign in to follow this  
Followers 0
JBond

Adressing compiled/included Files

4 posts in this topic

Hello together!

I'm quite new on AutoIT.

I tried to create a GUI (progressbar) which runs during an installation and shows the user that there is still activity in the background.

This GUI includes a logo (pictures) that I want to have compiled in the exe file.

Here's my script:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Res_File_Add=D:\Work\Autoit\GUI\Installpic.jpg
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Installation in process", 623, 449)
GUISetBkColor(0xFFFFFF)
$Pic1 = GUICtrlCreatePic("D:\Work\Autoit\GUI\Installpic.jpg", 127, 40, 369, 118)
$Label1 = GUICtrlCreateLabel("Installation running", 232, 216, 158, 17)
$Progress1 = GUICtrlCreateProgress(56, 296, 521, 33)
;GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

f_startmsgbox()
f_msgboxgrow(20)
f_msgboxgrow(40)
f_msgboxgrow(60)
f_msgboxgrow(80)
f_msgboxgrow(100)
f_endmsgbox()
Func f_startmsgbox()
GUISetState(@SW_SHOW)
Sleep(2000)
EndFunc
Func f_msgboxgrow($vsize)
GUICtrlSetData($progress1, $vsize)
Sleep(2000)
EndFunc
Func f_endmsgbox()
GUISetState(@SW_HIDE)
EndFunc
Sleep(2000)
MsgBox(0,"Install Finished","Installation OK")

How do I have to "address" the included Picture:

#AutoIt3Wrapper_Res_File_Add=D:\Work\Autoit\GUI\Installpic.jpg

in the GUI-Line:

$Pic1 = GUICtrlCreatePic("D:\Work\Autoit\GUI\Installpic.jpg", 127, 40, 369, 118)

Or am I completely wrong?

Thanks for your help!

Share this post


Link to post
Share on other sites



Hi JBond,

you can either use FileInstall() function or the Resource UDF you can find in the forum. That would be two good places to start.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

I used Resources UDF...

... and it finally worked quite perfect!!!

Thank you very much!

Wouldn't this be a good topic to be inculded in the wiki?

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  
Followers 0