mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
Hi, i read somewhere that i can put an animated avi movie into a dialog using the MDX.dll, so upon following the tutorial i made the following code.
Code:
alias mdx_fullpath { return $+(",C:\Program Files\MDXStudio\MDX.DLL,") }

alias mdx { dll $mdx_fullpath $1- }

alias mdxinit {
  dll $mdx_fullpath SetMircVersion $version
  dll $mdx_fullpath MarkDialog $dname
}

dialog anim1 {
  size -1 -1 313 203
  title "Dialog"
  button "positioner",1001,0 0 0 0 
  button "OK",1,3 5 60 30, ok 
  button "",2,4 34 300 160
  text "A bunch of text",3,63 6 173 17
}
on *:dialog:anim1:init:0:{
  mdxinit
  mdx SetControlMDX $dname 1001 positioner  minbox > C:\Program Files\MDXStudio\dialog.mdx
}

on *:dialog:anim1:init:0:{
  mdxinit
  did -a anim1 2 open $scriptdir $+ test.avi
  did -a anim1 2 play
}

I read that you needed a button placing in the dialog for the avi movie, so i have done that.

I did everything right, and put the test.avi into the scripts folder, along with this script, issued the /dialog -m anim1 anim1 command and i get the dilaog but no test.avi anywhere, could somebody please help me and tell me where i`m going wrong ?
btw the test.avi movie plays fine in my movie viewer, but not in the dialog

ShadowDemon
mIRC V6.03

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
- A single file can't have two same events.
- Wrong control is used. it should be the animation control from ctl_gen.mdx
- 1001 refers to a dialog control which doesn't exist. should be 2.

Here's the correct init event:
Code:
on *:dialog:anim1:init:0:{ 
  mdxinit 
  mdx SetControlMDX $dname 2 animation > C:\Program Files\MDXStudio\ctl_gen.mdx
  did -a anim1 2 open $scriptdir $+ test.avi 
  did -a anim1 2 play
}

Hope that helped smirk

(Note, for debugging, it's recommended to use //echo -a $dll() instead of just //dll, so if there's an error you'll see the information returned.)

Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
Thanks online, but it doesnt seem to be working at all frown

Infact i`v been playing with mdx now for a few weeks, and all the tutorials ive been reading from mircscript.org (sorry for posting the url) dont seem to work, maybe i should email the writer of those scripts and tell him his tutorials dont work.

ShadowDemon

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
I have tested this myself, and worked here. Anyway, I have re-tested it now, with the exact folders you used, and here's the full code:
Code:
alias mdx_fullpath { return $+(",C:\Program Files\MDXStudio\MDX.DLL,") }
alias mdx { dll $mdx_fullpath $1- }
alias mdxinit {  
  dll $mdx_fullpath SetMircVersion $version
  dll $mdx_fullpath MarkDialog $dname
}
dialog anim1 { 
  size -1 -1 313 203 
  title "Dialog" 
  button "positioner",1001,0 0 0 0 
  button "OK",1,3 5 60 30, ok 
  button "",2,4 34 300 160 
  text "A bunch of text",3,63 6 173 17
}
on *:dialog:anim1:init:0:{  
  mdxinit 
  mdx SetControlMDX $dname 2 animation > C:\Program Files\MDXStudio\ctl_gen.mdx 
  did -a anim1 2 open $scriptdirtest.avi 
  did -a anim1 2 play
}


This assumes, of course, that you have a file called 'test.avi' in your script folder.

For this test, I used filecopy.avi, which comes with the MDX pack.

Did you try working with this file? maybe your test.avi is an encoded file, which can't be played using MDX driver?

Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
lol, thanks Online, it works, i have a few uncompressed avi's, but now a none mirc related questions how can i uncompress a compressed avi file, so it can be used in the same way ????? :crazy

Suppose i will look on the internet.

ShadowDemon

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
I heard the program Virtualdub is a good video tool. You can check its website, www.virtualdub.org.

Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
great thanks, will look now

ShadowDemon

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
VirtualDub rocks smile


Link Copied to Clipboard