Disable menu item

Mark Smith mark at maseurope.net
Wed Mar 28 19:27:46 EDT 2007


Charles, you might find it a bit more manageable to check the fields  
in a repeat loop:

put false into resultsExist
repeat for each item i in  
"vmiFld,nvmiFld,cmiFld,vdriFld,aciFld,sriFld,friFld,ariFld,liFld"
   if fld i of card "index" is not empty then put true into resultsExist
end repeat
if not allFieldsAreEmpty AND the short name of this cd is "index" then
   enable line 2 of btn "file"
   send mouseUp to button "export" of card "index"
else

etc....


Best,

Mark

On 29 Mar 2007, at 01:04, Charles Szasz wrote:

> Jim,
>
> I forgot to include my latest script:
> case "Export..."
>     if field "vmiFld" of card index > "" or field "nvmiFld" of card  
> index > "" \
>         or field "cmiFld" of card index > "" or field "vdriFld" of  
> card index > "" \
>         or field "aciFld" of card index > "" or field "sriFld" of  
> card index > "" \
>         or field "friFld" of card index > "" or field "ariFld" of  
> card index > "" \
>         or field "liFld" of card index > "" and name of card = card  
> "index"
>         then
>       enable line 2 of button "file"
>       send mouseUp to button "export" of card "index"
>     else
>       answer information "You must have some results before you can  
> export."
>     end if
>     break
> The script works except for the last part ----name of card = card  
> "index"
>
>
> Charles Szasz
> cszasz at mac.com
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list