Jump to content

Recommended Posts

Posted

Sorry, but I can't quite get that to work. I'm trying it with notepad and it wants to open a document with the PID as the name.

I have 1 exe which calls a second exe to run the program with that PID

MsgBox(0, "", @AutoItPID)
Run(@ScriptDir&"\Test1.exe" & " " & @AutoItPID)
While 1
    Sleep(100)
WEnd

MsgBox(0, "", $CMDLine[1])
ProcessClose("test.exe")
Run("c:\windows\notepad.exe"& " " & $CMDLine[1], @WindowsDir)

Keeping it very simple right now.

Posted

Oh, sorry. The problem is that I am trying to launch an exe with the same PID as the AutoIt script.

Basically:

Launch script>set AutoIt PID to variable>close script (so identical PID can be launched)>launch exe with PID from AutoIt Script

Posted

I'm using an HTPC front end (Meedio). There is only 1 screen file for a module that I want to launch multiple programs from. So, I thought I'd use a script to be called from that screen file which, depending on the parameters sent from the front end, would call the correct program. The screen file talks to the applications PID that is launched from it. If I can have this launch the script and set the program's PID to that of the script's, then I can accomplish my goal - launch multiple programs from 1 screen file. I've tried doing it using the internal code of Meedio and have had no luck, so I thought I'd do it this way instead.

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
×
×
  • Create New...