Make applescript display terminal prompts

Hi,
I new to applescript, and am trying to to automate some terminal commands. At one point, the user is required to enter information to complete the command in the terminal. Is there a way that I can either show the terminal, or set some sort of display to display the prompts?
Thanks!

Would I be able to request that info and then place it into the terminal prompt?
Sure.
set username to text returned of (display dialog "Enter your username" default answer "Joe")
set password to text returned of ("Enter your password" default answer "" with hidden answer)
set theURL to "http://www.site.com/page.html"
do shell script "curl -u "& username & ":" & password & space & theURL
The idea here is to prompt the user for the data and combine the answer(s) with the static text that's passed to the shell.

Similar Messages

  • How to make Terminal prompt change permanent?

    I am using OS X Lion v10.7.2 and want to change my terminal prompt, but everytime I shutdown and restart Terminal, it defaults back to the original.
    I am using
    export PS1="\w >"
    Thanks

    If it exists, its in your Home Directory
         ls .bash_profile
    If you get
          ls: .bash_profile: No such file or directory, then just create it with:
              echo PS1='\w >' >> .bash_profile

  • Terminal prompt starts with client IP Address

    I named my macbook pro as "pine" and add the following line to the .bash_profile file
    export PS1='\h:\w> '
    Normally, it displays "pine:~>", but after I connect my laptop to the wireless network via a VPN, the prompt becomes
    client-77-104-71-149:~>
    Why does the terminal prompt look so weird? How to change it back to normal?

    The issue occurs on a daily basis for about 100 laptops that are normally docked to a wired connection (subnet 10.2.3.x), but when undocked the laptop transitions to a wireless connection (10.2.5.x).  When initially docked, a laptop connected to
    a wired connection will properly negotiate with DHCP all four parts of the handshake in the classic way and get an IP address (10.2.3.101 for example). 
    The problem begins about 5 - 10 minutes later when the same laptop makes a DHCPDiscover with a source address of 10.2.3.101 and destination address of 255.255.255.255.  This continues every 10 minutes or so until the laptop is undocked or taken off
    the wire.  It only acquires on additional address once, but if we delete it off the DHCP server, then it reacquires the bad, additional lease. 
    When the laptop reach 50% of its lease life or later (undocked and returned the next day), it make a DHCPRequest for 10.2.3.101 from source address 0.0.0.0 to destination address 255.255.255.255.  It then reacquires the lease like normal. 
    Yes, the docking and undocking will move them between subnets by changing the interface.  If we disable the wireless adapters while the laptop is docked, it stops sending DHCPDiscover packets from source address 10.2.3.101 to destination address 255.255.255.255. 
    When we reenable the wireless adapters, then the bad behavior starts up again.  We see this in Wireshark packet captures and the DHCP client logging.  None of the events or strings have from the logs have either given us an explantion or solution. 
    Thanks again,
    Mark

  • As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

    As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

    As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

  • I installed CS6 on my new retina MacBook pro laptops. InDesign and Acrobat display document pixilated. I ran the updates and it fixed Illustrator and Photosho, but not InDesign and Acrobat. What can I do to make them display in high resolution? HELP!

    I installed CS6 on my new retina MacBook pro laptops. InDesign and Acrobat display document pixilated. I ran the updates and it fixed Illustrator and Photosho, but not InDesign and Acrobat. What can I do to make them display in high resolution? HELP!

    InDesign CS6 is not optimized for retina displays. You’ll need to move to Creative Cloud for retina compatibility.

  • Displaying a prompt on report's initial load

    Hi,
    I know that in WebI I can set a prompt to be displayed when the data is refreshed but that's not what I wish to accomplish at the moment.  What I want to do is to display a prompt when the report is first loaded. 
    Example:  As soon as the user opens the report, he's prompted  with something like "Filter report with year <operator> <year>"".
    Thanks for the help,
    Joaquim

    Joaquim,
    Kuldeep gave you the correct answer.  You wrote:
    Example: As soon as the user opens the report, he's prompted with something like "Filter report with year <operator> <year>"".
    What you want is the local filter for the tab to apply a prompt based upon the data cached to that specific report (i.e. you want to save a report with the "refresh on open" off, but prompt on the static data).  No can do.  The prompt feature actually stages to construct an SQL statement, which in turns fires off a new query.  There is no other prompt capability.
    Thanks,
    John

  • IE11 - Crystal Reports - PrintMode ActiveX now displaying PDF prompt (instead of printer prompt)

    I asked this question over at stackoverflow and am now taking it here: http://stackoverflow.com/questions/20672254/ie11-crystal-reports-printmode-activex-now-displaying-pdf-prompt-instead-of
    It's a simple straight-forward question.  IE11 is breaking the ActiveX plug-in used for printing from the Crystal Report Viewer.  All the pretty pictures are in the link I provided.  But the jist is that for my ActiveX Print Mode reports, the PDF dialog is presented now instead of the normal Printer dialog (unless I use Compatibility Mode)
    Other details:
    I am using the Crystal Reports that comes with Microsoft Visual Studio 2008.  For the life of me I can't remember how this got installed on one of my browser's (maybe an install from Visual Studio?) ... but I've been deploying the Crystal Print Control 10.5 (32-bit; version: 10.5.1.2285).
    And as mentioned in the stackoverflow post I have all ActiveX settings enabled and ActiveX Filtering off.

    Hi William,
    Moved your post to the .NET SDK forum.
    CR for VS 2008 was included in the installer of Visual Studio, you can remove it from Add/Remove Programs.
    Unfortunately the CR Basic that comes with VS 2008 only had one patch released and that's it. IE 11 was not released when it came out so we could not support it.
    Currently there are no versions of CR or our SDK packages that do support it.
    Crystal Reports Developer for Visual Studio SP 9 will support IE 11. You can get it from the Overview Tab and then on the left side. But it requires VS 2010 or above and SP 9 will support VS 2013 and IE 11.
    In VS you could select either ActiveX or PDF:
    I don't have IE 11 but to change the PDF go into the Add-ins menu:
    See this link for supported OS's and VS's:
    http://wiki.sdn.sap.com/wiki/x/b4JiAw
    Also, IE 11 is likely on Windows 2008 Server or possibly Window 8.x.
    Best thing to do is upgrade VS and then download the CR installer into VS so it supports current OS's and Browsers.
    Don

  • Can I use Hot Corners to make the display sleep immediately?

    I have Hot Corners set up so that the screen-saver kicks in as soon as I move the mouse to the top-right corner. However, I'd really like to be able to make the display sleep immediately, rather than show the screen-saver first... can I do that? There doesn't seem to be a Hot Corners option for "Display sleep".

    Hi Garth
    That can be set using expose.
    Open up preferences /dashboard & expose.
    Click on one of the buttons to set your option to start screen saver by choosing the corner you wish to use.
    Message was edited by: Glenn Leblanc
    Sorry, misread your message the first time. Can't be done with hot corners.

  • How to make the display of custom column names in UWL(not bother abt values

    Hi all
    i want to make the display of custom column names in UWL ( for example GP)
    i dont want or not looking about values for those custom columns . i know that thru custom connector we can achieve to retrieve the values for those custom columns. but currently i am looking only just to display the custom column names( for example GP custom column names, just i want to display the name of the columns ) in UWL .
    Thanks
    Sunil

    Hello Prashant,
    You can add the control to your custom pagelayout, the following article has an example:
    http://spandps.com/2012/02/22/showing-the-audience-target-field-in-an-editmodepanel-sharepoint-sp2010-in-projectserver-ps2010/
    Btw, the SPFieldTargetToControl has a required property:
    http://msdn.microsoft.com/en-us/library/microsoft.office.server.webcontrols.fieldtypes.spfieldtargettocontrol.required(v=office.14).aspx
    - Dennis | Netherlands | Blog |
    Twitter

  • Why does my terminal prompt look like this?

    Today I noticed that my Terminal prompt now looks like this:
    *pranaymishra:~ tbarth$*
    Any idea how that happened? There's nothing in the .profile that does this.
    -Travis

    The computer name is 'Travis', and always has been.
    Hmmm...
    Further investigating shows a computer by that name on the network with a different IP address. The DHCP server shows my IP address as associated with my computer name, 'Travis'.
    So could this be an OS X network error where it's picking up the computer name from something like WINS or DNS and not updating it if the IP lease changes? And if so, why does it not simply use the given name specified by the user instead?
    As far as the network is concerned, my computer name is 'Travis', as it should be.
    -Travis
    EDIT: BTW, 'Use dynamic global host name' is not enabled.
    Message was edited by: Travis B

  • TS4123 I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    The results show that you have a proxy server set and this can often cause problems with iTunes.
    The proxy setting can be accessed in Internet options>>Connections>>LAN Settings.
    Try un-checking the proxy server check box.
    It might also be a good idea to run a malware check if you didn't know you had the proxy server set.
    You can download a free version of an excellent scanner- Malwarebytes here:
    http://www.malwarebytes.org/

  • I am trying to load a calpatch to a program called Caldera, but i keep getting the following "AppleScript Error – Terminal got an error:apple event timed out ( -1712)" my IOS is Yosemite, and i am running the latest version of the caldera program

    I am trying to load a calpatch to a program called Caldera, but i keep getting the following “AppleScript Error – Terminal got an error:apple event timed out ( -1712)” my IOS is Yosemite, and i am running the latest version of the caldera program

    Hi Linc, thanks for this ... it is weird, we tried this previously, but we only did a restart.
    This morning our Mac was 'off' even though we hadn't turned it off, (maybe a power outage) I restarted and ran the calpatch immediately, and it worked !!
    it is embarrassing, because as a service engineer, I am always telling customers to restart and even power down completely before trying again.
    Thanks.
    Snakeydee

  • How to return terminal prompt to default?

    I've recently noticed my terminal prompt seems to indicate the IP address of my cable router.
    I say recently, since I did have some Internet problems which were solved after powering down the router and removing the battery for a few minutes. Since then, the prompt has been:
    Last login: Mon Dec 26 18:27:44 on ttys000
    d24-235-195-133:~ user$
    Is there a way to return it to a 'default' prompt, and second, why did it change?
    Many thanks.

    MrHoffman is 100% correct.  Disk Utility repair permissions, verify (or even repair) have absolutely nothing to do with the prompt you are getting.
    And reinstalling Mac OS X will change nothing, as the problem, as MrHoffman explained, has nothing to do with your Mac.  It is your router and/or your ISP.
    The bash shell always does a reverse DNS lookup on your Mac's IP address to get your computer name.  The Mac's DNS lookup service does not get a result from the DNS servers, it will use your computer name as specified in System Preferences -> Sharing.  In your case, prior to restarting your cable modem, the DNS lookup did not return anything, so your sharing computer name was used.  After the cable modem restart, the DNS lookup started returning a result so bash used that information.
    Chances are it is a lot more work than it is worth trying to get the DNS lookup to stop returning a value, so it is easier to just change your PS1 shell variable and get on with life.
    You could even use the following to always get your sharing computer name
    PS1='$(networksetup -getcomputername):\W \u\$ '

  • Trying to make double clickable Terminal Shell Script - total Novice here

    Short version: How do I make a text file of terminal commands executable?
    Backgound: I am running OS 10.4.11 and the shell that runs under terminal is Bash. I know almost nothing about Unix and scripts and such, so don't assume anything when giving instructions.
    Long Version: I have a terminal program I found called jhead where my only need for it is its ability to change the exif's "orientation" tag in photos. I already figured out how to get jhead into my /usr/bin directory so it is executable from any directory in Terminal.
    So here is the command I run in terminal simply to check the orientation tag of all the photos in my photo work directory:
    jhead -v ~/Desktop/temp\ Photos/*.jpg | grep -i orien
    All it does is reads the exif info for the photos but filtered to only show the orientation tag. These photos are in the folder "temp Photos" on my desktop. So it works fine.
    I read that to make a simple terminal shell script you can make a simple text document, add the extension .command and now you can double click it and it will run any commands in Terminal. I used text edit to create a plain text blank file in that folder. I then used pico in terminal to put the command into the file and saved it.
    The file has the right icon, but when I double click it I get this error:
    The .command file ‘/Users/Dad/Desktop/temp Photos/orientation_normal.command’ could not open. Most likely it is not executable.
    and then when I ok out of that error box, Terminal opens and that is about it.
    Assistance?
    Thanks,
    Patrick
    p.s. I want to add a couple more lines to the script so the script will first check the status of all files, change them all, then recheck them. I can then eye ball the terminal window and make sure everything looks correct. But for now I am starting with just the single command to first prove I can make a double-clickable script.

    D'oh. So easy. I had used that command on the program files itself, jhead, but it never even occurred to me to use it on the .command text file.
    I got the script working and fleshed it out with the other commands and now it does all the fixing of all the photos in the folder with one double-click. Super!
    Thanks!
    Patrick

  • Computer Name changes at Terminal prompt when connected to network

    When I connect to the network at my client my terminal prompt changes from:
    MyComputer:~ john$
    to:
    companynetwork:~ john$
    I don't log in to their network, I just connect to LAN and get an IP address assigned by DHCP.
    What gives?
    Disclaimer: I'm a recent convert from MS so you'll have to explain things to me as if I was a 5 year old.
    Thanks!
    Message was edited by: Hardbap

    found an explanation here:
    http://forums.macosxhints.com/archive/index.php/t-70445.html

Maybe you are looking for