am 2018-10-03 04:26 PM
am 2018-10-04 09:28 AM
For zeile=1 to maxzeile
For spalte=1 to maxspalte
input(ch,zeile,spalte,sys[zeile][spalte])
next spalte
next zeile
am 2018-10-04 11:39 AM
filename = "test_x.txt"
ch = OPEN( "DATA" , filename , "MODE=RO, SEPARATOR='|', LIBRARY" )
DIM cage_infos [][]
ay = 1
searchfield = "test*material_info"
nr = INPUT(ch, searchfield, 1, cage_infos[ay][1], cage_infos[ay][2], cage_infos[ay][3], cage_infos[ay][4], cage_infos[ay][5], cage_infos[ay][6],
cage_infos[ay][7], cage_infos[ay][8], cage_infos[ay][9], cage_infos[ay][10], cage_infos[ay][11], cage_infos[ay][12],
cage_infos[ay][13], cage_infos[ay][14], cage_infos[ay][15], cage_infos[ay][16] )
TEXT2 ay, 0.1 * 1, searchfield
TEXT2 ay, -0.1 * 0, cage_infos[ay][1]
TEXT2 ay, -0.1 * 1, cage_infos[ay][2]
TEXT2 ay, -0.1 * 2, cage_infos[ay][3]
TEXT2 ay, -0.1 * 3, cage_infos[ay][4]
TEXT2 ay, -0.1 * 4, cage_infos[ay][5]
TEXT2 ay, -0.1 * 5, cage_infos[ay][6]
TEXT2 ay, -0.1 * 6, cage_infos[ay][7]
TEXT2 ay, -0.1 * 7, cage_infos[ay][8]
TEXT2 ay, -0.1 * 8, cage_infos[ay][9]
TEXT2 ay, -0.1 * 9, cage_infos[ay][10]
TEXT2 ay, -0.1 * 10, cage_infos[ay][11]
TEXT2 ay, -0.1 * 11, cage_infos[ay][12]
TEXT2 ay, -0.1 * 12, cage_infos[ay][13]
TEXT2 ay, -0.1 * 13, cage_infos[ay][14]
TEXT2 ay, -0.1 * 14, cage_infos[ay][15]
TEXT2 ay, -0.1 * 15, cage_infos[ay][16]
FOR ay = 2 TO 4
searchfield = "test*cage_infos[" + STR(ay-1,1,0) + "]"
nr = INPUT(ch, searchfield, 1, cage_infos[ay][1], cage_infos[ay][2], cage_infos[ay][3], cage_infos[ay][4], cage_infos[ay][5], cage_infos[ay][6],
cage_infos[ay][7], cage_infos[ay][8], cage_infos[ay][9], cage_infos[ay][10], cage_infos[ay][11], cage_infos[ay][12],
cage_infos[ay][13], cage_infos[ay][14], cage_infos[ay][15], cage_infos[ay][16] )
TEXT2 ay, 0.1 * 1, searchfield
TEXT2 ay, -0.1 * 0, cage_infos[ay][1]
TEXT2 ay, -0.1 * 1, cage_infos[ay][2]
TEXT2 ay, -0.1 * 2, cage_infos[ay][3]
TEXT2 ay, -0.1 * 3, cage_infos[ay][4]
TEXT2 ay, -0.1 * 4, cage_infos[ay][5]
TEXT2 ay, -0.1 * 5, cage_infos[ay][6]
TEXT2 ay, -0.1 * 6, cage_infos[ay][7]
TEXT2 ay, -0.1 * 7, cage_infos[ay][8]
TEXT2 ay, -0.1 * 8, cage_infos[ay][9]
TEXT2 ay, -0.1 * 9, cage_infos[ay][10]
TEXT2 ay, -0.1 * 10, cage_infos[ay][11]
TEXT2 ay, -0.1 * 11, cage_infos[ay][12]
TEXT2 ay, -0.1 * 12, cage_infos[ay][13]
TEXT2 ay, -0.1 * 13, cage_infos[ay][14]
TEXT2 ay, -0.1 * 14, cage_infos[ay][15]
TEXT2 ay, -0.1 * 15, cage_infos[ay][16]
NEXT ay
close ch
am 2018-10-04 12:46 PM
am 2018-10-04 01:18 PM
UI_BUTTON UI_FUNCTION, "Import", 10, 30, 50, 20, 11im UI-Script
If GLOB_UI_BUTTON_ID=11 then
dat_sep='\t'
ch=OPEN("DATA","test.txt","MODE=RO,SEPARATOR=dat_sep, DIALOG")
FOR i=1 TO zeile
FOR j=1 TO spalte
nr=INPUT(ch,i,j,inh)
parameters feld[i][j]=inh
feld[i][j]=inh
NEXT j
NEXT i
CLOSE ch
am 2018-10-04 01:59 PM
erste Frage dazu: In welches Script kommt der Code?
Wenn ich den befehl open um dialog erweitere, so scheint dies nur im UI_Skript zu funktionieren (leider aber auch nicht immer...)
am 2018-10-04 02:02 PM
am 2018-10-05 08:29 AM
am 2018-10-05 10:17 AM
am 2018-10-05 12:26 PM
nr=INPUT(ch,searchfield,1,feld[i][1],feld[i][2],feld[i][3],feld[i][4],feld[i][5])
parameters feld[i][1]=feld[i][1],feld[i][2]=feld[i][2],feld[i][3]=feld[i][3],feld[i][4]=feld[i][4],feld[i][5]=feld[i][5]bringt das masterscript zum absturz? (Feld ist eine Ansammlung von Strings)