FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Fri Aug 23, 2019 11:12 am

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: tsr support
PostPosted: Sat Feb 28, 2009 5:06 pm 
Offline

Joined: Sat Feb 28, 2009 4:33 pm
Posts: 1
I'm going to create a windows mobile runner for interactive fiction games implementing the following algorithm:

1. creating local tcp server
2. waiting for incoming connections on port 1111
3. running "iexplorer" (or any browser) with "http://localhost:1111"
4. executing http requests of a browser

Would it be possible with future FBA Creator? I think it needs some features implemented:

- tsr profile of a project
- onmainloop() that would be called with lost focus
- return-to-os() function
- switch-task-button support
- sleep() function

The program below gave expected "Hello, world!" page to iexplorer, but it required many operations: switching to today screen (switch-task-button didn't work, I used special *cheat* key =), running iexplorer with "http://localhost:1111", switching back to fba, clicking on fba to close it.

Code:
local socket = require("socket")

local localhost = socket.tcp()
localhost:bind("*", 1111)
localhost:settimeout(1)
localhost:listen(1)

local client

local http = [[
HTTP/1.1 200 OK
Content-type: text/html
Content-length: %d

%s]]

local msg = [[
<html>
<head>
<title>Hello, world!</title>
</head>
<body>
<big>Hello, world!</big>
</body>
</html>
]]

function onmainloop()   
               
        local list = socket.select( { localhost }, { }, 0 )
        if #list == 1 then
                client = localhost:accept()
        end

        if client then
                list = socket.select( { client }, { }, 0 )
                if #list == 1 then
                        client:send (http:format(#msg, msg))
                        client:close()
                        client = nil
                end
        end       
       
        if (mousedown() > 0) then
                quit()
        end
end


Top
   
 Post subject: Re: tsr support
PostPosted: Sat Feb 28, 2009 7:18 pm 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Well actually FBA apps/games are designed to run at fullscreen,
so I could exclude tsr features to be implemented directly in FBA ;)
For these programs, evc++ is better choise (faster and lighter).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 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 Limited