Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
damasterofthearts

Trouble Reading/Changing Script

Question

Okay.

If you don't know how to read/write scripts then I don't think you should try to help.

If you do, then I need some help.

 

I recently found this new script that lets you play .AVI files in RMXP.

But it always goes into fullscreen and I don't know how to stop it from going in there.

Does anyone know how to NOT make it go into fullscreen. Here it is.

---------------------------------------------------------------------------------------------------------------------

class Scene_Movie

 

def initialize(movie)

 

@readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'

 

@movie_name = Dir.getwd()+"\\Movies\\"+movie+".avi"

 

main

 

end

 

 

 

def main

 

 

 

game_name = "\0" * 256

 

@readini.call('Game','Title','',game_name,255,".\\Game.ini")

 

game_name.delete!("\0")

 

@wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L')

 

@temp = @wnd.call(0,0,nil,game_name).to_s

 

movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')

 

movie.call("open \""+@movie_name+"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)

 

@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')

 

 

 

@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')

 

@width = @detector.call(0)

 

if @width == 640

 

fullscreen

 

Graphics.update

 

sleep(1)

 

Graphics.update

 

sleep(1)

 

Graphics.update

 

sleep(1)

 

end

 

 

 

status = " " * 255

 

movie.call("play FILE",0,0,0)

 

loop do

 

sleep(0.1)

 

@message.call(@temp.to_i,11,0,0)

 

Graphics.update

 

@message.call(@temp.to_i,11,1,0)

 

Input.update

 

movie.call("status FILE mode",status,255,0)

 

true_status = status.unpack("aaaa")

 

if true_status.to_s != "play"

 

break

 

end

 

if Input.trigger?(Input::B)

 

Input.update

 

break

 

end

 

end

 

movie.call("close FILE",0,0,0)

 

bail

 

end

 

 

 

def bail

 

if @width == 640

 

fullscreen

 

end

 

end

 

end

 

 

 

def fullscreen()

 

 

 

$full.call(18,0,0,0)

 

$full.call(13,0,0,0)

 

$full.call(18,0,2,0)

 

$full.call(13,0,2,0)

 

end

 

$full = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')

----------------------------------------------------------------------------------------------------------------------

 

How? I can't write script very well.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

after def fullscreen() try putting

return

 

and see what happens

Thanks so much this script works very well.

And you only have to click ESC to X it out.

Thousand time thanks.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...