Need Basic Apple Script Help

Discussion in 'Mac Programming' started by gumby777, Oct 13, 2007.

  1. gumby777 macrumors newbie

    Joined:
    Sep 22, 2007
    #1
    how would i have 2 dialog boxes and two text inputs in a scirpt like below so to appear like the normal username and password in mac os x. I barely know anything about this so you will have to describe it to me.


    repeat
    display dialog "Username:" default answer "" buttons "Ok" default button "Ok"
    if text returned of result is not "Administrator" then
    display dialog "Incorrect username" buttons "Ok" default button "Ok"
    else
    set theAnsr to text returned of result
    set ansr1 to the theAnsr
    display dialog "Password:" default answer "" buttons "Ok" default button "Ok" with hidden answer
    set theAnsr to text returned of result
    set ansr2 to the theAnsr
    set the clipboard to ansr2
    exit repeat

    end if
    end repeat
     
  2. Mekanik561 macrumors newbie

    Joined:
    Feb 10, 2007
    #2
    You could build something in Applescript Studio (Xcode) that would look more like the system's login, but that might be too complicated depending on what you want to do.
     
  3. gumby777 thread starter macrumors newbie

    Joined:
    Sep 22, 2007
    #3
    How would I do this with just using script editor (again keeping in mind that I don't know very much about this).
     

Share This Page