kingfisher
(Fresh Scripter)
2006-01-20 03:28 AM
What do I need?

I want to write a timer stayed in background, when the time arrived, it called a script. I would like to use Kix,which technic I need?

JochenAdministrator
(KiX Supporter)
2006-01-20 08:38 AM
Re: What do I need?

is it a specific time (like 11:55am) or does it need to run after a spcific period?

NTDOCAdministrator
(KiX Master)
2006-01-20 09:12 AM
Re: What do I need?

Scheduled Task, or SLEEP typically.

kingfisher
(Fresh Scripter)
2006-01-20 09:30 AM
Re: What do I need?

Yes, it is a specific time.
As NTDOC said, it is a scheduled task, when users logon, I would like there is a script timer stayed in the background, and then the script calls a application. But I don't know what I need.


JochenAdministrator
(KiX Supporter)
2006-01-20 10:20 AM
Re: What do I need?

hmmm ...

Code:
 
while @time < "11:55:00"
sleep 1
loop
call "[Path]yourscript.kix"



but a scheduled task would be more safe


Les
(KiX Master)
2006-01-20 03:09 PM
Re: What do I need?

Depends on who's security context it needs to run in. Scheduled Task does not interact easily with the desktop.

LonkeroAdministrator
(KiX Master Guru)
2006-01-20 04:43 PM
Re: What do I need?

why not?
just set the interact with desktop thingie


Les
(KiX Master)
2006-01-20 05:07 PM
Re: What do I need?

Can you say "EASILY"?

LonkeroAdministrator
(KiX Master Guru)
2006-01-20 06:03 PM
Re: What do I need?

I think I can.

Les
(KiX Master)
2006-01-20 06:16 PM
Re: What do I need?

That's good... one step at a time.
Now, can you do it *easily*?
AFAIK, to interact, the task needs to run under the same creds as the user who's desktop you need to interact with. How do you create a task in a logon script that would pass the user's password?

Easily said, not so easily done.


LonkeroAdministrator
(KiX Master Guru)
2006-01-20 06:34 PM
Re: What do I need?

local system owned task can interact with logged in users desktop.

Les
(KiX Master)
2006-01-20 06:47 PM
Re: What do I need?

Really? I did not know that???

LonkeroAdministrator
(KiX Master Guru)
2006-01-20 06:59 PM
Re: What do I need?

you didn't or you "didn't"?

kingfisher
(Fresh Scripter)
2006-01-25 04:53 AM
Re: What do I need?

I have a problem about "call", I have such code:
**********
call 1.kix
call 2.kix
call 3.kix
quit
**********
Is 2.kix will be called until 1.kix is completed? Is it possible that 2.kix and 1.kix are called on same time?


Mart
(KiX Supporter)
2006-01-25 09:45 AM
Re: What do I need?

Call waits for the called stuff to complete before proceeding to the next line.
You could use run to get 1.kix and 2.kix running at the same time. Run does not wait for the run stuff to complete.


LonkeroAdministrator
(KiX Master Guru)
2006-01-25 12:15 PM
Re: What do I need?

yes, call is kinda equivalent to gosub.
gosub jumps to the sub script to be executed and when that subscript returns, the execution continues after the gosub.
call does same but it handles external files.