Variables Applescript-之间的随机数

Variables Applescript-之间的随机数,variables,random,applescript,Variables,Random,Applescript,我希望使用Applescript在设置的数字范围内随机显示一个数字,如: display dialog {random number between "100" , "250" , "310" , "356" , "401" ,} 无法理解“中间”是如何工作的。首先“100”不是一个数字,而是一个字符串 随机数仅在将中的起始值和结束值从和传递到参数时使用,例如 set x to random number from 1 to 100 要从任意数字列表中获取随机数,请使用some displa

我希望使用Applescript在设置的数字范围内随机显示一个数字,如:

display dialog {random number between "100" , "250" , "310" , "356" , "401" ,}
无法理解“中间”是如何工作的。

首先
“100”
不是一个数字,而是一个字符串

随机数
仅在将
中的起始值和结束值从
传递到
参数时使用,例如

set x to random number from 1 to 100
要从任意数字列表中获取随机数,请使用
some

display dialog (some integer in {100, 250, 310, 356, 401}) as text
首先,
“100”
不是一个数字,而是一个字符串

随机数
仅在将
中的起始值和结束值从
传递到
参数时使用,例如

set x to random number from 1 to 100
要从任意数字列表中获取随机数,请使用
some

display dialog (some integer in {100, 250, 310, 356, 401}) as text