Hi folks,
Is there a way to realize the following scenario within an AGS game?
Some GUI is shown.
- User clicks on a specific GUI button
- AGS reacts by opening the standard internet browser of the computer and showing a specific website in it.
This would probably only work on Windows systems, since Linux doesn't have the concept of a “standard†web browser AFAIK.
Yes you can do that with the ShellExecute plugin, this is what you should do:
1. Save and close your game
2. Copy the plugin dll into the main AGS folder
3. Open the editor and open your game
4. Activate the plugin in the project tree
You can now use this command:
int ShellExecute(const string operation, const string file, const string parameters, ShowCommand showCommand = SW_SHOW);
To open a website, use
// inside button interact
ShellExecute("", "http://website.com", "");
Quote from: fernewelten on Sun 22/12/2019 00:28:10
This would probably only work on Windows systems, since Linux doesn't have the concept of a “standard†web browser AFAIK.
You would normally use 'xdg-open'.
https://www.freedesktop.org/wiki/Software/xdg-utils/
here for Windows and Linux -> https://www.adventuregamestudio.co.uk/forums/index.php?topic=30948.msg636585168#msg636585168
Quote from: eri0o on Sun 22/12/2019 14:05:56
here for Windows and Linux -> https://www.adventuregamestudio.co.uk/forums/index.php?topic=30948.msg636585168#msg636585168
Sorry, I don't own a Linux system so I can only blindly obey instructions.
So where exactly does the file libagsshell.so go?
To
((program directory))/Linux/lib32, to
((program directory))/Linux/lib64 or to both of them?
I know the plug-in is really simple but I believe I only built for Linux 64 bits.
The reason is I simply didn't had a 32 bit Linux installation to test.
So place it on lib64. AGS will complain you don't have the 32 bit version though.