What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP] LPT1 code problems

Pages: (2): « First [ 1 ] 2 » Last »
[HELP] LPT1 code problems
Author: Message:
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. Shocked  [HELP] LPT1 code problems
Hi,   I'm kinda still learning to code, so be aware! my errors could be VERY BIG :P

the thing is,  i want to control the data pins on my LPT1 (parallel port)  so,  I'm using the io.dll as suggested by Themuzz  with the Command:  Call PortOut (888,1)

so, here's the code i use to activate a pin:

code:
Interop.Call("C:\TEMP\SCRIPTS\LPT!\io.dll", "Call PortOut", 888 , 1 );


i came to this after several attempts that the code was wrong and didn't allow the script to initialize..     now,  no errors appear,  but.......    the pin is still off...

I've checked it and this doesn't work...  the pin 2 doesn't turn on.. :(

so, my last chance is to ask someone here for help...

all i need is this code to work so i can get my code up and running...

i have it already working to start applications remotely,  but if i can make this work i could be able to turn on and off lights, radio, tv, heating, etc...

PS:  it also would be nice  if you could tell me whats the command to turn off one pin :P   

This post was edited on 07-07-2006 at 03:01 AM by novolo.
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
07-07-2006 03:00 AM
Profile PM Web Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
36 / – / –
Joined: Dec 2005
RE: [HELP] LPT1 code problems
Maybe in the path it should be LPT1 not LPT!?

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6669 days, 18 hours, 18 minutes, 42 seconds ago
07-07-2006 03:40 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [HELP] LPT1 code problems
quote:
Originally posted by cloudhunter
Maybe in the path it should be LPT1 not LPT!?

Cloudy
Ummm maybe thats the path to the file?

Did you actually code the DLL? if so if you put it in an exe does it work?
07-07-2006 03:45 AM
Profile E-Mail PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
31 / Male / Flag
Joined: Jan 2003
RE: [HELP] LPT1 code problems
I didn't know you could have spaces in function names...
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-07-2006 04:06 AM
Profile PM Web Find Quote Report
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
RE: [HELP] LPT1 code problems
quote:
Originally posted by ShawnZ
I didn't know you could have spaces in function names...

yeah, according to this site

http://www.geekhideout.com/iodll.shtml

the function is PortOut, you dont need the "Call "
[Image: clb2.jpg]
07-07-2006 04:49 AM
Profile E-Mail PM Web Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: [HELP] LPT1 code problems
ok, i got something from a web using io.dll but in VB,   the call the function PortOut with its proper value, like, port is integer and Data is byte
code:
Private Declare Sub PortOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Byte)


maybe i should do something like this but in jscript....

any ideas?
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
07-07-2006 12:09 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [HELP] LPT1 code problems
As Shawnz already suggested, the function is called "PortOut" not "Call PortOut".

"Call" is the command in VB to call/start functions, just as "Interop.Call" is in msgplus!' jscript...


----------

I'd also suggest to read the documentation for this DLL first (follow link given by CoolDude). Also you need to call IsDriverInstalled to make sure the other functions and procedures can be used. etc...

This post was edited on 07-07-2006 at 01:26 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-07-2006 01:16 PM
Profile PM Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: [HELP] LPT1 code problems
yeah, sorry,  my mistake...    anyways..     with the code like:

code:
Interop.Call("C:\TEMP\SCRIPTS\LPT!\io.dll", "PortOut", 888 , 1 );

it doesn't work...  :S

any ideas?
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
07-07-2006 02:05 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [HELP] LPT1 code problems
1) Make sure the driver is initialized and can be run. See previous post and read the documentation carefully.
2) Make sure your electronics work.
3) Make sure you readout the correct pin.
4) Make sure the lpt 1 port is at the address 0x378. Check your bios and Windows settings...
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-08-2006 11:08 AM
Profile PM Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: [HELP] LPT1 code problems
Ok,  i've checked everything except if the driver is initialized and can be run..    i don't know how...

i mean,  reading the scripting documentation is how i got this code...       i mean,  it should work with this right?
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
07-08-2006 04:54 PM
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On