Elementary Question, I'm sure...

vegastechvegastech Junior MemberPosts: 369
When I select a file to transfer to my controller, I always end up transferring a .tkn file. As I should. My question comes in here: When I compile my project, in the status tab of Netlinx Studio, I see a .axs file after compiling, and a compressed .src file. Shouldn't I be seeing a .tkn file instead?

Comments

  • trustworthytrustworthy Junior Member Posts: 74
    In File transfer, when you click Add..., you need to click on Compiled Netlinx Source Code to see the .tkn.
    The compressed .src is an archive file containing everything in your system (other than IR files) when it compiled, including any .AXIs and .AXSs. You can choose to build with or without this .src, but if you do it without, you cannot then extract any code from your master at a later date and edit the .AXS (similar to "Send Source Code" in AXCESS).

    If you navigate to the directory where you saved your AXS, this is where you will find the .tko, the .tkn and the .src.
  • vegastechvegastech Junior Member Posts: 369
    So then what I am seeing is considered normal?

    c:\laptop backup\amx\jvc\jvc Main.axs
    c:\laptop backup\amx\jvc\jvc Main.axs - 0 error(s), 0 warning(s)
    Compiled Code takes 2137011 bytes of memory --Token and Variable count is 802 (Maximum is 100000)

    Compressing Source Code Files...
    Created SRC file c:\laptop backup\amx\jvc\jvc main.src
  • trustworthytrustworthy Junior Member Posts: 74
    yup. :-)


    if you then go to file transfer, click Add, click Other (if you havent set up a workspace), click Compiled Netlinx Source Code, navigate to your directory, you'll see the .tkn, click OK, ensuring your addressing is 0:1:0, click OK, click send, , ....Robin's yer cousin's pappy.
  • PhreaKPhreaK Senior Member Posts: 966
    Yep the *.axs file shown in the status window refers the the project master file that was compiled. The *.tkn file which is transferred to your master is the compiled source.

    Edit:
    Damn it. Beat me to it :)
  • trustworthytrustworthy Junior Member Posts: 74
    PhreaK wrote: »

    Edit:
    Damn it. Beat me to it :)

    lol! :-D .
  • vegastechvegastech Junior Member Posts: 369
    Ok, I feel better now. Thanks!
  • vegastechvegastech Junior Member Posts: 369
    Another one...
    When I was in class I learned a trick to auto-increment a list of copied lines. I thought it was alt+highlighting the numbers to increment, but I can't for the life of me remember what the next step was. +, arrow down, can't remember!

    For this:

    TimeArray[1] = 1000
    TimeArray[1] = 1000
    TimeArray[1] = 1000
    TimeArray[1] = 1000
    TimeArray[1] = 1000

    I want to change each subsequent line to show 2,3,4,5.
  • trustworthytrustworthy Junior Member Posts: 74
    hilite what you want (alt+ click a column for example) then go to your edit menu, advanced, then renumber selection. it'll increment from the first number in your list by one until the end of your selection.
  • vegastechvegastech Junior Member Posts: 369
    Awesome, thanks!
  • vegastechvegastech Junior Member Posts: 369
    FOR loop...

    I never took C, so this is still fairly new to me...

    I want to create a FOR loop that will continue to check the status of a variable every second until it reaches Zero. This is what I have:
    FOR (nSleep=60; nSleep>0; nSleep--)
    {
        rest of code goes here
    } 
    
    I have the decrement info in the loop, but how do I tell it to re-check every second?
  • HedbergHedberg Junior Member Posts: 671
    vegastech wrote: »
    I never took C, so this is still fairly new to me...

    I want to create a FOR loop that will continue to check the status of a variable every second until it reaches Zero. This is what I have:
    FOR (nSleep=60; nSleep>0; nSleep--)
    {
        rest of code goes here
    } 
    
    I have the decrement info in the loop, but how do I tell it to re-check every second?

    That won't work because your loop will run real fast. Probably the best way to do what you want is to use a timeline which triggers every second. In the timeline event for that timeline, increment or decrement a variable. Look up timelines in the Netscape programming language manual to see how timelines work.

    If you want another way to do this which many people will frown upon and some will claim that it will cause a world-wide singularity:
    define_program
    
    if(some_variable = 0)
    {
      do_something()
    }
    
    wait 10
    {
      some_variable--
    }
    

    That would probably be the way to do this with an Axcent3. With Netlinx, using a timeline is preferred.
Sign In or Register to comment.