Hi Guys
I’m a recent switcher and I need a simple applescript to solve a repetitive task and I’m happy to send $15 by paypal to anyone who cares to solve it for me with an applescript. I’m running an intel Mac with 10.4.10
I would like to run an applescript which will present me with a simple dialogue box. I will have three input fields.
Title:
Site URL:
Image URL:
So if I enter say Test Site into Title and http://www.anysite.com into Site URL and say http://www.anysite.com/image.jpg into Image URL the script will run and I will get output in the following format that I can copy to the clipboard.
a href=“http://www.anysite.com”>Test Site
<img src=“http://www.anysite.com/image.jpg"height="100"width="100”/>
Anyone Interested
Sorry if this is not the correct place for such horrid commercial offers
Hi and welcome,
normally you should post these requests on MacFreelancer, but this challenge is not very difficult.
In plain vanilla AppleScript it’s only possible to treat the text fields one by one
Try this, the result is copied automatically to the clipboard
set theTitle to text returned of (display dialog "Enter title" default answer "")
set siteURL to text returned of (display dialog "Enter Site URL" default answer "http://www.")
set imageURL to text returned of (display dialog "Enter Image URL" default answer siteURL & "/")
set the clipboard to "href=\"" & siteURL & "\">" & theTitle & "</a><br><img src=\"" & imageURL & "\"height=\"100\"width=\"100\"/>"
Beautiful, works like a dream. Email me your paypal account details and I’ll transfer straight away.
Many Thanks
In the future, commercial offers should be posted to MacFreelancer.
Edit: Also, in the future, please pick a more useful subject.