Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: whitespirits on October 24, 2017, 06:46:39 am

Title: convert scrip to XP
Post by: whitespirits on October 24, 2017, 06:46:39 am
#==============================================================================# ■ Meow Face Exit Canceler#------------------------------------------------------------------------------# Hide Game Window's Border, Disable Close Button and Alt + F4#==============================================================================# How to Use:# Plug & Play, Put this script below Material and above Main#==============================================================================MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')MF_SCL = Win32API.new('user32', 'SetClassLong', 'lil', 'i')MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')MF_TITLE = " " * 256MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")MF_TITLE.delete!(" ")MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)MF_SCL.call(MF_HWND, -26, 0x0200)MF_SWL.call(MF_HWND, -16, 0x14000000)


Im looking to stop people closing XPA with ALT F4 and the X for close to stop issues
Title: Re: convert scrip to XP
Post by: KK20 on October 24, 2017, 11:52:13 am
At a glance I see no reason that script is not compatible. Did you even try?

Also you made a topic on this already
http://forum.chaos-project.com/index.php/topic,15396.0.html
Title: Re: convert scrip to XP
Post by: whitespirits on October 24, 2017, 11:59:30 am
it pastes in a long line, could you help me format it correctly? thanks KK20 :)
Title: Re: convert scrip to XP
Post by: LiTTleDRAgo on October 24, 2017, 11:51:45 pm
Here, I'll help you format it.
#==============================================================================
# ■ Meow Face Exit Canceler
#------------------------------------------------------------------------------
# Hide Game Window's Border, Disable Close Button and Alt + F4
#==============================================================================
# How to Use:
# Plug & Play, Put this script below Material and above Main
#==============================================================================
MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')
MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')
MF_SCL = Win32API.new('user32', 'SetClassLong', 'lil', 'i')
MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')
MF_TITLE = " " * 256
MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")
MF_TITLE.delete!(" ")
MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)
MF_SCL.call(MF_HWND, -26, 0x0200)
MF_SWL.call(MF_HWND, -16, 0x14000000)
Title: Re: convert scrip to XP
Post by: whitespirits on October 26, 2017, 04:17:47 pm
works perfect thanks so much :)
Title: Re: convert scrip to XP
Post by: KK20 on October 26, 2017, 04:21:55 pm
Not sure if you would still be interested, but I found a way to intercept the close message. You can make the game do some kind of last save call before it closes.

Which I honestly think is the better option than disabling native window operations entirely. Also, there's nothing stopping me from just ending the task in task manager.