Hirdetés

Keresés

Új hozzászólás Aktív témák

  • Snoop-y

    veterán

    válasz cigam #41648 üzenetére

    Koszonom az iranymutatast :R
    Quick actionben talaltam ra megoldast :C

    set prompt_text to "Please enter password for the zip file"

    repeat

    set zip_password to text returned of (display dialog prompt_text default answer "" with hidden answer)

    set verify_password to text returned of (display dialog "Please verify your password." buttons {"OK"} default button 1 default answer "" with hidden answer)

    considering case and diacriticals

    if (zip_password = verify_password) then

    if (zip_password ≠ "") then

    exit repeat

    else

    set prompt_text to "Password cannot be empty. Please enter password for the zip file"

    end if

    else

    set prompt_text to "Password mismatched, please try again. Enter password for the zip file"

    end if

    end considering

    end repeat



    tell application "Finder"

    set the_items to selection

    set items_to_zip to ""

    repeat with each_item in the_items

    set each_item_alias to each_item as alias

    set item_name to name of each_item_alias

    set item_name to quoted form of (item_name & "")

    set items_to_zip to items_to_zip & item_name & " "

    end repeat

    set first_item to (item 1 of the_items) as alias

    set containing_folder to POSIX path of (container of first_item as alias)

    set zip_name to text returned of (display dialog "Enter the zip file name (without the .zip extension)" default answer "")

    set zip_file_name to quoted form of (zip_name & ".zip")

    end tell



    do shell script "cd '" & containing_folder & "'; zip -x .DS_Store -r0 -P '" & zip_password & "' " & zip_file_name & " " & items_to_zip

  • Snoop-y

    veterán

    válasz cigam #41648 üzenetére

    Szia,

    Az elso ketto kilove mert ez a parancs amit irtam titkositja is a file-t.

    Szoval valami olyasmi kellene, hogy azon a fileon hajtodjon vegre amire rakattintok jobb klikkel es ott a tarolt task/script lefut es vagy automatikusan hasznalja a filenevet vagy rakerdezzen.

Új hozzászólás Aktív témák

Hirdetés