Code: |
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # * Enregistreur de AVI RGSS #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # Développeur: CollosalPokemon (AKA Armorphor) # Version: 1.1 # Date: le 17 août 2011 #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # Histoire: # # V1.1: # - Répertoire ajouté vérification pour vous assurer que le dossier AVI est créé/existe #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Dir.mkdir("AVI") if !FileTest.directory?("AVI") module CPAVI GPPS = Win32API.new('kernel32', 'GetPrivateProfileString', 'pppplp', 'l') FW = Win32API.new('user32','FindWindowEx', '%w(l l p p)','l') TID = Win32API.new('kernel32','GetCurrentThreadId', '%w()','l') RECORD = Win32API.new("ProjectAVI.dll", "RecordAVI", "i", "i") STOP = Win32API.new("ProjectAVI.dll", "StopAVI", "", "") def CPAVI::handle @@RGSSWINDOW=nil processid=[0].pack('l') threadid=TID.call nextwindow=0 begin nextwindow=FW.call(0,nextwindow,"RGSS Player",0) if nextwindow wndthreadid=TID.call if wndthreadid==threadid @@RGSSWINDOW=nextwindow return @@RGSSWINDOW end end end until nextwindow==0 GPPS.call("Game","Title","",title="\0"*255,255,".//Game.ini") FW.call(0,nextwindow,"RGSS Player",title.delete!("\0")) end def CPAVI::record() RECORD.call(CPAVI::handle) end def CPAVI::stop() STOP.call() end end |