将passCode设置为“I'mTheBitCoinMinerr” 显示对话框“要访问以下页面,您需要输入密码”默认答案“在此输入密码”按钮{“提交”}默认按钮1 将passInput设置为返回结果的文本 如果passInput是passCode那么 显示对话框“已授予访问权限”按钮{“继续”}默认按钮1 重复 显示对话框“你想取消吗?”按钮{“取消”,“继续”} 显示对话框“此页面是我的linkz页面
Page navigation.
Where do you want to go?
Answers:
Canvasrider
Youtube
Instagram" default answer "Enter a valid answer here" buttons {"OK"} default button 1
set pageNav to text returned of result
if pageNav is "Canvasrider" then
display dialog "Link to my Canvasrider profile: canvasrider.com/users/thestuntmaster125
Page navigation.
Where do you want to go?
Answers:
MinecraftForum
Planetminecraft
Back" default answer "Enter a valid answer here" buttons {"OK"} default button 1
else if pageNav is "Youtube" then
display dialog "Link to my YouTube profile: http://www.youtube.com/channel/UCUPOC8-sCiqIMtrA5Yw4fMA
Page navigation.
Where do you want to go?
Answers:
MinecraftForum
Planetminecraft
Back" default answer "Enter a valid answer here" buttons {"OK"} default button 1
else
display dialog "Link to my Instagram profile: Instagram.com/mcaddict125
Page navigation.
Where do you want to go?
Answer:
MinecraftForum
Planetminecraft
Back Enter a valid answer here" buttons {"OK"} default button 1
end if
结束重复
否则 显示对话框“拒绝访问”按钮{“确定”}
结束如果
^^^从上到下“结束如果”是我未完成的密码锁定链接页面代码,其中包含指向其他网站上我的个人资料的链接。但每当我尝试编译/运行它时,它会显示“预期的行尾等但发现未知令牌”并且我的代码看起来有效!我是Applescript的新手,所以如果答案很简单,我不会感到惊讶。谢谢你的时间!
答案 0 :(得分:0)
尝试:
set passCode to "I'mTheBitCoinMinerr"
display dialog "To access the following page, you need to enter your password" default answer "Enter password here" buttons {"Submit"} default button 1
set passInput to text returned of result
if passInput is passCode then
display dialog "Access granted" buttons {"Continue"} default button 1
repeat
display dialog "Do you wish to cancel or not?" buttons {"Cancel", "Continue"}
pageNav to text returned of (display dialog "This page is my page of linkz
Page navigation.
Where do you want to go?
Answers:
Canvasrider
Youtube
Instagram" default answer "Enter a valid answer here" buttons {"OK"} default button 1)
if pageNav is "Canvasrider" then
display dialog "Link to my Canvasrider profile: canvasrider.com/users/thestuntmaster125
Page navigation.
Where do you want to go?
Answers:
MinecraftForum
Planetminecraft
Back" default answer "Enter a valid answer here" buttons {"OK"} default button 1
else if pageNav is "Youtube" then
display dialog "Link to my YouTube profile: http://www.youtube.com/channel/UCUPOC8-sCiqIMtrA5Yw4fMA
Page navigation.
Where do you want to go?
Answers:
MinecraftForum
Planetminecraft
Back" default answer "Enter a valid answer here" buttons {"OK"} default button 1
else
display dialog "Link to my Instagram profile: Instagram.com/mcaddict125
Page navigation.
Where do you want to go?
Answer:
MinecraftForum
Planetminecraft
Back Enter a valid answer here" buttons {"OK"} default button 1
end if
end repeat
else
display dialog "Access denied" buttons {"OK"}
end if