Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How to i turn code into an exe??

  1. #1
    Newbie thenick100's Avatar
    Join Date
    Jan 2006
    Posts
    51

    Question How to i turn code into an exe??

    Hi there, I have the following code

    Dim objComport

    Set objComport = CreateObject ( "ActiveXperts.Comport" )

    objComport.Device = "COM1" ' Set comport
    HardwareFlowControl = 0 ' HW Flow control off, manually
    control the HW lines
    objComport.Open ' open the serial port
    objComport.RaiseDTR ( 1 ) ' activate dtr pin

    Which is a vb script to turn on the dtr pin of my serial port... How to i turn this into an executable?! Thanks, Nick

  2. #2
    Emo
    Emo is offline
    Variable Bitrate
    Join Date
    Nov 2005
    Location
    Orlando, FL
    Posts
    310
    you would need Visual Basic to compile the code and make it into a EXE...

  3. #3
    Newbie thenick100's Avatar
    Join Date
    Jan 2006
    Posts
    51
    hmmm.. dont have that! Could anyone possibly compile it for me and send it to me please?

  4. #4
    Emo
    Emo is offline
    Variable Bitrate
    Join Date
    Nov 2005
    Location
    Orlando, FL
    Posts
    310

    Sure...

    since I got nothing to do.. here it is..lol

    By the way, I didnt know if you want to run the exe and then press a button to activate it, or you just want to run the exe and the command to be run on start up automatically ..so I did a button just in case

    I dont know if you that's what you want but here:
    Attached Files Attached Files

  5. #5
    Mobile Impact Creator reddeath30's Avatar
    Join Date
    Mar 2005
    Location
    Fontana, California
    Posts
    1,142
    Quote Originally Posted by thenick100
    Hi there, I have the following code

    Dim objComport

    Set objComport = CreateObject ( "ActiveXperts.Comport" )

    objComport.Device = "COM1" ' Set comport
    HardwareFlowControl = 0 ' HW Flow control off, manually
    control the HW lines
    objComport.Open ' open the serial port
    objComport.RaiseDTR ( 1 ) ' activate dtr pin

    Which is a vb script to turn on the dtr pin of my serial port... How to i turn this into an executable?! Thanks, Nick
    To compile it, there also needs to be a reference in it to the Active X control, and it would need to be present on the compiling machine. What does this do exactly/whats this for/and where did this code come from?
    Mobile Impact
    Highly innovative car computer multimedia/entertainment system software.
    http://mobileimpact.biz.tm

  6. #6
    Emo
    Emo is offline
    Variable Bitrate
    Join Date
    Nov 2005
    Location
    Orlando, FL
    Posts
    310
    hehe.. well then forget my try.. lol unless he gives me the ActveX control but still I wouldn't be sure how to use it soooooo.. sorry.. I tried..lol

    -Emo

  7. #7
    Newbie thenick100's Avatar
    Join Date
    Jan 2006
    Posts
    51
    Right basically all it does is turn on the dtr pin on the serial port so i can use this signal to switch a transistor and turn on my amps, so emliminating amp pop on turn on... I want to put it in the startup folder so it starts with windows, then continues running until shutdown, when it stops and the amps turn off again. Its a version of this Windows Service that raises DTR on powerup which a guy made before. The program has since vanished so i emailed a guy who makes serial toolkit to give me that code to activate the dtr pin! Hope that explains it a little better!

  8. #8
    Emo
    Emo is offline
    Variable Bitrate
    Join Date
    Nov 2005
    Location
    Orlando, FL
    Posts
    310
    Ok I get you now.. but like reddeath said, you still need to give us an ActiveX control that will be integrated into the exe..

    -Emo

  9. #9
    Newbie thenick100's Avatar
    Join Date
    Jan 2006
    Posts
    51
    Whats one of those when its at home? I vaguely know about them from web design but how does work in this instance? Basically i need to kno what you need and where to find it! Sorry for being completely lost when it comes to coding!

  10. #10
    FLAC SFiorito's Avatar
    Join Date
    May 2004
    Posts
    1,364
    doesn't need to be compiled....just open notepad, enter that code, save the file as "whatever.vbs".

Page 1 of 2 12 LastLast

Similar Threads

  1. 12V PSU lead to remote amp turn on?
    By temposs in forum General Hardware Discussion
    Replies: 0
    Last Post: 01-12-2006, 09:39 AM
  2. AMP wont turn ON!! HEELP!
    By pdjafari in forum Car Audio
    Replies: 1
    Last Post: 10-15-2005, 08:43 PM
  3. Replies: 3
    Last Post: 10-08-2005, 06:31 PM
  4. PC wont turn on....
    By Cheekz185 in forum General Hardware Discussion
    Replies: 0
    Last Post: 08-18-2005, 01:27 PM
  5. Replies: 5
    Last Post: 02-04-2005, 11:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •