Durnt Posted September 20, 2016 Share Posted September 20, 2016 (edited) Is there any way to send variables/values to a script via parameters during runtime? My current setup is to have a main script that always runs. This script basically sits in the background. After 1 minute, it reads text files (made via a second script), parses out the values, averages them per sensor, and posts to Thingpseak. The secondary script does not permanently run but instead runs via Eventghost when Eventghost gets GET requests from the sensors. I am looking to see if there is a way I could just have Eventghost send the parameter straight to the primary script while it is running, thus removing the need to write to files/have multiple scripts. EDIT: I just realized I could have Autoit process GET requests to do this. Doh. Point still stands though, is there a way to send values to a running script without inputboxes or reading from files? Edited September 20, 2016 by Durnt Link to comment Share on other sites More sharing options...
Anoop Posted September 20, 2016 Share Posted September 20, 2016 I doubt if I understood the requirement clearly. But a tricky way to pass data between different scripts is to set data to clipboard and retrieve data from clipboard. Link to comment Share on other sites More sharing options...
jchd Posted September 20, 2016 Share Posted September 20, 2016 Search the forum for IPC (Inter-Process Communication). There exist several efficient methods to achieve what you need. Using the clipboard isn't one of them. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Durnt Posted September 20, 2016 Author Share Posted September 20, 2016 didn't know a good term to look for, thanks for the info Link to comment Share on other sites More sharing options...
jchd Posted September 20, 2016 Share Posted September 20, 2016 IPC This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
AutoBert Posted September 20, 2016 Share Posted September 20, 2016 If first Script has a GUI you could use ControlSend. But in everyc ase TCP is possible. Link to comment Share on other sites More sharing options...
argumentum Posted September 20, 2016 Share Posted September 20, 2016 1 hour ago, Durnt said: EDIT: I just realized I could have Autoit process GET requests to do this. Doh. Point still stands though, is there a way to send values to a running script without inputboxes or reading from files? https://www.autoitscript.com/forum/topic/106710-mailslot/ Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Anoop Posted September 20, 2016 Share Posted September 20, 2016 4 hours ago, jchd said: Search the forum for IPC (Inter-Process Communication). There exist several efficient methods to achieve what you need. Using the clipboard isn't one of them. That's why I mentioned it as a tricky way. Link to comment Share on other sites More sharing options...
jchd Posted September 20, 2016 Share Posted September 20, 2016 You mean "certain to fail miserably at any time"? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Durnt Posted September 23, 2016 Author Share Posted September 23, 2016 On 9/20/2016 at 3:24 AM, argumentum said: https://www.autoitscript.com/forum/topic/106710-mailslot/ That is very useful. It is much better than what I had planned argumentum 1 Link to comment Share on other sites More sharing options...
Anoop Posted September 23, 2016 Share Posted September 23, 2016 On 9/20/2016 at 5:40 PM, jchd said: You mean "certain to fail miserably at any time"? It can fail, only if it is interrupted by some other clipboard copy. - That is why it is tricky and even a newbie can understand it...I believe. 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