Sign in to follow this  
Followers 0
Ton

run or shellexecute?

3 posts in this topic

Hi,

I have to run/stop 3 programs automatic on weekdays at workingtime (say from 07.30 till 18.30) They now run from shortcuts.

I tried to script them with both run and shellexecute but neither works.

This is my line for program1 with run, there is a parameter -con which is necessary to run it minimized:

ShellExecute ("Prog1.exe" [, "-con" [, "C:\sub1\sub2\sub3\"]])

It starts the program, but it seems to ignore the parameter.

Program 2 starts with a dialogbox, and expects userinput (a timevalue in secs, lets say 240) and displays a start and stop button.

This is my not working code..

Run("C:\WINNT\System32\prog2.exe /cp:p l:\sub1\sub2\prog2 Loop.class")

WinWaitActive("windowname")

Send("240")

Send("{ALTDOWN}s{ALTUP}")

The last one..i wrote:

Run("C:\WINNT\SYSTEM32\Prog3.EXE l:\sub1\sub2\sub3\javaprog1.class")

No go too..

I hope somebody can show me the way to have this done.

Also it would be nice to see an example of the proposed timing part of the script in progress.

Anyone with an idea?

Thanx in advance,

Ton. ;):evil:

Share this post


Link to post
Share on other sites



Hi Ton.

$paramcom="-con"
run("cmd.exe /c prog.exe " &$paramcom &" C:\sub1\sub2\sub3\","",@SW_ENABLE)

and for Send("240")

send(Guictrlread($userinputthisisatimevalue))

[size="5"] [/size]

Share this post


Link to post
Share on other sites

Hi Ton.

$paramcom="-con"
run("cmd.exe /c prog.exe " &$paramcom &" C:\sub1\sub2\sub3\","",@SW_ENABLE)

and for Send("240")

send(Guictrlread($userinputthisisatimevalue))

Ok, Sh3llC043r, I'm going to try these ones.

I'm not sure what you mean with the GuiCtrlRead solution, if I want to fill the dialoguebox with a value of 240, then this should be the line?

send(Guictrlread($240))

and what about the line to start the timecheck (that's what the window is about)

is this code ok?

Send("{ALTDOWN}s{ALTUP}")

Thx.

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