我尝试创建一个AppleScript,它读取文本文件并将内容放入列表中.该文件是一个简单的文本文件,其中每一行都如下所示:example-"example"
第一个是文件名,另一个是文件夹名.
这是我现在的代码:
set listOfShows to {}
set theFile to readFile("/Users/anders/Desktop/test.txt")
set Shows to read theFile using delimiter return
repeat with nextLine in Shows
if length of nextLine is greater than 0 then
copy nextLine to the end of listOfShows
end if
end repeat
choose from list listOfShows
on readFile(unixPath)
set foo to (open for access (POSIX file unixPath))
set txt to (read foo for (get eof foo))
close access foo
return txt
end readFile
Run Code Online (Sandbox Code Playgroud)
当我运行输出时,我得到这个:
error "Can not …Run Code Online (Sandbox Code Playgroud) 我在页面上有一个ASP登录控制框,它是自定义的.
在Login控件中,我们有用户名和密码文本框.
我想找到带有javascript函数的用户名和密码控件.
var Username= document.getElementById("<%=UserName.ClientID%>");
Run Code Online (Sandbox Code Playgroud)
但是这段代码没有编译并且给出了编译时错误
UserName not found in this context.
Run Code Online (Sandbox Code Playgroud)
如果我写客户端id:
var username = document.getElementById("login_LoginUser_UserName");
Run Code Online (Sandbox Code Playgroud)
它正确执行,但我想找到客户端ID,而不是在这里使用硬编码的ID.