This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I would like to have a button open an application on my computer. Is there a way to do this through the Godot script, or do i need to do it through a custom object in C++?

The use is, for example(pseudocode):

on_button_click(app_path):
    window.minimise;
    os.open(app_path); 

I am trying to build a system splash screen for my HTPC that will allow a user, from the couch, to launch various apps rather than having to go through the OS UI. Choose, for example, Steam or Plex or Browser or Netflix.

in Engine by (46 points)

1 Answer

+3 votes

Try this:

func on_button_click(app_path):
    OS.set_window_minimized(true)
    OS.shell_open(app_path)

Cf. http://docs.godotengine.org/en/latest/classes/class_os.html

by (1,957 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.