Jump to content
The simFlight Network Forums

event textmenu not catching everytime gsx menu


Recommended Posts

1 hour ago, Sabrefly said:

the windows come up ok but no messages are displayed neither from GSX nor from PATC/X (menus are OK) 

You are not reading all of my messages! The results you are getting means that the Lua program has crashed. I told you:

"Always check the Log file (in the same folder) to see if any errors occurred. "

Do that, please. Surely it isn't hard to find a file and look at it, even show the contents here so I can see why?

Pete

 

Link to comment
Share on other sites

1 hour ago, Pete Dowson said:

You are not reading all of my messages! The results you are getting means that the Lua program has crashed. I told you:

"Always check the Log file (in the same folder) to see if any errors occurred. "

Do that, please. Surely it isn't hard to find a file and look at it, even show the contents here so I can see why?

Pete

 

Sorry, I didn't realize it crashed! (if it really did)  Below is the log:

********* WideClient Log [version 6.999z2] Class=FS98MAIN *********
Date (dmy): 15/11/16, Time 20:26:20.734: Client name is LENA
      141 LUA: "C:\MSFS\WideClient\Initial.LUA": not found
      203 Attempting to connect now
      203 Trying to locate server: Protocol not yet decided
      203 Failed to connect: waiting to try again
     2203 Attempting to connect now
     4203 Server = I6
     4203 Trying TCP/IP host "I6" port 8002 ...
     4203 ... Okay, IP Address = 192.168.3.67
     4203 Connection made okay!
     4281 Connection closed by server!
     4281 Attempting to connect now
     8328 Server = I6
     8328 Trying TCP/IP host "I6" port 8002 ...
     8328 ... Okay, IP Address = 192.168.3.67
     8328 Connection made okay!

   297031 ****** End of session performance summary ******
   297031 Total time connected = 288 seconds
   297031 Reception maximum:  25 frames/sec, 779 bytes/sec
   297031 Reception average whilst connected:  23 frames/sec, 610 bytes/sec
   297031 Transmission maximum:  2 frames/sec, 85 bytes/sec
   297031 Transmission average whilst connected:  0 frames/sec, 28 bytes/sec
   297031 Max receive buffer = 823, Max send depth = 2, Send frames lost = 0

   297031 ********* Log file closed (Buffers: MaxUsed 4, Alloc 7682 Freed 7682 Refused 0) *********

 

Thanks,

Igor.

Link to comment
Share on other sites

12 minutes ago, Pete Dowson said:

Not the WideClient log. When you use plug-ins on WideClient they each make their own log, with their name.

Pete

 

But there are no other logs (textmenu.log?) in WideClient folder.  Sorry, I wish I knew what I did wrong?

Thanks

Igor

 

Link to comment
Share on other sites

Sorry again, this is the log:

********* LUA: "textmenu" Log [from WideClient] *********
Date (dmy): 15/11/16, Time 20:15:47.218: Client name is LENA
     5719 LUA: beginning "C:\MSFS\WideClient\textmenu.lua"
     5812 LUA: 
     5937 LUA: Showing RC
    18453 LUA: Showing FSX Menus
    47875 LUA: ended "C:\MSFS\WideClient\textmenu.lua"
********* LUA execution terminated: Log Closed *********

********* LUA: "textmenu" Log [from WideClient] *********
Date (dmy): 15/11/16, Time 20:17:30.171: Client name is LENA
     5719 LUA: beginning "C:\MSFS\WideClient\textmenu.lua"
     5812 LUA: 
     5937 LUA: Showing RC
    20719 LUA: Showing FSX Menus
    45156 LUA: ended "C:\MSFS\WideClient\textmenu.lua"
********* LUA execution terminated: Log Closed *********

********* LUA: "textmenu" Log [from WideClient] *********
Date (dmy): 15/11/16, Time 20:26:30.500: Client name is LENA
     9797 LUA: beginning "C:\MSFS\WideClient\textmenu.lua"
     9812 LUA: 
     9828 LUA: Showing RC
    44281 LUA: Showing FSX Menus
    93875 LUA: Showing RC
    96953 LUA: Showing FSX Menus
   103391 LUA: Showing RC
   107000 LUA: Showing FSX Menus
   113391 LUA: Showing RC
   117047 LUA: Showing FSX Menus
   124891 LUA: Showing RC
   127094 LUA: Showing FSX Menus
   133406 LUA: Showing RC
   137141 LUA: Showing FSX Menus
   143391 LUA: Showing RC
   147156 LUA: Showing FSX Menus
   297047 LUA: ended "C:\MSFS\WideClient\textmenu.lua"
********* LUA execution terminated: Log Closed *********

(the bottom part of it)

Thanks,

Igor.

PS: Another one I did just a minute ago:

********* LUA: "textmenu" Log [from WideClient] *********
Date (dmy): 16/11/16, Time 00:08:18.937: Client name is LENA
     5422 LUA: beginning "C:\MSFS\WideClient\textmenu.lua"
     5485 LUA: 
     5610 LUA: Showing RC
    17485 LUA: Showing FSX Menus
   110188 LUA: ended "C:\MSFS\WideClient\textmenu.lua"
********* LUA execution terminated: Log Closed *********
 

 

Edited by Sabrefly
Link to comment
Share on other sites

6 minutes ago, Pete Dowson said:

Okay. It isn't crashing then. And it thinks it is displaying things. Additionally, changing the bit for window w2 (the FSX message window) won't affect the others, so I think something else is now wrong. Perhaps you should show me the Lua program, as it is now.

Pete

 

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, 0,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, 0,0,1024,100)
wnd.backcol(w2, 0xfff)
wnd.textcol(w2, 0x000)
wnd.font(w2, WND_ARIAL, 10, WND_BOLD)

w3 = wnd.open("FSX Menu", WND_FIXED, 0,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))
          x = 80  --my example of how many characters you want, max
mycopy = msgs[1] --make a copy for me to use
len = string.len(mycopy)
if len > x then
   --need to split
   mycopy = string.sub(mycopy,1,x) .. '\r' .. string.sub(mycopy, x+1)
end
wnd.text(w2, n, mycopy)


           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()

 

Thanks,

Igor

 

 

Link to comment
Share on other sites

Done. Same result, no text visible, windows and menus OK, same log.


********* LUA: "textmenu" Log [from WideClient] *********
Date (dmy): 16/11/16, Time 00:24:55.968: Client name is LENA
     5437 LUA: beginning "C:\MSFS\WideClient\textmenu.lua"
     5500 LUA: 
     5625 LUA: Showing RC
    35000 LUA: Showing FSX Menus
   139531 LUA: ended "C:\MSFS\WideClient\textmenu.lua"
********* LUA execution terminated: Log Closed *********

Please take your time, no worries.

Many thanks,

Igor.

Link to comment
Share on other sites

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, 0,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, 0,0,1024,100)
wnd.backcol(w2, 0xfff)
wnd.textcol(w2, 0x000)
wnd.font(w2, WND_ARIAL, 10, WND_BOLD)

w3 = wnd.open("FSX Menu", WND_FIXED, 0,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 + 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))
          x = 80  --my example of how many characters you want, max
mycopy = msgs[1] --make a copy for me to use
len = string.len(mycopy)
if len > x then
   --need to split
   mycopy = string.sub(mycopy,1,x) .. "\r" .. string.sub(mycopy, x+1)
end
wnd.text(w2, n, mycopy)


           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()

Link to comment
Share on other sites

10 minutes ago, Sabrefly said:

Please take your time, no worries.

The only way I can work out why it isn't working is to test it on my own system. But I'm in the middle of rebuilding that at the moment on a new PC. Unfortunately the suppliers put Windows 10 on it (no choice offered) and that is causing me no end of headaches and loss of sleep.

I've been trying to replace Win10 with Win7 (which I like a lot better and never had any problem with), but I'm having no success with that yet either. The booting of the Win7 installation needs USB drivers which I have but which it won't read!

So, sorry, I've no idea when i can get you your problem. If you don't hear from me in a week, send a reminder.

Pete

 

Link to comment
Share on other sites

7 minutes ago, Pete Dowson said:

The only way I can work out why it isn't working is to test it on my own system. But I'm in the middle of rebuilding that at the moment on a new PC. Unfortunately the suppliers put Windows 10 on it (no choice offered) and that is causing me no end of headaches and loss of sleep.

I've been trying to replace Win10 with Win7 (which I like a lot better and never had any problem with), but I'm having no success with that yet either. The booting of the Win7 installation needs USB drivers which I have but which it won't read!

So, sorry, I've no idea when i can get you your problem. If you don't hear from me in a week, send a reminder.

Pete

 

I'm happy with what I've got already, thank you SO MUCH!

Windows10 works perfect here, but I use these as initial guide lines (particularly #1 video):

 

FSX-SE and P3D work perfect with Win10 to my taste

Thanks,

Igor.

Edited by Sabrefly
Link to comment
Share on other sites

3 minutes ago, Sabrefly said:

FSX-SE and P3D work perfect with Win10 to my taste

Well, I can't get SimConnect working across the network between any of my other PCs (all on Win7 Pro) and this PC which is on Win 10 Home. That's the main problem. And it's crucial. Once that's fixed the other problems I can probably fix.

`Pete

 

Link to comment
Share on other sites

25 minutes ago, Pete Dowson said:

Well, I can't get SimConnect working across the network between any of my other PCs (all on Win7 Pro) and this PC which is on Win 10 Home. That's the main problem. And it's crucial. Once that's fixed the other problems I can probably fix.

`Pete

 

I had the same problem trying to connect ASNEXT on Win7 Client to Win10 Main PC. It took me going through all HiFi's suggestions, a lot of reboots including router, but eventually it worked. I think I put down my notes on how I did it.

Igor.

Edited by Sabrefly
Link to comment
Share on other sites

1 hour ago, Sabrefly said:

I had the same problem trying to connect ASNEXT on Win7 Client to Win10 Main PC. It took me going through all HiFi's suggestions, a lot of reboots including router, but eventually it worked. I think I put down my notes on how I did it.

I don't mind with AS16 because I run that on the FS PC in any case. But I'm using a Network of 6 PCs for my cockpit, and the SimConnect connection is used to at least 3 of those for applications such as Prosim737, ProATC/X and FS-FlightControl (or Aivlasoft's EFB -- I use them interchangeably). The setup's dead in the water if I can't make that work.

I've never had any trouble between Win7 PCs  or Win7 and XP. I know all the ins and outs of the SimConnect.xml and SimConnect.cfg files. There's something else going on here and it's driving me crazy.

So, if you do have some suggestions, please, I'd love to see them!

Pete

 

Link to comment
Share on other sites

For P3D/FSX-SE I use 1xWin10 Pro (Server) with 2xWinXp Clients and 1xWin7x64 Client (with ASN earlier, now AS2016). I can clearly remember that setting up to connect ASN from Win7x64 (Simconnect!) took UNUSUAL amount of time and I did it too many times before to know better. Was it tinkering with Windows Firewall? I can't remember now. In any case I would suggest you to upgrade to Wn10 Anniversary first. Also my Win10 is Pro version, but it should not make any difference in this case, but you might want to try it (Anniversary update). Otherwise I could roll back to vanila P3Dv3.2 with Acronis and try to repeat the process if you're interested.

Thanks,

Igor.

PS: I'm really happy with my 'barebone' Win10x64 performance, thanks to my friend at DCS who insisted I upgraded to Win10 rather than going back to Win7 end of last year when I upgraded my hardware. I'm on i7 6700k @4.6Ghz 8Gb x 3000Mhz RAM, TitanX

Link to comment
Share on other sites

34 minutes ago, Sabrefly said:

For P3D/FSX-SE I use 1xWin10 Pro (Server)

Ah, yes. That might explain it. They installed the Home edition -- I think most system builders use Home. All my Win7 installations are Ultimate. I figure one of the biggest differences for me has been the ease of getting networks uo and running properly.

So, I'm just upgrading the Home edition of Wn10 to Pro at the moment. (You can do that in situ, from settings, it seems, using a Microsoft Store account).

39 minutes ago, Sabrefly said:

I would suggest you to upgrade to Wn10 Anniversary first.

Not heard of that one. Is that above or below Professional?

40 minutes ago, Sabrefly said:

I'm on i7 6700k @4.6Ghz 8Gb x 3000Mhz

This is similar, but they set the clock for 4.4GHz instead. I was hoping for 4.6. It's with a 1080 video card and, yes, 3000Mhz RAM (but they put 16Gb in, which is a bit of overkill). However, I'm very pleased with the performance on the few tests I've done so far -- a lot faster than my ex-current one of 3 years vintage, even though that's clocked at 4.5Ghz --  but I might ask them what the problem was going higher than 4.4. Did you overclock it yourself? This is an Asus Z170 Pro Gaming mobo.

Pete

 

 

 

Link to comment
Share on other sites

Aaaarrrrggghhh! The upgrade doesn't work! Takes several minutes, reboots, gets near 100%, then says it couldn't do it and that it's undoing it all!

Checked with the suppliers and they confirmed there were issues with upgrading in situ, and that the only way was a re-install from disk or USB stick! Grrr. This means I'm back to square one, with another 48 hpurs work, minimum! :-(

They did say they clocked it to their "maximum safe" level but I was welcome to try a bit more and it wouldn't invalidate the warranty (5yrs, worth having!).

So, by system is going to be off for probably at least another week.

Pete

[LATER]

Microsoft Tech Support have tried to do the upgrade too, and failed. They've escalated it and they'll cann me back on Friday (I'm out all day tomorrow). What a fiasco! You'd think this Windows stuff would be pretty smooth and advanced by now!

 

Link to comment
Share on other sites

1 hour ago, Pete Dowson said:

Aaaarrrrggghhh! The upgrade doesn't work! Takes several minutes, reboots, gets near 100%, then says it couldn't do it and that it's undoing it all!

Checked with the suppliers and they confirmed there were issues with upgrading in situ, and that the only way was a re-install from disk or USB stick! Grrr. This means I'm back to square one, with another 48 hpurs work, minimum! :-(

They did say they clocked it to their "maximum safe" level but I was welcome to try a bit more and it wouldn't invalidate the warranty (5yrs, worth having!).

So, by system is going to be off for probably at least another week.

Pete

 

What is your cooler? Mine is Corsair 110i, it keeps temps below 70 @4.6GHz at extreme loads which is absolutely safe for this generation of CPU. Yes I overclocked it myself, same Z170 chipset on ASRock mobo, I believe it's ASUS derivative.

Thanks,

Igor.

PS: Anniversary Update: 

http://www.howtogeek.com/248177/whats-new-in-windows-10s-anniversary-update/

https://support.microsoft.com/en-us/help/12387/windows-10-update-history

 

 

Edited by Sabrefly
Link to comment
Share on other sites

37 minutes ago, Sabrefly said:

What is your cooler? Mine is Corsair 110i, it keeps temps below 70 @4.6GHz at extreme loads which is absolutely safe for this generation of CPU.

Corsair Hydro H80i V2 cooler. I think my temp stays much lower at present, but I'll check when it's under load.

Pete

 

 

Link to comment
Share on other sites

  • 2 months later...
On 11/16/2016 at 0:45 AM, Pete Dowson said:

The only way I can work out why it isn't working is to test it on my own system. But I'm in the middle of rebuilding that at the moment on a new PC. Unfortunately the suppliers put Windows 10 on it (no choice offered) and that is causing me no end of headaches and loss of sleep.

I've been trying to replace Win10 with Win7 (which I like a lot better and never had any problem with), but I'm having no success with that yet either. The booting of the Win7 installation needs USB drivers which I have but which it won't read!

So, sorry, I've no idea when i can get you your problem. If you don't hear from me in a week, send a reminder.

Pete

 

 

Pete, when you have a minute, please look into the code above. I need messages to scroll down instead of disappearing beyond the right frame of the window.

 

Thanks,

Igor. 

PS: the code works OK, but the text does not scroll down, it just goes away beyond the right border of the window 

Link to comment
Share on other sites

4 minutes ago, Sabrefly said:

Pete, when you have a minute, please look into the code above. I need messages to scroll down instead of disappearing beyond the right frame of the window.

The messages are just as they are. If they don't fit, they don't fit. What GSX messages are the problem? I have never had a problem reading them. Is your window very small.

BTW you seem to have quoted something from me completely disconnected from your question, and there is no "code above".

Pete

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.