RunAppAtTime with arguments

Chebu

Member
Licensed User
Longtime User
I have been testing the RunAppAtTime calling an app using also arguments, something like this:

HW.RunAppAtTime(AppPath & "\agenda.exe /d", moment)

without succes, app not runs in the specified moment but if I call without any argument the app runs OK in the right moment. Something like this:

HW.RunAppAtTime(AppPath & "\agenda.exe", moment)

My question is how I should use the function, string definition to use this method with arguments? The argument of RunAppAtTime has to be string type so I can not use Shell function.

Thanks!
 

PatrikL

Member
Licensed User
My idea is create lnk file and then call it in software. In lnk file can be also used arguments.
 

Chebu

Member
Licensed User
Longtime User
Thanks PatrikL but I don't know how create a lnk in WinMo 6.5 and as I can see in Windows desktop it is necessary to add the path to the name and this is unknown at the beginning.

Any idea to create this lnk?

Thanks.
 

RobVanBrunschot

Member
Licensed User
Longtime User
Hello,

I also have not found any info in using arguments when run via de notification queue.

One option is putting the desired argument(s) in the registry or inifile and read those values again when run from the notification queue.

the only argument you will find when run from the notification queue is 'RunAppAtTime', then you known it has started via the queue.

This solustion is not very high class but it shout work.

Possible flow example

EMPTY ARGUMENT-REGISTRY-VALUE
WHEN NEW-SCHEDULE
. FILL ARGUMENT-REGISTRY-VALUE with arguments
. SCHEDULE NEW RUN

NEW RUN FROM-NOTIFICATION-QUEUE
WHEN ARGUMENT=RUNAPPATTIME
. READ ARGUMENT-REGISTRY-VALUE
. WHEN ARGUMENT-REGISTRY-VALUE<>EMPTY
. EMPTY ARGUMENT-REGISTRY-VALUE
. PROCESS ARGUMENTS
<...>

May be this helps,
Rob
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…