Hi everyone,
I was wondering if someone may be able to help me with a script. I'm
not an experienced scripter, but I have had some experience with
writing AuotIt scripts. What I want to do I think I could do in
AuotIt, but I'm having toruble with the equivalent commands in
PowerPro's language. Basically what I am trying to do is this:
I have a button on my PowerPro bar to run a game. When I click this
button, I want PowerPro to detect if a process called fraps.exe
already exists, and if it does, just run the game. If fraps.exe does
not aleady exist, I want PowerPro first to run fraps, wait 2 seconds,
and then run the game. In AutoIt, the script would be something like
this:
If ProcessExists ( "Fraps.exe" ) Then
Run ( "C:\Path To\Game.exe" )
Else
Run ( "C:\Program Files\FRAPS\Fraps.exe" )
Sleep (2000)
Run ( "C:\Path To\Game.exe" )
EndIf
Now, I know PowerPro has If statements. I also know the equivalent
PowerPro command to "Sleep (2000)" would be "Wait for 2000", but after
looking through both the PowerPro helpfile and the scripting tutorial
helpfile, I cannot find an equivalent to the ProcessExists command. I
did find however the Run command equivalent, which seems to be Do
(with / instead of \ for paths). So, I think the PowerPro script would
look something like this:
If {the PowerPro equivalent to ProcessExists here} ( "Fraps.exe" )
Then
Do ( "C:/Path To/Game.exe" )
Else
Do ( "C:/Program Files/FRAPS/Fraps.exe" )
Wait for 2000
Do ( "C:/Path To/Game.exe" )
EndIf
If anyone could help me fill in the blanks, that would be appreciated.