Author Topic: [VB2010] playvideo with if statement  (Read 2835 times)

0 Members and 1 Guest are viewing this topic.

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
[VB2010] playvideo with if statement
« on: April 19, 2011, 05:01:41 pm »
hey guys Im coding my bot atm and I just want to know how to make that part of the source code that is going to activate the video when the if statement is activated for example:

if input is hello -> then that video appear.

 :P best algorithm ever but I always wanted to know how to manipulate the programs from with the script so I hope you guys help me thanx in advance.

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: [VB2010] playvideo with if statement
« Reply #1 on: April 19, 2011, 05:08:08 pm »
I am not entirely sure what you mean. But from previous talks with you I know you want to make some sort of botish program that will do commands depending on user-input.

So I am guessing you want to do something like this:

Code: [Select]
' Generic command structure: command;argument;argument;argument;argument;argument;
' Command to play video: video;http://youtubeurl.com;
Dim CommandArguments() as string = UserInput.split(";")
If CommandArguments(0) = "video" then
process.start(CommandArguments(1))
' If you want to play other types of videos, like black out the entire screen and play a fullscreen video, you have to look into the windows media player control or directx etc. Look at this; http://www.vbdotnetforums.com/add-development/1701-playing-video-clip-form.html
End if
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: [VB2010] playvideo with if statement
« Reply #2 on: April 19, 2011, 08:10:23 pm »
ande, thanx for your answer but Ive to call for a inner video from my HD not from youtube so once the program reads the input it will make a move and will show up an output like if you were talking with a bot.

http://img856.imageshack.us/i/grgrgrl.png/

now you may  have an idea is like when you move a unit in Starcraft 2 it says something.

the algorithm would be

if input = something -> show up a video
or if input = anotherthing -> show up another video

and when the user doesnt input something I will make an animation that is like if the robot is doing the movement you may comprehend
« Last Edit: April 19, 2011, 08:17:15 pm by gh0st »

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: [VB2010] playvideo with if statement
« Reply #3 on: April 19, 2011, 08:31:32 pm »
ande, thanx for your answer but Ive to call for a inner video from my HD not from youtube so once the program reads the input it will make a move and will show up an output like if you were talking with a bot.

http://img856.imageshack.us/i/grgrgrl.png/

now you may  have an idea is like when you move a unit in Starcraft 2 it says something.

the algorithm would be

if input = something -> show up a video
or if input = anotherthing -> show up another video

and when the user doesnt input something I will make an animation that is like if the robot is doing the movement you may comprehend

Then I would make a picturebox or panel or something that would be the bot's animation area. Then add Microsoft.DirectX.AudioandVideoPlayback.dll reference to your project and do:

Code: [Select]
Dim WithEvents Vid as new Microsoft.DirectX.AudioandVideoPlayback.Video("c:\vid.avi")
Vid.Owner = picturebox1 ' or panel1 or whatever you choose to be your bot's animation place
Vid.Play()
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline gh0st

  • Sir
  • ***
  • Posts: 575
  • Cookies: 8
  • #DEDSec
    • View Profile
Re: [VB2010] playvideo with if statement
« Reply #4 on: April 19, 2011, 09:39:15 pm »
damn it I get an error
Error   1:Type 'Microsoft.DirectX.AudioandVideoPlayback.Video' is not defined.   
Im looking a video about this atm
this is about how to add a sound but I think that If we add video.play somewhere It could be the answer
http://schoolfreeware.blip.tv/file/4418539/

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: [VB2010] playvideo with if statement
« Reply #5 on: April 19, 2011, 10:00:58 pm »
damn it I get an error
Error   1:Type 'Microsoft.DirectX.AudioandVideoPlayback.Video' is not defined.   
Im looking a video about this atm
this is about how to add a sound but I think that If we add video.play somewhere It could be the answer
http://schoolfreeware.blip.tv/file/4418539/

The my.com.....sound.play does not exist for video as far as I know.

You have to add the reference dll for Microsoft.DirectX.AudioandVideoPlayback.Video in  order to use that class
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true