No problem about not knowing english very well. I admire you for trying. I would struggle worse than you if this forum wasn't in english!
Here is an easier way to do it and gives you more control
Create 3 integer variables:
AllowSave
AllowLoad
AllowQuit
From the
Project Properties:
Options Tab:
checkmark on: Hide the "Load" button
checkmark on: Hide the "Save" button
Advanced Tab:
checkmark on: Execute some VBScript code every time that a frame is loaded
- Code: Select all
AllowSave = 0
AllowLoad = 0
AllowQuit = 0
From any Frame Properties:
Advanced Tab:
[Procedures...] button
- Code: Select all
sub KeyGuard_KeyPressed(KeyID)
ProcessKeyStrokes GetCurrentFrameName, KeyID(0)
Action.message "key: " & KeyID(0)
End Sub
Sub ProcessKeyStrokes(CurrentFrame, KeyID)
If KeyID = 8 then
if AllowSave = 1 then
Action.PopupSaveGame
end if
elseif KeyID = 9 then
if AllowLoad = 1 then
Action.PopupLoadGame
end if
elseif KeyID = 16 Then
if AllowQuit = 1 then
Action.Quit
end if
End If
End Sub
For the Frame Properties where you
don't want to allow any of the 3 options:
Advanced Tab:
- Code: Select all
AllowSave = 0 'No Save
AllowLoad = 0 'No Load
AllowQuit = 0 'No Quit
For the Frame Properties where you
want to allow any of the 3 options:
Advanced Tab:
- Code: Select all
AllowSave = 1
AllowLoad = 1
AllowQuit = 1
You can mix and match the options to Save, Load, or Quit as you please.