Jump to content

Recommended Posts

Posted

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!

Posted

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]
Posted

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?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...