Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 30, 2013, 07:27 PM   #1
shurgie
macrumors regular
 
Join Date: May 2008
Location: LI
Simple Input Output Script

I'm just looking for a way to be able to enter 3 different variables a URL, a Number and a Platform.

I would then like the output to be URL&arcNumber%aPlatform

I tried making a few automator scripts and looking for a program or two but haven't been able to get it done right.
I would appreciate this being exported to the clipboard or a simple text edit window. I am using this to upload tracked URL's to my sites and it would be a lot easier with a script then copying and pasting on my own everytime.
__________________
If you feel like donating here's the link:

Donations accepted here
shurgie is offline   0 Reply With Quote
Old Jan 30, 2013, 08:27 PM   #2
dmi
macrumors member
 
Join Date: Dec 2010
#!/bin/bash
echo "enter a URL"
read URL
echo "ener a Number"
read Number
echo "enter a Platform"
read Platform
echo "$URL&arc$Number%a$Platform"
dmi is offline   0 Reply With Quote
Old Jan 30, 2013, 09:32 PM   #3
pitaya
macrumors member
 
Join Date: Jun 2012
If you want that to go to the clipboard:

Code:
#!/bin/bash 
echo "enter a URL"
read URL
echo "ener a Number"
read Number
echo "enter a Platform"
read Platform
echo -n "$URL&arc$Number%a$Platform" | pbcopy
pitaya is offline   0 Reply With Quote
Old Jan 31, 2013, 09:01 AM   #4
superscape
macrumors member
 
Join Date: Feb 2008
Location: East Riding of Yorkshire, UK
Or in AppleScript

Since you didn't specify a language, here's a way of doing it in AppleScript:

Code:
set theURL to text returned of (display dialog "Enter a URL" default answer "")
set theNumber to text returned of (display dialog "Enter a number" default answer "")
set thePlatform to text returned of (display dialog "Enter a platform" default answer "")

set the clipboard to theURL & "&arc" & theNumber & "%a" & thePlatform
superscape is offline   0 Reply With Quote
Old Jan 31, 2013, 11:56 AM   #5
shurgie
Thread Starter
macrumors regular
 
Join Date: May 2008
Location: LI
Thank you very much all! I will start checking them out now I appreciate all the help knew it was easy sometimes you just need another persons help!
__________________
If you feel like donating here's the link:

Donations accepted here
shurgie is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Tags
applescript, input, output, text

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:30 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC