Accessing the internet from within AGS

Started by Dave Gilbert, Mon 16/04/2007 18:33:06

Previous topic - Next topic

RickJ

Scotch,

Can your plug-in be used to run something from a command line like a batch file or
console program such as 7zip command line version?

For example can your plugin execute this  and if so how?

"7z -t7z c:\\Ags\\3.20\\Archive\\MyGame-V0000-003.7z  c:\\Ags\\3.20\\MyGame\\";

Moox

My sincerest apologies for the bump, however, I was wondering if it is possible to populate fields from within the shell function?

For instance, if I wanted a GUI to craft invoices to be emailed to my clients I can currently get the mail application open with the mailto: function, however, I would have to manually fill in all the fields making it nothing more than a worthless launcher application. After realizing that there is no print functionality this was my fall back plan before loading up c++ and relearning that.

Moox

Edit: Figured it out

Mailto allows for population through a body= code and a subject= code

-------

#23
Quote from: Dave Gilbert on Mon 16/04/2007 18:33:06
180MB is a bit too heavy for the casual market, and the agreement was to nix the voice pack (which takes up 140MB) but make it a seperate download.  
-Dave


I bought Empire Total War and got that of the internet.
The download was 11,5 GB and took three days to complete with internet install.
I then had a std. 2 Mb ADSL connection.

Now I work from home and run fiberlan 100Mbps.

A 180 Mb dl would take me approx. 2-3 minutes.
I doubt personally you have a reason to worry.

But then again, if you can direct me to a good reference on writing plugins I can probably create something like that given a little time to learn this editor thing.

On a personal note using mailto: hrefs is never a good way to do anything email related.
To many prefer using hotmail or gmail accounts without a proper defined email application and then the link invocation fails by default as no defined settings exist and you end up loosing clients.

Dave Gilbert

You'd be surprised 10e12!  A big chunk of users are still on dial-up, and the portals that wanted to sell the game are very concerned about bandwidth usage.  An average game of theirs is around 40-50 MB max.  An 180 MB game was way too high. 

And wow, this thread is old.

Calin Leafshade

Yea, you have to remember Dave's primary audience are the casuals.. not gamers.

Dave Gilbert

It's funny that this thread resurfaces now, because the other day I unearthed it myself to make the Puzzle Bots demo.  It now has a sweet "BUY NOW!" button that takes you to the purchase page.

Calin Leafshade


magintz

I've used the TCP/IP plugin before to retrieve web pages in game and I believe scotch or SSH made a IRC client with it, I'm not sure if this could do the trick.
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

suicidal pencil

what if instead of retrieving web pages, but a plugin that gets data from a database? It could be pretty useful. High scores, for example.

eri0o

#30
hey, does someone have any idea on how to port this plugin to Linux ?

edit: I found a source here: https://bitbucket.org/monkey0506/ags_shell/src/6516d82861c2?at=master

But I am not sure on how to start.

edit2: I started a repo here: https://github.com/ericoporto/agsshell

Trying to find the equivalent command for Linux to be able to port it...

eri0o

#31
🚨hey, if you are looking for my plugin below, please try instead AgsAppOpenURL plugin here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=60640.0🚨;

It worked!

binary release | github repo

Use this like below:
Code: ags
  if( System.OperatingSystem == eOSWindows ){
    ShellExecute("open", "rundll32.exe", "url.dll,FileProtocolHandler http://www.google.com");
  } else if( System.OperatingSystem == eOSLinux ){
    ShellExecute("", "", "xdg-open http://www.google.com");
  }

Right click, save link as... libagsshell.so

Right click, save link as... agsshell.dll

I actually didn't generate the above .dll but if someone with Windows could confirm the above code works. I based on monkey0506 code linked above.

selmiak

linking a website works on windows, but when compiling I get this:

https://i.imgur.com/C40m3nR.png

even though the required file is in the AGS install directory. But not in the plugin part of the game project tree...

eri0o

Linux plugins need to be built twice, once for 32bit and once for 64bit, and then place into the specific directories in the Editor Linux directory.

I don't recommend using AGS shell plugin at all though, it essentially let's the game do whatever it pleases in the computer, I usually delete it when I see in a game. If this is for opening a link, we could add something for this directly in ags4 since it's a function that is in SDL2 itself since 2.0.14, probably adding some restrictions so it only uses http urls or something.

Crimson Wizard

Quote from: selmiak on Sat 21/05/2022 00:01:23
linking a website works on windows, but when compiling I get this:

https://i.imgur.com/C40m3nR.png

even though the required file is in the AGS install directory. But not in the plugin part of the game project tree...

Everything is mentioned in the manual:
https://github.com/adventuregamestudio/ags-manual/wiki/Plugins

SMF spam blocked by CleanTalk