Announcement

Collapse
No announcement yet.

DAY/NIGHT solution with NCS

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

  • DAY/NIGHT solution with NCS

    Ok people, I know netsuo will implement day/night skinning but since Iīve found that NCS is very powerfully and shure because of the performance Iīm going to use this solution probably in future too

    I used the Gamma Panel, which for example I noticed, 'Road Runner' is using too.
    1. At first we need the gapa.exe, gapa.ini and gapa.log placed in the MAIN directory of NMC.
      http://www.kaiserv.de.....gapa.rar
      For example in: C:\Programme\neocar media center\
    2. Then we have the NCS files.. Sorry for the code.. but Iīam a dirty php and jsp coder... To place somewhere in the NMC 'scripts' folder
      http://www.kaiserv.de.....gapa_ncs.rar
      For example in: C:\Programme\neocar media center\scripts\Gamma_Control\
    3. Now you only have to correct the NCS files if our NMC directory donīt match and associate the NMC_Day_Night.NCS to a button or an area in NSW.

    if you made everything correct, day/night will work well


    and now to the description of the scripts...

    NMC_Gapa_Start.NCS
    Code:
    Set WSHShell = CreateObject("WScript.Shell") 
    WSHShell.Run """C:\Programme\neocar media center\gapa.exe"""
    Donīt need to be associate with something.. starts automatically the gapa.exe on NMC_START.


    NMC_Gapa_Close.NCS
    Code:
    Set WSHShell = CreateObject("WScript.Shell")
    WSHShell.Run "taskkill /IM gapa.exe /F",0
    Donīt need to be associate with something.. kills automatically the gapa.exe on NMC_CLOSE.


    NMC_Day_Night.NCS
    Code:
    Dim objFileSystem, objInputFile, objOutputFile
    Dim strFile, inputData, stat0, stat1 
    
    stat0="status=day"
    stat1="status=night"
    
    strFile = "gapa.log"
    
    Set objFileSystem = CreateObject("Scripting.fileSystemObject")
    Set objInputFile = objFileSystem.OpenTextFile(strFile, 1)
    
    
    inputData = Split(objInputFile.ReadAll, vbNewline)
    objInputFile.Close
    
    Set objOutputFile = objFileSystem.CreateTextFile(strFile, TRUE) 
    Set WSHShell = CreateObject("WScript.Shell")
    
    if inputData(0) = stat0 then
    	objOutputFile.WriteLine("status=night")
    	WSHShell.SendKeys"^%n"
    elseif inputData(0) = stat1 then
    	objOutputFile.WriteLine("status=day")
    	WSHShell.SendKeys"^%d"
    else msgbox"bull****, your log file is corrupted"
    end if
    
    objOutputFile.Close
    Set objFileSystem = Nothing
    Ok, maybe I used some dirty methods to get the status of day and night..Like reading and writing a log file.. but this is all I know about VBS.. and maybe netsuo will improve it.. perhaps based on one file and using something like Sessions...

  • #2
    Very nice

    good to see NCS being useful

    When i get some time (doesn't seem like i ever will anymore ) i'll release the Sync NCS script.

    All it does is look for new or changed files from the pc to a networked pc.

    it's for when im in the car i hit the button and it downloads the new music from my home to the carpc through wifi.

    it is a bit useless for people without wifi unless they plug a network cable from the car to the house lol

    But good work mate
    CarPC Status:
    GPS: 99%
    Hardware: 99%
    Software: 92%
    Case Install: 99.9%
    Dash Install: 100%
    Car Install: 72%

    Comment


    • #3
      Karifan, you're my hero !

      That's what i call a big script. Really cool man. Thanks for your work !!!
      NS - neocar suite
      -----------------
      http://www.neocarmediacenter.com

      Comment


      • #4
        Right! NCS are very useful!

        Sound interresting NiN^_^NiN but likewise to be hard coded!
        And thanks netsuo! I will try to learn more about VBS to help you, to make NMC more powerfully. īcause I like it

        Comment


        • #5
          Originally posted by karifan
          Right! NCS are very useful!

          Sound interresting NiN^_^NiN but likewise to be hard coded!
          And thanks netsuo! I will try to learn more about VBS to help you, to make NMC more powerfully. īcause I like it
          For good ideas look at WSH (windows script host) scripts it uses VBscript to do alot of stuff on the pc like run batch files etc.

          This is basiclly what NCS is so anything you download in WSH will work in NCS

          it's good to check it as there are some useful things you can do and this will give u ideas and code
          CarPC Status:
          GPS: 99%
          Hardware: 99%
          Software: 92%
          Case Install: 99.9%
          Dash Install: 100%
          Car Install: 72%

          Comment


          • #6
            thanks for info NiN^_^NiN
            the MSDN and WSH are really helpful sources

            Comment


            • #7
              I'll shortly make a NCS section in www.neocarmediacenter.com for your selfmade scripts
              NS - neocar suite
              -----------------
              http://www.neocarmediacenter.com

              Comment

              Working...
              X