Lazarus Long Posted April 23, 2013 Report Posted April 23, 2013 I apologize if this is double topic but I can't find any results for my question. I have Saitek X52 Pro and from time to time Saitek DirectOutput service stops working and I have to restart it via services.msc I do this with .bat file whille FSX is paused and my question is how can I run this .bat with FSUIPC? I read a lot for LUA and honestly....I do not know anything about that. My goal is to activate the bat with the joystick button. Thanks P.S I know to assign almost any key with FSUIPC. That part is clear fo me....I jus didn't know how to call that .bat or (I suppose) .lua script Do I must to enter any info about my order of FSUIPC or anything else to get support? Thanks
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 .I have Saitek X52 Pro and from time to time Saitek DirectOutput service stops working and I have to restart it via services.msc That's bad. Are Saitak planning to fix this? I assume you've reported it? I do this with .bat file whille FSX is paused and my question is how can I run this .bat with FSUIPC? To get some other program run whilst FSX is running you would need to use a Lua plug-in. The ext library can do it -- check ext.shell in the Lua lobrary documentation (all in the Lua plugins stuff installed in your FSUIPC Documents subfolder). You can initiate the action by button or key. I read a lot for LUA and honestly....I do not know anything about that.My goal is to activate the bat with the joystick button. The use of the ext.shell command is easy enough -- two parameters, one line of Lua. What more do you need to know? I know to assign almost any key with FSUIPC. That part is clear fo me....I jus didn't know how to call that .bat or (I suppose) .lua script When there's a Lua file in the modules folder you can assign a button to it in the dropdown. It is that easy. Why is the documentation for this so difficult for you? Pete
Lazarus Long Posted April 23, 2013 Author Report Posted April 23, 2013 That's bad. Are Saitak planning to fix this? I assume you've reported it? Frankly, I think this is not just the fault of Saitek. My hardware is relatively slow and this happen only with "heavy" add-ons like PMDG's Why is the documentation for this so difficult for you? Because English is not my spoken language and I have difficulties with understanding this type of "complex" guides even when I use Google translate So, LUA script/line will be: ext.shell("C:\Saitek.bat") ? One more question! I've noticed that FSX and FSUIPC didn't "see" two rotary dials and two buttons "Start - Stop" under LCD and you state that FSUIPC sees butons known for FSX But, in A2A's Joystick Configurator I'm able to assign commands to this buttons. FSUIPC can see left dial as Button 31 - others under LCD can't How is this posible for A2A utility? Why FSUIPC and FSX can' see this buttons?
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 So, LUA script/line will be: ext.shell("C:\Saitek.bat") ? Assuming that's the path to your BAT file, yes ... almost. You'd need ext.shell("C:\\Saitek.bat") i.e. a double \, because in Lua the \ character is used to say the next character is "special" (for example \n is new-line). \\ comes out as a single \. One more question! I've noticed that FSX and FSUIPC didn't "see" two rotary dials and two buttons "Start - Stop" under LCD and you state that FSUIPC sees butons known for FSXBut, in A2A's Joystick Configurator I'm able to assign commands to this buttons. FSUIPC can see left dial as Button 31 - others under LCD can't How is this posible for A2A utility? Why FSUIPC and FSX can' see this buttons? I don't know. Does A2A's utility perhaps read the USB frames, and not simply use the Windows joystick interface. With FSUIPC's Lua com and HID facilities you could write a script to do the same, but it isn't easy as you'd have to know how to decode the raw frames. Regards Pete
Lazarus Long Posted April 24, 2013 Author Report Posted April 24, 2013 I did this with vbs which executes .bat becuse I can't "silence" cmd window (it's primitive but for now I can't imagine anything smarter) Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\Saitek.bat" & Chr(34), 0 Set WshShell = Nothing I didn' t find examples for service restarting in vbs. I would be very grateful if you point me to example for restarting this service and starting SaiFlightSimX.exe because when I restart Saitek Direct Output this .exe also quits
Pete Dowson Posted April 24, 2013 Report Posted April 24, 2013 I didn' t find examples for service restarting in vbs. I would be very grateful if you point me to example for restarting this service and starting SaiFlightSimX.exe because when I restart Saitek Direct Output this .exe also quits Sorry -- I don't even know vbs so you are way ahead of me. I'd only be able to try to find out by googling. Pete
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