Author Topic: Need someone share Neo-Bahamut's "Always on top" demo  (Read 1480 times)

Offline finalholylight

  • Awakened Visionist
  • **
  • Posts: 78
  • LV: 0
    • View Profile
Need someone share Neo-Bahamut's "Always on top" demo
« on: July 10, 2014, 03:56:37 PM »
When travel this forum, I saw a topic that is discussing about something of this topic :
http://www.hbgames.org/forums/viewtopic.php?t=71126
I follow the link and like the demo so much :x , but demo's link died, if anyone have downloaded this demo, would you mind sharing it, please  :)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: Need someone share Neo-Bahamut's "Always on top" demo
« Reply #1 on: July 10, 2014, 04:14:30 PM »
Or do some actual work for yourself and compile it yourself.

Here's an article explaining how to compile Ruby scripts into executables.
http://rubyonwindows.blogspot.com/2009/05/ocra-one-click-ruby-application-builder.html

Install Ruby, Install Ruby Gems, Install Ocra, compile the "aot.exe" code into an EXE.

Here's the script for "aot.exe"
Code: [Select]
require 'win32api'
 
Smallest_Float = 0.00000000000000001
 
Readini = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'pppplp', 'l')
Findwindow = Win32API.new('user32', 'FindWindowA', 'pp', 'l')
 
def get_rgss_handel(ini = ".\\Game.ini")
    if !FileTest.exist?(ini)
        exit
    end
  game_name = "\0" * 256
  Readini.call('Game', 'Title', '', game_name, 255, ini)
  game_name.delete!("\0")
  return Findwindow.call('RGSS Player', game_name)
end
 
GetAct = Win32API.new('user32.dll', 'GetActiveWindow', '', 'i')
SetAct = Win32API.new('user32.dll', 'SetActiveWindow', 'i', 'i')
SetFor = Win32API.new('user32.dll', 'SetForegroundWindow', 'i', 'i')
IsWnd = Win32API.new('user32.dll', 'IsWindow', 'i', 'i')
 
$handel = get_rgss_handel
 
cores = ENV['NUMBER_OF_PROCESSORS'].to_i
sleeptime = ARGV[0].to_f
 
loop do
    is_window = IsWnd.call($handel)
    if is_window == 0
        exit
    end
    act = GetAct.call
    if act != $handel
    #   SetAct.call($handel)
        SetFor.call($handel)
    end
    sleep(sleeptime)
end

Here's the script to put into your RMXP project
Code: [Select]
# RGSS Player running always (not only when selected):
# Copy the aot.exe into your project directory and place this script into your
# script editor:
 
IO.popen('aot.exe 0.001')
# The number behind aot.exe represents the sleep time between a check.
# For example 0.05 means the programm will check if the RGSS Player is not on top
# every 50 milliseconds. I recommend something like 0.001
 
# Thanks to Skade for the idea to use IO.popen
 
# There may occure problems with print windows. Usually you won't be able to close
# them with pressing "ok" but the close button (red X) should work.
 
# Should only work on Windows, sorry :(

If you had just read the topic a bit you would have realized that he left all the code for people to work with.
« Last Edit: July 10, 2014, 04:15:40 PM by gameus »

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: Need someone share Neo-Bahamut's "Always on top" demo
« Reply #2 on: July 10, 2014, 05:13:52 PM »
Couldn't you simply use Win32API to change the window style?

EDIT:
Nevermind, just thought that would only solve half the problem, it will still be allowed to be deactivated.
« Last Edit: July 10, 2014, 05:15:59 PM by ForeverZer0 »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Need someone share Neo-Bahamut's "Always on top" demo
« Reply #3 on: July 10, 2014, 06:07:42 PM »
I think it's funny how "handle" is constantly misspelled.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3205
  • LV: 386
  • Gender: Male
  • Choco Octo <3
    • View Profile
Re: Need someone share Neo-Bahamut's "Always on top" demo
« Reply #4 on: July 10, 2014, 07:51:59 PM »
I think it's funny how "handle" is constantly misspelled.
(click to show/hide)



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: Need someone share Neo-Bahamut's "Always on top" demo
« Reply #5 on: July 11, 2014, 08:13:15 PM »
Made a better and MUCH smaller version of this.
http://forum.chaos-project.com/index.php/topic,14347.new.html
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.