Scripts / Launch website via Lua

Author
Message
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 2nd Sep 2016 14:20 Edited at: 2nd Sep 2016 15:24
Ive been playing about with lua and shell commands today and getting some fun results lol i have tried to launch the shell via the GG main menu scripts and open a website using os.execute ("start http://www.websitename") and although it worked it opens a million pages :/ oops i have tried using os.Exit but didnt have any joy anyone want to join in the fun?
Edit: added () which stopped the multiple page load and opened the page correctly but returned a nil value (waits for the pc to catch fire) lol
Intel i5 4950 Quad core 3.3ghz
8gb Ram
Nvidia NVS 315 1gb
and a well fed mouse on a wheel

When Reality is broken. Game designers can fix it and make it more realistic
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 5th Sep 2016 20:38
When I tried to do this with lua os.execute it worked but flashed up a black command box first and it also exits GG out of full screen which I don't want. Lua sockets might be the way to do it in a more seamless way but I haven't looked at this yet - on the 'todo' list
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 6th Sep 2016 08:35
I did read that if you use io.popen that you can hide the black box i managed to get it to work but it locked up GG :/
Intel i5 4950 Quad core 3.3ghz
8gb Ram
Nvidia NVS 315 1gb
and a well fed mouse on a wheel

When Reality is broken. Game designers can fix it and make it more realistic
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 9th Sep 2016 16:19
When I tried io.popen I got the same behaviour as os.execute / start, a black terminal box popped up - the website did open though, just not very slick

Cheers.
Northern
14
Years of Service
User Offline
Joined: 5th Nov 2010
Location: Brazil
Posted: 10th Sep 2016 05:36
@Honkeyboy:

Honkeyboy wrote:

Quote: ""...I did read that if you use io.popen that you can hide the black box i managed to get it to work but it locked up GG :/...""


Unfortunately, it's near the impossible, to run the os.execute( ) or io.popen( ), Lua functions, without the dreaded black box (command prompt window) show up. Read more, using the link below:

http://stackoverflow.com/questions/18798044/how-to-avoid-popup-a-window-when-use-os-execute-in-lua

Greetings,
-Northern


PM
gd
8
Years of Service
User Offline
Joined: 21st Jul 2016
Location: Small Darkroom with no red light
Posted: 17th Sep 2016 20:36
Hi guys, I guess you could just have a good splash screen from your game menu with clear instructions or promos why they should visit your gaming website. That way, they are in control of what happens.
Some people hate pop-up windows which kills the gaming experience. I sure they will remember the web address lol.
Dark Base 900 Pro OJ: Rampage V Ed.10, i7 6950x non-OC, DDR4-3333 64 GB RAM, Win 10/64, Asus Strix GeForce 1080 x 2 MDA mode, Air cooled

Laptop - M17xR3
PM
Honkeyboy
3D Media Maker
9
Years of Service
User Offline
Joined: 16th Sep 2015
Location: Doesnt know half the time ;)
Posted: 16th Oct 2016 22:06
Aye m8 was just having some fun and trying to see what could be done, DVaders used this to real clever effect with his computer models launching snes games etc proper cool
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel

I only smile because i have absolutely no idea whats going on

Login to post a reply

Server time is: 2024-12-22 22:24:43
Your offset time is: 2024-12-22 22:24:43