badroot123456 发表于 2007-8-2 18:34:16

WR描述性编程产生的错误,请帮忙,谢谢!~!

为什么我下面的描述性编程不对呢
set_window("{class: window,label: Login}",3);
edit_set("{class: edit,attached_text: "Agent Name:"}","badroot");
password_edit_set("{class: edit,attached_text: "Password:"}","mercury");
button_press("{class: button,label: OK}");

报出的错误是
error in argument list ,line(2)
error in argument list ,line(3)
error in argument list ,line(4)

dionysus 发表于 2007-8-2 22:13:43

lz将描述性编程改为如下代码:
set_window("{class: window,label: Login}",3);
edit_set("{class: edit,attached_text: \"Agent Name:\"}","badroot");
edit_set("{class: edit,attached_text: \"Password:\"}","mercury");
button_press("{class: push_button,label: OK}");
当属性中要用到引号时,需在前面加上\做转义用,password_edit_set函数后面跟的是加密了的字符串,这里可以改为edit_set,最后button的class错了,应为push_button

badroot123456 发表于 2007-8-3 09:00:30

谢谢版主!~!

badroot123456 发表于 2007-8-3 09:07:12

请问下版主:
#Flight Reservation
set_window("{class: window,label: Flight Reservation}",4);
win_close("{class: window,label: Flight Reservation}");

我这里又错在哪里,运行后说: Syntax error!
还想问哪里有学习描述性编程的文档学习没?WR的联机帮助好象没看到

dionysus 发表于 2007-8-6 22:24:55

改为:
set_window("{class: window,label: \"Flight Reservation\"}",4);
win_close("{class: window,label: \"Flight Reservation\"}");

lantianwei 发表于 2007-8-7 09:12:09

up

kingdees 发表于 2007-8-9 18:46:06

sdlkfj9
页: [1]
查看完整版本: WR描述性编程产生的错误,请帮忙,谢谢!~!