Announcement

Collapse
No announcement yet.

How to i turn code into an exe??

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    you would need Visual Basic to compile the code and make it into a EXE...

    Comment


    • #3
      hmmm.. dont have that! Could anyone possibly compile it for me and send it to me please?

      Comment


      • #4
        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

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              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 http://www.mp3car.com/vbulletin/show...ws+service+dtr 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!

              Comment


              • #8
                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

                Comment


                • #9
                  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!

                  Comment


                  • #10
                    doesn't need to be compiled....just open notepad, enter that code, save the file as "whatever.vbs".
                    EWF, HORM, MinLogon on XP.

                    Zotac ION Atom N330, 2GB low-profile RAM, M3-ATX
                    Win Embedded Std 2011 RC
                    OCZ Vertex Turbo 30GB SSD
                    Lilliput 629 Transflective, WRX Screen Mount
                    BlueSoleil BT, i-Blue GM-2 GPS, DirectedHD Radio, Andrea Mic
                    VoomPC 2

                    Comment


                    • #11
                      Really? So i can just put that in the startup folder and it will work?

                      Comment


                      • #12
                        yes, or double-click it.
                        EWF, HORM, MinLogon on XP.

                        Zotac ION Atom N330, 2GB low-profile RAM, M3-ATX
                        Win Embedded Std 2011 RC
                        OCZ Vertex Turbo 30GB SSD
                        Lilliput 629 Transflective, WRX Screen Mount
                        BlueSoleil BT, i-Blue GM-2 GPS, DirectedHD Radio, Andrea Mic
                        VoomPC 2

                        Comment


                        • #13
                          Awesome, then is that the right code? it did have a wait command, then a turn off serial port at the end but it just deleted it because i want it to stay on until the program is stopped on shutdown... do i need to put a loop command in? or will that keep the signal going until shutdown?

                          Comment


                          • #14
                            not sure how that COM object you're using works...you may need to put a wait or sleep command at the end to keep the script running... http://msdn.microsoft.com/library/en-us/default.asp enjoy!
                            EWF, HORM, MinLogon on XP.

                            Zotac ION Atom N330, 2GB low-profile RAM, M3-ATX
                            Win Embedded Std 2011 RC
                            OCZ Vertex Turbo 30GB SSD
                            Lilliput 629 Transflective, WRX Screen Mount
                            BlueSoleil BT, i-Blue GM-2 GPS, DirectedHD Radio, Andrea Mic
                            VoomPC 2

                            Comment


                            • #15
                              Mmm Mmm good. nothing like VB scripts being run by a privileged user.

                              Comment

                              Working...
                              X