2014-05-09 2 views
0

런타임에 코드를 추가하고 추가하려고합니다.런타임시 코드를 추가하고 추가하는 방법은 무엇입니까? - livecode

예 : 이 코드는 나를 위해 부여 됨으로써 코드를 표시 할 수 있습니다 런타임에

on opencard 
     emptyvariable 
     ------------------------- 
     put "test" into TestV << This line 
    end opencard 

    command selectvdofile 
     answer file "Select Video file" 
     put it into fld "txt_namefile" 
     put it into namefile 
    end selectvdofile 

사람을 코드를 추가 한 후

on opencard 
    emptyvariable 
end opencard 

command selectvdofile 
    answer file "Select Video file" 
    put it into fld "txt_namefile" 
    put it into namefile 
end selectvdofile 

이 코드 실행

에 코드를 추가하기 전에 무엇입니까?

답변

0

다음은 예입니다. 테스트하기 전에 스택을 저장하는 것이 가장 좋습니다!

on mouseUp 
    local tScript, tLine 

    put the script of card "MyCard" into tScript 
    put lineOffset("end opencard", tScript) into tLine 

    if tLine > 0 then 
    put format("put \"test\" into TestV") & LF before line tLine of tScript 
    set the script of card "MyCard" to tScript 
    end if 
end mouseUp 
+0

정말 고마워요! – KemChat

관련 문제