Je suis en train de faire un petit programme pour désactiver les videos d'intro d'un jeu (bioshock).
J'ai terminé le code mais il ne fonctionne pas (j'ai le message d'erreur de mon messagereqester).
Pourtant toute la synthaxe a l'aire correct et les fichiers sont bien au bon endroit.
Code : Tout sélectionner
;{ BIOSHOCK INTRO FIXER by Ar-S
Enumeration
#ELGRATINO
#BT_Patch
#BT_About
EndEnumeration
;}
Define.l Event, EventWindow, EventGadget, EventType, EventMenu
;}
Procedure OpenWindow_ELGRATINO()
If OpenWindow(#ELGRATINO, 228, 401, 180, 29, "Bioshock Video Fixer", #PB_Window_SystemMenu|#PB_Window_TitleBar)
StickyWindow(#ELGRATINO,1)
If CreateGadgetList(WindowID(#ELGRATINO))
ButtonGadget(#BT_Patch, 0, 0, 155, 30, "Patch")
ButtonGadget(#BT_About, 155, 0, 25, 30, "?")
EndIf
EndIf
EndProcedure
OpenWindow_ELGRATINO()
;{- Event loop
Repeat
Event = WaitWindowEvent()
Select Event
; ///////////////////
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
If EventGadget = #BT_Patch
DossierParDefaut$="C:\"
message$=" Browse to Bioshock install Directory"
Rep$=PathRequester ( message$ , DossierParDefaut$)
Repcomplet$=Rep$+"Content\BinkMovies"
vid01$="\2KG_logo_720P.bik"
vid02$="\300K-640X360.bik"
vid03$="\LogoVid.bik"
ext$=".old"
If RenameFile(Repcomplet$+vid01$, Repcomplet$+vid01$+ext$)
RenameFile(Repcomplet$+vid02$, Repcomplet$+vid02$+ext$)
RenameFile(Repcomplet$+vid03$, Repcomplet$+vid03$+ext$)
MessageRequester("GOOD","Videos have been removed"+Chr(10)+Chr(10)+" EnJoY")
Else
MessageRequester ("Alert","File not found"+Chr(10)+"Make sure you choose the good root bioshock folder"+Chr(10)+"(ex :c:\program files\bioshock), try again")
MessageRequester("TEST",Repcomplet$+vid01$+ext$+Chr(10)+Repcomplet$+vid02$+ext$+Chr(10)+Repcomplet$+vid03$+ext$)
EndIf
EndIf
If EventGadget = #BT_About
MessageRequester("Info","BIOSHOCK INTRO FIXER"+Chr(10)+Chr(10)+"Coded by AR-S")
EndIf
; ////////////////////////
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #ELGRATINO
CloseWindow(#ELGRATINO)
Break
EndIf
EndSelect
ForEver
;
;}
