Iris2.de

Iris2-Forum
It is currently Mon Nov 30, 2020 8:13 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon May 18, 2009 6:56 am 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
I See This Packet Is Not Implemented Then I Implement It:

Opens Default Web Browser
Tested In Windows Xp/Vista, Internet Explorer, FireFox

Code:
function gPacketHandler.kPacket_Web_Browser()
    local input = GetRecvFIFO()
    local id = input:PopNetUint8()
    local size = input:PopNetUint16()
    local url = FIFO_PopZeroTerminatedString(input, size)
    local file = io.open("tmp.url", "w")
    file:write("[InternetShortcut]\n")
    file:write("URL=" .. tostring(url) .. "\n")
    file:flush()
    file:close()
    io.popen(tostring("tmp.url"))
end


packet id = 0xA5
Staff Command: [ob www.iris2.de

Regards
Sehlor


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 18, 2009 9:38 am 
Offline
iris2-developer
User avatar

Joined: Tue Apr 18, 2006 10:28 pm
Posts: 823
Location: Munich, Bavaria, Germany
thanks =) there's also
main.lua:357: OpenBrowser(url)
but that's also not more reliable.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 18, 2009 9:53 am 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
and then, there is 2 way to choose :P

Code:
function gPacketHandler.kPacket_Web_Browser()
    local input = GetRecvFIFO()
    local id = input:PopNetUint8()
    local size = input:PopNetUint16()
    local url = FIFO_PopZeroTerminatedString(input, size)
    OpenBrowser(url)
end


which one is better ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group