Jump to content

Making Global Variables...More GLOBAL!


 Share

Recommended Posts

Allrighty then! Here is what i'm trying to do, and I think this would be kind of nice. I suppose what I am looking to do is somewhat of a Function on crack.

I have one script that contains a TON of Case Select statements. We'll call this script 1.exe

I want to be able to run a script, well call that script 2.exe, and have it ask script 1.exe for some information, then have script 1 pass that information back to script 2.

Think of it like a flat file database. All my data is in Script 1, and I want to be able to make calls to it with script 2.

I figured I can do this with the clipboard command, have each script ask for information from the clip board, then put the information requested back into the clip board for the other program to grab it, but i'm hoping there is a better way.

your thoughts?

THANKS

Link to comment
Share on other sites

well you could use clipboard, and even format the data so that multiple bits of inforamtion are passed, I do that with my Access database. I simply paste in a Pipe delimited record in. ex:

Name|Address|City|State|Zip

The other option is to simply use a file. I have one program that looks at file dates, and when it changes, it executes the rest of the script loading that file for information.

You could use a flat text file, or the handy INI files.

if you like, have the one monitor the clipboard for say "Go Go data" if it finds it, it reads the INI file, and changes the clipboard to "Read, thanks."

Use your flat file database, Ini, or whatever.

You could also get creative and have a secret keyword and give the temp file in there. Say monitor the file for "Go Go Data=c:\temp\myfile.txt" then parse the clipboard by removing the "Go Go Data=" portion and tada there is your file to use. :)

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

I wrote a little VB app that allowed me to interface two seperate scripts. It was a form and 4 text boxes (txtScript1In, txtScript1Out, txtScript2In, txtScript2Out) then I also made a little include file that I used in both scripts to interface with the intermediate application. If I find it lying around here somewhere I will post it otherwise I hope I gave enough info to recreate it.

*** Matt @ MPCS

Link to comment
Share on other sites

All these are awesome sugestions..well, at least the ones I understood! and i'm sure the rest are too.

I think clipset and clipget are going to be the best for what i'm doing, then using a pipe | to seperate variables and using stringsplit to an array.

The Envget and set command seems kind of bulky for what i'm doing. I don't want to have to create environment variables.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...