AgentSmith15 Posted July 9, 2008 Posted July 9, 2008 Hi AutoIt Forums,I've been reading Zedna's UDF on including binary data in your script. I would ultimately like to attach a dll (bassmod) and a xm file (chiptune), and would like the dll to access the chiptune? Is this currently possible with AutoIt?http://www.autoitscript.com/forum/index.php?showtopic=51103 <--- Zedna's UDFhttp://www.autoitscript.com/forum/index.php?showtopic=52712 <--- Chip-ItThis is what I have so far, but it doesn't work. Does anyone know what I am doing wrong?#AutoIt3Wrapper_useupx=n #AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, 2.xm, rcdata, TEST_XM_1, 0 ;#AutoIt3Wrapper_run_after="c:\Program Files\AutoIt3\Aut2Exe\upx.exe" --best "%out%" #include "resources.au3" $hBmp = _ResourceGet("TEST_XM", $RT_RCDATA) If FileExists("BASSMOD.dll") Then $bassdll = DllOpen("BASSMOD.dll") $Init = DllCall($bassdll, "int", "BASSMOD_Init", "int", -1, "int", 44100, "int", 0) $Name_H = DllStructCreate("char[255]") DllStructSetData($Name_H, 1, "$hBmp") $Lod = DllCall($bassdll, "int", "BASSMOD_MusicLoad", "int", 0, _ "ptr", DllStructGetPtr($Name_H), _ "int", 0, _ "int", 0, _ "int", 1028) DllCall($bassdll, "int:cdecl", "BASSMOD_MusicPlay", "int", $Init[0]) EndIf While 1 $msg = GUIGetMsg() IF $msg = -3 Then Exit WEnd Func OnAutoItExit() If Not (FileExists("BASSMOD.DLL")) Then Exit Else DllCall($bassdll, "int:cdecl", "BASSMOD_MusicFree", "int", $Init[0]) DllClose($bassdll) EndIf EndFuncOr would anyone know where to get started? [center][/center]
BrettF Posted July 9, 2008 Posted July 9, 2008 Found this for you. Its from the rus AutoIt boards (Valery posted it on the tech group)http://tech.groups.yahoo.com/group/AutoItList/message/31311muttley Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
AgentSmith15 Posted July 9, 2008 Author Posted July 9, 2008 The second link of my post in this topic has a working mod player, and I have successfully used it to play files that are on the hard drive. What I really want to do is have the bassmod.dll and *.xm file embedded as a resource and have a stand alone compiled script that doesn't write to the hard drive. Thank you anyways muttley [center][/center]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now