Jump to content

Program give value / data to another program alternatives?


Go to solution Solved by water,

Recommended Posts

Hy everyone,

I have a kinda idiot question, but i do not know it is posible or not. I guess posible, but dunno how to do.

So i have a count down timer (simple AutoIT script) like example:

Local $Timer = 1000

do $timer = $timer - 1
sleep(1000)
until $timer = 0
beep(500, 500) ;or anything

And have another program, where i need the information, the timer rich 0. Up till now i come up with a simple idea and it is work. When it  is rich 0, it write something in file, and with other program i reading that file time to time, if it have anything in or not.

Can i send the $timer or his value somehow to the target program? Or maybe can make a send key order and the target program have hotkey on that key, also can work... I want it, cause while the script counting down, nothing else it can do, since the loop is still runing. Do i am think wrong?

Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

Link to comment
Share on other sites

Hi there,

Just an ideia for your issue, and what about a registry value?

When time reaches 0 write a regvalues and the other program will probe that value is 0.

Cheers!

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Thank you for the answares, and let me replay.

//to libreau3 - This is kinda new aspect, but i will check it, and try to understand the codes in help file, to be able to use it on my own way. As i could understand on a first look, this function will "simulate" a server, and the other function (send) will send file / message with useing TCP local network. Right? It is bit complicate for a simple script, but can be useful later, when i will have enough experience.

Can not i just send message (value) with controlsend or similar order then this? For controlSend i need a window handle on the main script, but i do not have, since it is not nessery. The main program is only controlling my PCTV record stuffs.

This is just kinda extra stuff, when i do not have time to watch the movie or i am not at home, and it is cuting out the commercials. Unfortunately the PCTV have no control IDs. When i checked with AutoIT info tool, i had to notice that. All the button are coded the similar way i guess, like file menu on notepad. (just an idea, i do not know how they did exactly) So i had to use a way, like sending mouse click on a specific location (Record button) by useing the PCTV window handle.

//to November - To tell you honestly, i am kinda beginer on programing, and i do not wana mess up my registry with makeing mistakes, and it is familiar with writeing something into a normal file, then the other program, just checking if the file size changed, if yes, it read it into $var and if $var = with something, then i got what i want. But this is what i just wrote down in the first post. :/

Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

Link to comment
Share on other sites

  • Solution

Have a look at AdLibRegister. This (nearly) allows to run two functions at the same time.

It interrupts the main script every n milliseconds to call a function and then returns to the main script.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I had no other idea how to make the count down timer, to be able to exit from script after X hrs, cause the movie end on TV.

Between, i need only the timer to exit, nothing else. Wont make much more complicate the program, cause it support 100% what i wanted. It make X part movie, between the commercials, then all what i have to do, put them in playlist and watch them.

To call it as ini file or normal txt it is the same. 1 program have to write example "stop" and other have to read the file, if "stop" is there or not.

//to water - I will look after that, sounds very good.

Edited part:

I did read it, and looks like it will solve my problem, all what i have to do, to time properly the script run.

Do i have to unregister the function for it, or it is only if that function have an example while loop, what is never end.

Or unregister, when i do not need to have run it anymore?

Simple other question. How i have to understand this?

$iCount += 1

Dont know what does += mean exactly. :/

Edited by TrickyDeath

Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

Link to comment
Share on other sites

According to the help file: "Addition assignment. e.g. $vVar += 1     (adds 1 to $vVar)"

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Thank you for the help file link. Did not saw that yet.

So i do not have to use:

$var = $var + 1

Just $var += 1

Helpful stuff. :)

Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

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