autoitty Posted November 17, 2007 Share Posted November 17, 2007 Just wondering if this is possible to implement or if it has already been implemented. Link to comment Share on other sites More sharing options...
autoitty Posted November 17, 2007 Author Share Posted November 17, 2007 Is this possible? Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 17, 2007 Share Posted November 17, 2007 Is this possible?Actually accessing the variable: No.But there are many techniques for sharing data between scripts:Writing to each other's controlsShared disk fileShared registry keyWM_COPYDATA messages (32bit number)Network portsEtc., 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 More sharing options...
autoitty Posted November 17, 2007 Author Share Posted November 17, 2007 So how would I go about doing this? I only have one number (ranging from 0-200) that I need multiple scripts to access. How would I store such a variable for accessing? Link to comment Share on other sites More sharing options...
Nahuel Posted November 17, 2007 Share Posted November 17, 2007 You can just write it to a file. The other scripts can check every now and then if such file exists. Once it does, read the values and do their thing. Link to comment Share on other sites More sharing options...
autoitty Posted November 17, 2007 Author Share Posted November 17, 2007 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 More sharing options...
autoitty Posted November 17, 2007 Author Share Posted November 17, 2007 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? Link to comment Share on other sites More sharing options...
martin Posted November 17, 2007 Share Posted November 17, 2007 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 thisSetshare ($variable);set up a variable to be shared, done by script which has the data to be read by other scriptsPublish($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 More sharing options...
Developers Jos Posted November 17, 2007 Developers Share Posted November 17, 2007 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 More sharing options...
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