Jump to content

Allowing multiple scrips access to the same variable, In real-time


autoitty
 Share

Recommended Posts

Is this possible?

Actually accessing the variable: No.

But there are many techniques for sharing data between scripts:

Writing to each other's controls

Shared disk file

Shared registry key

WM_COPYDATA messages (32bit number)

Network ports

Etc., etc., etc.

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I mean I need this number to be accessed/changed multiple multiple times in a matter of a second. Would it be fast enough to handle such a process? Perhaps I am not fully versed in the syntax. Can anyone provide a simple example of writing a number to a general text file or anything?

Link to comment
Share on other sites

Using the file method isn't working the way I'd hoped -- is there just a variable i can hijack that any script can access? Some generalized variable?

|Have at look at this example which shares data between up to 9 scripts. A later post in the same thread explains how it works.

Also, this thread has some examples.

Maybe what you need is a simple udf that does something like this

Setshare ($variable);set up a variable to be shared, done by script which has the data to be read by other scripts

Publish($variable) ; set the variable value to be read by other scripts

$shared = Getshare();set up reading the shared variable, done by a script which wants to read the value

$nowvalue = readshared($shared) update the value to the last published value

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • Developers

Just wondering if this is possible to implement or if it has already been implemented.

isn't that what you would use the Registry or INI file functions for ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...