Sign in to follow this  
Followers 0
Jarobata

Include sound file in exe

6 posts in this topic

I want to compile my script into an exe which includes a sound file. I want to be able to run the exe on any computer by itself, no sound file outside the program. I know its doable but I can't figure out how to do it, I've been searching for a long time.

Share this post


Link to post
Share on other sites



Look in the help file for "FileInstall".

Share this post


Link to post
Share on other sites

No. FileInstall creates a file on the hard drive. Search the forum for "sound resources." You can play audio files from the executable's resources.

Share this post


Link to post
Share on other sites

No. FileInstall creates a file on the hard drive. Search the forum for "sound resources." You can play audio files from the executable's resources.

I went through 10 pages of search results for "sound resources" and found nothing.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

you may also need reshacker

#Region AutoIt3Wrapper directives section


;;#AutoIt3Wrapper_Res_File_Add=test_1.txt, rcdata, TEST_TXT_1 ; Filename,Section,ResName
;#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1
;#AutoIt3Wrapper_Res_File_Add=image2.bmp, bitmap, TEST_BMP_2
;;#AutoIt3Wrapper_Res_File_Add=binary1.dat, rcdata, TEST_BIN_1



; turn OFF Compression in beginning or it wont work  ---
#AutoIt3Wrapper_UseUpx=n

;; add icon 
#AutoIt3Wrapper_Icon=earth.ico

#AutoIt3Wrapper_Run_After=c:\ResHacker.exe -add %out%, %out%, image1.bmp , 2, TEST_BMP_1, 0
#AutoIt3Wrapper_Run_After=c:\ResHacker.exe -add %out%, %out%, image2.bmp , 2, TEST_BMP_2, 0
#AutoIt3Wrapper_Run_After=c:\ResHacker.exe -add %out%, %out%, test_1.gif, 23, TEST_GIF_1, 0

#AutoIt3Wrapper_Res_File_Add=C:\WINNT\Media\tada.wav, sound, TEST_WAV_1


; now compress resources with UPX 
#AutoIt3Wrapper_Run_After=c:\upx.exe  --compress-resources=1 "%out%"

#EndRegion




#include "resources.au3"
 
$gui = GUICreate("Data from resources example",820,400)
$pic1 = GUICtrlCreatePic("",0,0,400,300)
$pic2 = GUICtrlCreatePic("",400,0,400,300)
$label = GUICtrlCreateLabel("test",20,320,800,100)
GUISetState(@SW_SHOW)

; get string from resource
;$string = _ResourceGetAsString("TEST_TXT_1")
;GUICtrlSetData($label, $string)

; set image to picture control from resource  bitmap
_ResourceSetImageToCtrl($pic1, "TEST_BMP_1", $RT_BITMAP)

; set image to picture control from resource  bitmap
_ResourceSetImageToCtrl($pic2, "TEST_GIF_1", $RT_BITMAP)


; save binary data from resource to file
_ResourceSaveToFile(@ScriptDir & "\binary_data.dat", "TEST_BIN_1")

; save binary data from resource to file (create not existing directory)
_ResourceSaveToFile("teest__.dat", "TEST_BIN_1", $RT_RCDATA, 0, 1)

; play WAV from resource (sync/async)
_ResourcePlaySound("TEST_WAV_1")
_ResourcePlaySound("TEST_WAV_1", $SND_ASYNC)

While 1
    If GUIGetMsg() = -3 Then Exit
WEndoÝ÷ Ú·¬¢êÜzƮݫ­¢+Ø¥¹±Õµ½¹()±½°
½¹ÍÐÀÌØíIQ}
UIM=HôÄ)±½°
½¹ÍÐÀÌØíIQ} %Q5@ôÈ)±½°
½¹ÍÐÀÌØíIQ}%
=8ôÌ)±½°
½¹ÍÐÀÌØíIQ}59TôÐ)±½°
½¹ÍÐÀÌØíIQ}%1=ôÔ)±½°
½¹ÍÐÀÌØíIQ}MQI%9ôØ)±½°
½¹ÍÐÀÌØíIQ}=9Q%HôÜ)±½°
½¹ÍÐÀÌØíIQ}=9Pôà)±½°
½¹ÍÐÀÌØíIQ}

1IQ=ILôä)±½°
½¹ÍÐÀÌØíIQ}I
QôÄÀ)±½°
½¹ÍÐÀÌØíIQ}5MMQ 1ôÄÄ)±½°
½¹ÍÐÀÌØíIQ}I=UA}
UIM=HôÄÈ)±½°
½¹ÍÐÀÌØíIQ}I=UA}%
=8ôÄÐ)±½°
½¹ÍÐÀÌØíIQ}YIM%=8ôÄØ()±½°
½¹ÍÐÀÌØíIQ}9%
UIM=HôÈÄ)±½°
½¹ÍÐÀÌØíIQ}9%%
=8ôÈÈ)±½°
½¹ÍÐÀÌØíIQ}!Q50ôÈÌ)±½°
½¹ÍÐÀÌØíIQ}59%MPôÈÐ()±½°
½¹ÍÐÀÌØíM9}IM=UI
ôÁàÀÀÀÐÀÀÀÐ)±½°
½¹ÍÐÀÌØíM9}Me9ôÁàÀ)±½°
½¹ÍÐÀÌØíM9}Me9ôÁàÄ)±½°
½¹ÍÐÀÌØíM9}1==@ôÁàà)±½°
½¹ÍÐÀÌØíM9}9=MQ=@ôÁàÄÀ)±½°
½¹ÍÐÀÌØíM9}9=]%PôÁàÈÀÀÀ)±½°
½¹ÍÐÀÌØíM9}AUIôÁàÐÀ()Õ¹}IͽÕÉÐ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁôÄÀ°ÀÌØíIÍ1¹ôÀ¤ìÀÌØíIQ}I
QôÄÀ(%1½°
½¹ÍÐÀÌØí%5} %Q5@ôÀ(%1½°ÀÌØí¡%¹Íѹ°ÀÌØí¡  ¥ÑµÀ°ÀÌØí%¹½ ±½¬°ÀÌØí±½±5µ½Éå ±½¬°ÀÌØí5µ½ÉåA½¥¹ÑÈ°ÀÌØíIÍM¥é($($ÀÌØí¡%¹Íѹô±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíÑ5½Õ±!¹±ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤($ÀÌØí¡%¹ÍѹôÀÌØí¡%¹ÍѹlÁt((%%ÀÌØíIÍQåÁôÀÌØíIQ}    %Q5@Q¡¸($$ÀÌØí¡  ¥ÑµÀô±±
±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÅÕ½Ðí1½%µÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡%¹Íѹ°ÅÕ½ÐíÍÑÈÅÕ½Ðì°ÀÌØíIÍ9µ°|($$$$ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí%5}   %Q5@°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤($%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ä°À°À¤($$ÀÌØí¡   ¥ÑµÀôÀÌØí¡    ¥ÑµÁlÁt($%IÑÕɸÀÌØí¡  ¥ÑµÀìÉÑÕɹ̡¹±Ñ¼    ¥ÑµÀ(%¹%((%%ÀÌØíIÍ1¹±ÐìÐìÀQ¡¸($$ÀÌØí%¹½    ±½¬ô±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí¥¹IͽÕÉáÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¡%¹Íѹ°ÅÕ½ÐíÍÑÈÅÕ½Ðì°ÀÌØíIÍ9µ°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÀÌØíIÍQåÁ°ÅÕ½ÐíÍ¡½ÉÐÅÕ½Ðì°ÀÌØíIÍ1¹¤(%±Í($$ÀÌØí%¹½ ±½¬ô±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí¥¹IͽÕÉÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¡%¹Íѹ°ÅÕ½ÐíÍÑÈÅÕ½Ðì°ÀÌØíIÍ9µ°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÀÌØíIÍQåÁ¤(%¹%($(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È È°À°À¤($ÀÌØí%¹½  ±½¬ôÀÌØí%¹½   ±½­lÁt(%%ÀÌØí%¹½  ±½¬ôÀQ¡¸IÑÕɸMÑÉÉ½È Ì°À°À¤($($ÀÌØíIÍM¥éô±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½ÐíݽÉÅÕ½Ðì°ÅÕ½ÐíM¥é½IͽÕÉÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¡%¹Íѹ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí%¹½   ±½¬¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ð°À°À¤($ÀÌØíIÍM¥éôÀÌØíIÍM¥élÁt(%%ÀÌØíIÍM¥éôÀQ¡¸IÑÕɸMÑÉÉ½È Ô°À°À¤($($ÀÌØí±½±5µ½Éå   ±½¬ô±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí1½IͽÕÉÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¡%¹Íѹ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí%¹½   ±½¬¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ø°À°À¤($ÀÌØí±½±5µ½Éå  ±½¬ôÀÌØí±½±5µ½Éå ±½­lÁt(%%ÀÌØí±½±5µ½Éå    ±½¬ôÀQ¡¸IÑÕɸMÑÉÉ½È Ü°À°À¤($($ÀÌØí5µ½ÉåA½¥¹ÑÈô±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí1½­IͽÕÉÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí±½±5µ½Éå    ±½¬¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È à°À°À¤($ÀÌØí5µ½ÉåA½¥¹ÑÈôÀÌØí5µ½ÉåA½¥¹ÑÉlÁt(%%ÀÌØí5µ½ÉåA½¥¹ÑÈôÀQ¡¸IÑÕɸMÑÉÉ½È ä°À°À¤($(%MÑáѹ ÀÌØíIÍM¥é¤(%IÑÕɸÀÌØí5µ½ÉåA½¥¹ÑÈ)¹Õ¹()Õ¹}IͽÕÉÑÍMÑÉ¥¹ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁôÄÀ°ÀÌØíIÍ1¹ôÀ¤ìÀÌØíIQ}I
QôÄÀ(%1½°ÀÌØíIÍA½¥¹ÑÈ°ÀÌØíIÍM¥é°ÀÌØíÍÑÉÕÐ(($ÀÌØíIÍA½¥¹ÑÈô}IͽÕÉÐ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁ°ÀÌØíIÍ1¹¤(%%ÉɽÈQ¡¸($%MÑÉÉ½È Ä°À°À¤($%IÑÕɸÌäìÌäì(%¹%($ÀÌØíIÍM¥éôáѹ($ÀÌØíÍÑÉÕÐô±±MÑÉÕÑ
ÉÑ ÅÕ½Ðí¡ÉlÅÕ½ÐìµÀìÀÌØíIÍM¥éµÀìÅÕ½ÐítÅÕ½Ðì°ÀÌØíIÍA½¥¹ÑȤ(%IÑÕɸ±±MÑÉÕÑÑÑ ÀÌØíÍÑÉÕаĤìÉÑÕɹÌÍÑÉ¥¹)¹Õ¹()Õ¹}IͽÕÉÑÍ   åÑÌ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁôÄÀ°ÀÌØíIÍ1¹ôÀ¤ìÀÌØíIQ}I
QôÄÀ(%1½°ÀÌØíIÍA½¥¹ÑÈ°ÀÌØíIÍM¥é(($ÀÌØíIÍA½¥¹ÑÈô}IͽÕÉÐ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁ°ÀÌØíIÍ1¹¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ä°À°À¤($ÀÌØíIÍM¥éôáѹ(%IÑÕɸ±±MÑÉÕÑ
ÉÑ ÅÕ½ÐíåÑlÅÕ½ÐìµÀìÀÌØíIÍM¥éµÀìÅÕ½ÐítÅÕ½Ðì°ÀÌØíIÍA½¥¹ÑȤìÉÑÕɹÌÍÑÉÕÐÝ¥Ñ åÑÌ)¹Õ¹()Õ¹}IͽÕÉMÙQ½¥± ÀÌØí¥±9µ°ÀÌØíIÍ9µ°ÀÌØíIÍQåÁôÄÀ°ÀÌØíIÍ1¹ôÀ°ÀÌØí
ÉÑAÑ ôÀ¤ìÀÌØíIQ}I
QôÄÀ(%1½°ÀÌØíIÍMÑÉÕаÀÌØíIÍM¥é°ÀÌØí¥±!¹±(($ÀÌØíIÍMÑÉÕÐô}IͽÕÉÑÍ  åÑÌ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁ°ÀÌØíIÍ1¹¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ä°À°À¤($ÀÌØíIÍM¥éô±±MÑÉÕÑÑM¥é ÀÌØíIÍMÑÉÕФ($(%%ÀÌØí
ÉÑAÑ Q¡¸ÀÌØí
ÉÑAÑ ôàìµ½àô
ÉÑ¥ÉѽÉäÍÑÉÕÑÕÉ¥¥Ð½Í¸ÌäíÐá¥ÍÐ($ÀÌØí¥±!¹±ô¥±=Á¸ ÀÌØí¥±9µ°È¬ÄجÀÌØí
ÉÑAÑ ¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È È°À°À¤(%¥±]É¥Ñ ÀÌØí¥±!¹±°±±MÑÉÕÑÑÑ ÀÌØíIÍMÑÉÕаĤ¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ì°À°À¤(%¥±
±½Í ÀÌØí¥±!¹±¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ð°À°À¤((%IÑÕɸÀÌØíIÍM¥é)¹Õ¹()Õ¹}IͽÕÉMÑ%µQ½
ÑÉ° ÀÌØí
Ñɱ%°ÀÌØíIÍ9µ°ÀÌØíIÍQåÁôÄÀ¤ìÀÌØíIQ}I
QôÄÀ(%1½°ÀÌØíIÍÑô}IͽÕÉÐ ÀÌØíIÍ9µ°ÀÌØíIÍQåÁ¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ä°À°À¤($(%%ÀÌØíIÍQåÁôÀÌØíIQ} %Q5@Q¡¸($%}MÑ    ¥ÑµÁQ½
ÑÉ° ÀÌØí
Ñɱ%°ÀÌØíIÍѤ($%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È È°À°À¤($%IÑÕɸÄ(%¹%($($ì½È½Ñ¡ÈÑåÁÌÑ¡¸   %Q5@¹½Ð¥µÁ±µ¹ÑåСµÕÍÐÕÍ$¬¤¸¸¸($츸¸(%IÑÕɸMÑÉÉ½È ´Ä°À°À¤)¹Õ¹((쥹Ñɹ°¡±ÁÈչѥ½¸)Õ¹}MÑ    ¥ÑµÁQ½
ÑÉ° ÀÌØí
Ñɱ%°ÀÌØí¡ ¥ÑµÀ¤(1½°
½¹ÍÐÀÌØíMQ5}MQ%5ôÁàÀÄÜÈ(1½°
½¹ÍÐÀÌØí%5} %Q5@ôÀ((1½°ÀÌØí¡]¹ôU%
ÑɱÑ!¹± ÀÌØí
Ñɱ%¤(%%ÀÌØí¡]¹ôÀQ¡¸IÑÕɸMÑÉÉ½È Ä°À°À¤(±±
±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÅÕ½ÐíM¹5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡]¹°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØíMQ5}MQ%5°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí%5}   %Q5@°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí¡    ¥ÑµÀ¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È È°À°À¤(%IÑÕɸÄ)¹Õ¹((ìÑ¡¹­Ì1ÉÉä(ì5M8è¡ÑÑÀè¼½µÍ¸È¹µ¥É½Í½Ð¹½´½¸µÕ̽±¥ÉÉä½µÌÜÄÈàÜä¹ÍÁà(ìձб¥ÌÀÌØíM9}Me9ôÀ)Õ¹}IͽÕÉA±åM½Õ¹ ÀÌØíIÍ9µ°ÀÌØí±ôÀ¤(%1½°ÀÌØíÉÐô±±
±° ÅÕ½ÐíÝ¥¹µ´¹±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíA±åM½Õ¹ÅÕ½Ðì°ÅÕ½ÐíÍÑÈÅÕ½Ðì°ÀÌØíIÍ9µ°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°À°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°   ¥Ñ=È ÀÌØíM9}IM=UI
°ÀÌØí±¤¤(%%ÉɽÈQ¡¸IÑÕɸMÑÉÉ½È Ä°À°À¤(%IÑÕɸÀÌØíÉÑlÁt)¹Õ¹
Edited by nobbe

Share this post


Link to post
Share on other sites

Well, I'm sorry your search didn't come up with anything. Nobbe's post here is exactly what I was wanting to send you to though.

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