<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />我有一個數字編輯框,當沒有指定任何內容時,我想為我的變數分配一個預設值,並提示一條訊息。 如果未指定任何內容(意味著用戶沒有在數字框中放置任何內容)並且我在偵錯器的“監視”視窗上查看我的變量,則它的值似乎為“。”但我無法獲得匹配(請參閱下面的腳本):
stepSize = 10;New Window( "", < V List Box( Panel Box( "Please specify", H List Box( Text Box( "Step " ), tBox = Number Edit Box( defaultStepSize ), Button Box( "OK", stepSize = tBox << Get; ) ) ) ) );If( stepSize == "." | stepSize == 0 | !Is Number( stepSize ) | stepSize == "" | Is Empty(stepSize), stepSize = 10; Beep(); New Window( "No Step Specified", < H List Box( Text Box( "Either No Step or 0 was specified! Will use the default of 10!" ), Button Box( "OK" ) ) ););
當沒有指定任何內容時,數字編輯框的回傳值是多少?
謝謝。 我不敢相信我錯過了“Is Missing”,因為我以為我嘗試了文件中提供的所有“Is What”。 哈哈。
如果(缺少(步長)== 1 |步長== 0 | !Is Number(步長)|步長== ”” |為空(步長),