Sign in to follow this  
Followers 0
Phenom

How to share information between two AutoIt scripts

8 posts in this topic

#1 ·  Posted (edited)

Let's say I have a simple script that looks like this:

For $i = 0 to 100
    Sleep(1000)
Next

While this script is running I have another AutoIt script running. I want this other script to periodically check to see what the value of $i is. I want it to be done without writing to disk. What's the code to do that?

Edited by Phenom

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

The "code to do that" is up to you, the functions for it are numerous(StdoutRead and its related functions for example), as are the forum examples I have seen here(I trust you know how to perform a search.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

You can use a registry key too

the first script write your $i value and the second read it...


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

You can use a registry key too

the first script write your $i value and the second read it...

Doesn't using a registry key require writing to disk?

Share this post


Link to post
Share on other sites

I want it to be done without writing to disk

Eh, eh-he.

Well... Using a MySQL of webserver would be stupid? Wouldn't it?


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

The "code to do that" is up to you, the functions for it are numerous(StdoutRead and its related functions for example), as are the forum examples I have seen here(I trust you know how to perform a search.

I did a search but couldn't figure it out. How can StdoutRead be used to do this? The example script shows it being used in only one program. I need to get information from a different script that is running.

Share this post


Link to post
Share on other sites

I did a search but couldn't figure it out. How can StdoutRead be used to do this? The example script shows it being used in only one program. I need to get information from a different script that is running.

You see in the example, it runs foo.bar as its child, foo.bar is what the example is reading the output from.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
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
Sign in to follow this  
Followers 0