jp888 Posted August 5, 2014 Share Posted August 5, 2014 Hi everyone! So apologies if this is a crazy question, but I'm having a little trouble understanding how to pass data between scripts. In my first php script, I successfully copy a url to the clipboard (that works great). What I'd like to do now is pass that url onto the second PHP script so I can use it in another way. 1. I'm not quite sure how to have the second script run AFTER the first one. 2. I'm not sure what variable to use to pass the output on, I know it's not {query}, but is there something similar? Link to comment
rice.shawn Posted August 5, 2014 Share Posted August 5, 2014 So, do you actually want to copy to clipboard and display notification with one script and then use the base URL passed through another script to display in large type, or is the large type up there just as an example as to how to split it? Link to comment
jp888 Posted August 5, 2014 Author Share Posted August 5, 2014 Large type is just example, and to show what is being outputted from the second script. What I'd love to do is pass exactly what I copy through to the keyboard - through to the second script, which must run after the first script. Thanks Shawn Link to comment
rice.shawn Posted August 5, 2014 Share Posted August 5, 2014 In the copy to clipboard action, you can check a box that will automatically paste the new clipboard contents to the frontmost app. Is that what you're trying to do? If that's the case, you don't even need to write another script. Link to comment
jp888 Posted August 5, 2014 Author Share Posted August 5, 2014 Nope, the second script is using using the Hipchat API and posting the URL to one of the rooms - so I need the URL to use as the message content. Any ideas? Link to comment
rice.shawn Posted August 5, 2014 Share Posted August 5, 2014 What is the API call? What you can do is just put the function to call the api in that new "script.php" file, and then run the functions one after another. Anything that is output to STDOUT (basically, what you echo or print) will get copied into the clipboard, but all other functionality can happen elsewhere. Link to comment
jp888 Posted August 5, 2014 Author Share Posted August 5, 2014 Ah, great idea - will do it all in the same script! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now