Author Topic: Open Web Browser with Web Parameter - iPhone  (Read 2437 times)

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Hi all,

I am near to finish my first game for iPhone platform using glbasic, and all i have to say is 'GLBasic is Amazing!'.
I am currently doing my 'More Games' button, which will open a web browser with a webpage.

Anyone knows how to do this?

Thanks in advance,

fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: Open Web Browser with Web Parameter - iPhone
« Reply #1 on: 2009-Sep-10 »
i have to check, is no problem but i have to make a lib for your iphone project.
only the weblink?

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Open Web Browser with Web Parameter - iPhone
« Reply #2 on: 2009-Sep-10 »
Hi Trucidare,

Thanks again for your great help!

Yes, will be good a function or lib which let open an iPhone WebBrowser which open url.
Anything like, NetWebOpen(url$). (To be consistent with other NetWeb functions).

Thanks again.

Best Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

MrTAToad

  • Guest

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Open Web Browser with Web Parameter - iPhone
« Reply #4 on: 2009-Sep-11 »
Thanks for sharing MrTAToad.
I will try some of the commands suggested on the post.
Best Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline codegit

  • Dr. Type
  • ****
  • Posts: 270
    • View Profile
Re: Open Web Browser with Web Parameter - iPhone
« Reply #5 on: 2009-Sep-11 »
I am also nearing completion of my first iTouch game. I was going to leave doing the "link to a web site" for now. But it would be cool if we were able to do this from Glbasic.  =D
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Open Web Browser with Web Parameter - iPhone
« Reply #6 on: 2009-Sep-14 »
Anyone has got any advance on this?
Best regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

MrTAToad

  • Guest
Re: Open Web Browser with Web Parameter - iPhone
« Reply #7 on: 2009-Sep-14 »
For the Mac (and hopefully it should work for the iPhone), try :

Code: (glbasic) [Select]
call()

Code: (glbasic) [Select]
INLINE
extern "C" int system ( const char * command );
ENDINLINE

FUNCTION call:
INLINE
system( "open http://www.bbc.co.uk" );
ENDINLINE
ENDFUNCTION

It's possible this will also work in SHELLCMD, but I thought I'll try this way first :)


Linux does seem to work with :

Code: (glbasic) [Select]
SHELLCMD("firefox http://www.bbc.co.uk &",TRUE,TRUE,vv)

Windows is figuratively (but not literally harder) - all that is needed is a DLL/library to call ShellExecute.  Hopefully Vista x64 will let me install VS 2005 then I can write one...
« Last Edit: 2009-Sep-14 by MrTAToad »

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: Open Web Browser with Web Parameter - iPhone
« Reply #8 on: 2009-Sep-15 »
Thanks MrTAToad for sharing this piece of code,

I will try right now!

Best Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com