skino Posted July 23, 2015 Report Posted July 23, 2015 I can display text in FSX with FSUIPC. Can I read this text, if it was created by another program? This text is generated by x PRO ATC-X http://pointsoftware.de/proatcx_d/index.html and I'd like to read it in VB.NET. Is this possible via offset? 3380 ? I want to have the text, for example, greater to be able to read it easily at high resolution.
Pete Dowson Posted July 23, 2015 Report Posted July 23, 2015 This text is generated by x PRO ATC-X http://pointsoftware.de/proatcx_d/index.html and I'd like to read it in VB.NET. Is this possible via offset? 3380 ? I want to have the text, for example, greater to be able to read it easily at high resolution. FSUIPC4 can capture that text and make it available to WideFS. The 3380 offset is only used for text displayed via FSUIPC itself. Details of the way to capture it on a WideFS client PC are found in the Lua documentation, in your FSUIPC documents folder. Check the "event.textmenu" function The same mechanism can also capture the menus from programs like Pro-ATC-X and GSX, but cannot entirely remove those from the FSX screen, only the P3D one. I use these facilities to move the messages and menus to a small screen inside my cockpit. Pete Pete
skino Posted July 24, 2015 Author Report Posted July 24, 2015 That's what I wanted to hear. Thanks for the good news and as always excellent support. :)
Pete Dowson Posted July 24, 2015 Report Posted July 24, 2015 That's what I wanted to hear. Thanks for the good news and as always excellent support. :) If you are using WideFS you may like to look at the Lua program I use for my internal cockpit display, which handles both 3380 text (for Radar Contact menus in my case), weather data for the route from ASN, and GSX prompts and menus. Here (line numbers just for reference of course, not part of code): colours = { 0x000, 0xfff, 0xf00, 0x0f0, 0x00f, 0xff0, 0xf0f, 0x0ff } doshow = 1 shown = 2 textset = false menuset = false time2 = 0 time3 = 0 timeclear2 = 0 timeclear3 = 0 w1 = wnd.open("Radar Contact", WND_FIXED, 1280,0,1024,768) wnd.backcol(w1, 0x000) wnd.textcol(w1, 0x0f0) wnd.font(w1, WND_ARIAL, 24, WND_BOLD) w2 = wnd.open("FSX Text", WND_FIXED, 1280,0,1024,100) wnd.backcol(w2, 0xfff) wnd.textcol(w2, 0x000) wnd.font(w2, WND_ARIAL, 17, WND_BOLD) w3 = wnd.open("FSX Menu", WND_FIXED, 1280,100,1024,668) wnd.backcol(w3, 0x88f) wnd.textcol(w3, 0x000) wnd.font(w3, WND_ARIAL, 17, WND_BOLD) ext.state("FSX Menu", EXT_HIDE) ext.state("FSX Text", EXT_HIDE) ext.state("Radar Contact", EXT_NRML) w1text = ipc.readSTR(0x3380,128) ipc.log(w1text) wnd.text(w1, w1text) local function testifclear() doshow = 1 if menuset or textset then doshow = 2 end if doshow ~= shown then if doshow == 1 then ext.state("FSX Text", EXT_HIDE) ext.state("FSX Menu", EXT_HIDE) ext.state("Radar Contact", EXT_NRML) wnd.clear(w1) wnd.text(w1, w1text) ipc.log("Showing RC") else ext.state("Radar Contact", EXT_HIDE) ext.state("FSX Text", EXT_NRML) ext.state("FSX Menu", EXT_NRML) ipc.log("Showing FSX Menus") end shown = doshow end end local function clearw2() wnd.clear(w2) textset = false testifclear() end function clearw3() wnd.clear(w3) menuset = false testifclear() end function textandmenu(mtype, colour, scroll, delay, id, n, msgs) doshow = 1 if mtype == 2 then -- Menu time3 = 0 if n == 0 then wnd.clear(w3) menuset = false testifclear() else menuset = true testifclear() wnd.clear(w3) wnd.text(w3, " " .. msgs[1]) wnd.text(w3, " ") wnd.text(w3, " " .. msgs[2]) wnd.text(w3, " ") i = 3 j = 1 while i <= n do wnd.text(w3, " " .. j .. " - " .. msgs[i]) i = i + 1 j = j + 1 if (j > 9) then j = 0 end end if delay ~= 0 then timeclear3 = delay * 1000 time3 = ipc.elapsedtime() end end else -- Text time2 = 0 if n == 0 then wnd.clear(w2) textset = false testifclear() else textset = true testifclear() wnd.textcol(w2, colours[colour+1]) wnd.backcol(w2, logic.Xor(colours[colour+1], 0xfff)) wnd.text(w2, msgs[1]) if delay then timeclear2 = delay * 1000 time2 = ipc.elapsedtime() end end end end ctr = 0 function time() ctr = ctr + 1 val = ipc.elapsedtime() if time2 ~= 0 and ((val - time2) > timeclear2) then clearw2() time2 = 0 end if time3 ~= 0 and ((val - time3) > timeclear3) then clearw3() time3 = 0 end if (ctr <= 2) then ipc.togglebitsUW(0x32FA,0xffff) elseif (ctr > 10) then ctr = 0 end end function update1(off, val) w1text = ipc.readSTR(0x3380,128) wnd.clear(w1) wnd.text(w1, w1text) end event.textmenu(0, "textandmenu") event.offset(0x3380, "STR", "update1") event.offset(0x32FA, "UW", "update1") event.timer(500, "time") testifclear() Sorry it's so comment-less. I'm not one for commenting my code much. Slows me down! ;-) Pete
skino Posted July 24, 2015 Author Report Posted July 24, 2015 Thanks Pete, the code I need to analyze and understand first. Peter
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now