Jump to content
Sign in to follow this  
Guest

Anybody got LPTswitch1 Woking - I keep getting an error

Recommended Posts

Guest

...I keep getting a Run-time error '5': Invalid procedure call or argument.I'm just wondering whether anybody has had this error?Best wishes,Darren

Share this post


Link to post
Share on other sites
Guest PoRrEkE

Jup people do get that error and i'll tell you why.The thing is: whatever you enter in the "lptswitch.ini"-file is partialy direct code from the software. Do something wrong in there and you'll get that error.So what's the sollution:First make sure ALL lines in your ini file are filled (so 40 lines with something)Try putting "P" or "S" at least.Then someone told me that the combo A1 as I pointed out does not change "checkbox 1".In order to know to which line of the ini file you must assign a key-command I suggest you to use the program with a "P" or "S" line on all 40 lines in the ini file. Then change the switch and check which checkbox changes. If e.g. checkbox5 changes, add the desired key-command in line 5 of the ini file.Hopefully this will help you out.Cheers,Philippe Vanagt

Share this post


Link to post
Share on other sites
Guest

Still no joy :-(I've tested the first 10 switches which do show up on the correct check box (including A1 - checkbox 1). This seems to suggest that the wiring is correct. But then I get the error.The .ini file appears correct - all 40 lines are present. I even did it through the programme. I kept it simple, each line shows Pa, Pb, Pc etc and when I got to z (line 26) the following line read Sa, Sb etc until I reached Sn (line 40).:-(Best wishes,Darren

Share this post


Link to post
Share on other sites
Guest PoRrEkE

I don't quite understand why you still get an error then.Can you let me know when exactly the error occurs? Still every time you hit a button or change a switch ???

Share this post


Link to post
Share on other sites
Guest

I get the same run time error code 5, and yes that would account for the fact that the .ini file is not correct. The problem is, I have been unable to create this .ini file. I did what the instructions said, ie:'Save the file first, to create the file, but when I press 'Load' or 'Save, the program just sits there. Any ideas?Also, when I open the help file, I just get an empty text box. I downloaded the v1.3, reloaded it twice with the same result. Any ideas?Thanks in advance to any replies on the post or direct email.Rob Fonhofrobfonhof@webprophets.net.auMelbourneAustralia

Share this post


Link to post
Share on other sites
Guest PoRrEkE

Check your default C:/ folder. The file should be there. When I make LPTswitch2 it will be located in the same folder as the program itself. Much cleaner but I couldn't figure out how to do this in VB6 :(Just open that file with a simple text editor like notepad.Also 'bout the help in the program itself: i never even started on making it for the simple reason that all info you need is inside the ReadMe.txtI should've removed that part in the program but I forgot :sThe LPTswitch2 will check if the ini file exists on startup, if it exist it will load it, if it doesn't exist it will make one. So that should work much better. Still gotta start making the .Net version though. Haven't found the courage yet to start coding that one.

Share this post


Link to post
Share on other sites
Guest

Sunday evening I finished wiring my interface for lpt switch, great! but trying to run this I had errors!!!!So although disapointed I was happy to hear other people had problems too with this!my interface at present leaves me with 40 pairs of wires, for now I have not wired to switches, but touch two wires together momentaraly is a push button, hold them together is a switch, this is not a finished product, but this will work!my system runs XP prof, with FS2002 prof.So, back to the errors, first I hit save to create file! yes I had a problem to find this, and yes it is in c: drive, but when I tried to save key configs using LPT program I found nothing had been saved in the config file, so I wrote my 40 lines into the file and saved from here, I ran LPT and great! no errors touched my wires together and ticks identified the switch NO.So, next thing was to try in flight sim, I assigned a few switches (wires) to different commands, but I cannot get my wires to make any thing happen, I have tried many different key combos but still I cannot get flight sim to respond!Any futher help will be of assistance!steve:-hmmm

Share this post


Link to post
Share on other sites
Guest PoRrEkE

The thing with the "fill out the ini file in the program should work like this"Each time you "add a line" this is put in an array (list of variables) and not directly into the ini file. Should be like this though, but I hope to be able to use a different GUI for the next version making all this much easier.Then after you think you're done, you need to do "file / save settings" again to write the current arrai into the ini file."save settings" does not only create an ini file but fills it as well.Glad to hear that you managed to get ridd of the errors though.Did you assign the same keys as you filled out in the ini file in fs ? I suppose so, but i wouldn't understand why else this doesn't work. The command I use in the code that gets triggered each time a checkbox changes sends out a key to the current program which has the "focus" .. so as you're flying FS, FS should have the focus .. ?Hey try this. Open up notepad instead of FS and set the cursor in there. Check if you can "type" something with your wires. You shouldn't use "F1" keys etc in that case.

Share this post


Link to post
Share on other sites
Guest

Sucess!!!!!Thanks for your reply, the idea of typing into the ini. file certainly saved some time, only to make LPT work I had to do very much differently to how your readme said, may be I miss read this ( I dont think so )however I am a plumber not a computer programmer! smile.I understood by reading the readme you could program LPT by either: typing the ini. file manualy, or by using LPT to do this for you, first, like I wrote before to get rid of the errors I had to complete the ini. file manualy, but to get the switches to work I had to run LPT, load the settings I had written, but also had to use LPT to go through every switch and use the 'add to file' button as well, after doing this then I got all to work in flight sim.I would like to take this opertunity to thank you for allowing other people to use something that as taken you some time and effort in producing, something that is not too expensive to make!I have emulated my keyboard so I can run switches from this too, but although I am touching wires together at present using LPT, your program is far more stable than my keyboard emulation, so again many thanks, I look forward to your new program!When I have time I will send you a picture of my interface, although I am not an electronics engineer it was quicker to use strip boards than peices of wood to make this, I hope this will help you for further work!Regards Steve:-)

Share this post


Link to post
Share on other sites
Guest PoRrEkE

nice to see another happy customer ;)i think the best advise i could give (seen what i had from peoples reactions) is to let the program first create an empty ini file, then edit that one manualy (textpad) and then each time when using the program, load it into lpt-switch.i planed on making a very much more simple interface for editing the ini file. however, VB6 didn't want to do what I planned for it to do :(anyway, I'll start on making the GUI (graphic user interface) for the LPTs2 (or maybe I'll call it "LPT-switch Reloaded" :(so it works for you and that's good news. enjoy ! :)PS: I was not the first to go the "LPT-way". However, I re-invented it and was the first to make it freeware :( I absolutely think that us SimPitBuilders DO NOT need another expensive sollution for switches. There was an urgent need for something freeware.

Share this post


Link to post
Share on other sites
Guest

FANTASTIC!!I didn't realise that you had to LOAD the settings before you used the programme.I thought you simply saved the settings in the *ini file and then ran the programme; I didn't realise that you had to LOAD it back in again!!Many thanks, Steve, for your comments. Like you I have been using bare wires to make the contact. I had to make sure it worked before I spent more money on switches :-)And of course many many thanks to Phillipe for a wonderful and cheap solution for adding switches.Does anybody know how to add in LEDs for each switch? Best wishes,Darren

Share this post


Link to post
Share on other sites
Guest PoRrEkE

For LEDs you should go the FSBus way. Also freeware but you gotta make some PCB prints yourself :scheck out their site:www.fsbus.dethere's pelnty to read 'bout that on this forum.cheers

Share this post


Link to post
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
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...