baheath Posted March 1, 2008 Posted March 1, 2008 Hello,I just stumbled upon AutoIt a couple of weeks ago and after seeing some of the excellent example scripts I decided to try making a media player of my own as a way to learn the language. One feature I wanted to add to a player was a Karaoke mode by calling an external cdg player similar to the winamp plugin.That's when I came across this code written for blitz... Which leads me to my question, do think something similar to this could be written directly in AutoIt?Here is a link to a great document about cdg files if anyone is interested.
baheath Posted March 2, 2008 Author Posted March 2, 2008 Hi, Anyone have an idea how I can split my $Packet variable into individual bytes in an array, so I can do some bitAnd operations on each byte? #include <GUIConstantsEx.au3> #cs; use later for isolating bits Global $SubCodeCommand = 9 Global $SubCodeMask = 63 Global $CDGCommand = "" Global $CDGInstruction = "" Global $CDGMemoryPreset = 1 Global $CDGBorderPreset = 2 Global $CDGTileBlock = 6 Global $CDGScrollPreset = 20 Global $CDGScrollCopy = 24 Global $CDGDefineTransColor = 28 Global $CDGLoadColorTableLo = 30 Global $CDGLoadColorTableHi = 31 Global $CDGTileBlockXOR = 38 #ce $GUI = GUICreate("", 200, 200, -1, -1) $GoButton = GUICtrlCreateButton("Go", 60, 60, 80, 25, 0) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg () Switch $Msg Case $GUI_EVENT_CLOSE Exit case $GoButton $SelCDG = FileOpenDialog ("Select CDG File:", "", "CDG Files (*.cdg)") $CDGFile = FileOpen ($SelCDG, 16) $SubCode = FileRead ($CDGFile) $Packet = BinaryMid ($SubCode, 25, 24) Msgbox (0, "", $Packet) EndSwitch WEnd Thanks
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