質問

I want to add code and append it on runtime.

Example: This code is before adding code on runtime

on opencard
   emptyvariable
end opencard

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

This code is after adding code on runtime

    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

Anyone can show exmple code for me ?

役に立ちましたか?

解決

Here's an example. Best to save your stack before testing!

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top