Solved

Applescript that directs user depending on text input

Posted on 2006-06-30
3
983 Views
Last Modified: 2013-12-26
does anyone know how to create an Applescript that will go to a certain page based on the users input into a text field?

Basically I would like a dialog box with a text field, once a user enters "aaa" they would go to index001.html, if they entered "bbb" they would go to index002.html etc...
0
Comment
Question by:arobquinna
  • 2
3 Comments
 
LVL 24

Accepted Solution

by:
slyong earned 500 total points
ID: 17136486
Hi,

I am surprised no one take on this... here's a basic idea:

tell application "Finder"
       activate
       display dialog "Where do you want to go today?"
                default answer "aaa"
       set dialogInfo to result
       set gowhere to text returned of dialogInfo
end tell
tell application "Safari"
       activate
       if gowhere is equal to "aaa" then
               open location "http://www.yourdomain.com/index001.html"
       end if
end tell
0
 

Author Comment

by:arobquinna
ID: 17141731
Thank you Slylong,

I was able to build exactly what I needed with this example.  I was begining to think I was on the "pay no mind list", your help is greatly appreciated.
0
 
LVL 24

Expert Comment

by:slyong
ID: 17142589
No worries.  Just feel sorry for not able to answer you earlier.  I didn't have the time to test out the scripts and thought that someone would pick it up but had a look at it yesterday and decided to hack up the script. :D  Thanks for the points
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question