GLBasic forum

Main forum => GLBasic - en => Topic started by: fjsantosb on 2009-Sep-10

Title: Open Web Browser with Web Parameter - iPhone
Post by: fjsantosb on 2009-Sep-10
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.
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: trucidare 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?

Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: fjsantosb 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.
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: MrTAToad on 2009-Sep-10
Have a look at http://forums.macosxhints.com/showthread.php?t=68698 (http://forums.macosxhints.com/showthread.php?t=68698)
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: fjsantosb on 2009-Sep-11
Thanks for sharing MrTAToad.
I will try some of the commands suggested on the post.
Best Regards, fjsantos.
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: codegit 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
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: fjsantosb on 2009-Sep-14
Anyone has got any advance on this?
Best regards, fjsantos.
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: MrTAToad 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...
Title: Re: Open Web Browser with Web Parameter - iPhone
Post by: fjsantosb on 2009-Sep-15
Thanks MrTAToad for sharing this piece of code,

I will try right now!

Best Regards, fjsantos.