| View previous topic :: View next topic |
| What do you think? |
| No |
|
50% |
[ 1 ] |
| Yes |
|
50% |
[ 1 ] |
|
| Total Votes : 2 |
|
| Author |
Message |
heresy
Joined: 11 Mar 2008 Posts: 132
|
Posted: Mon May 12, 2008 1:40 am Post subject: RunChild ? |
|
|
(note that PSPad launched ahk script as a child process)
i just thought it would be good if we have additional RunChild command that can launch any programs as a child process
since we often use command line utilities it'll be useful such as not leaving process alone that launched with Hide option when script exits _________________ let's support Wiki
automation helper for beginners |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 753 Location: London, UK
|
Posted: Mon May 12, 2008 1:48 am Post subject: |
|
|
Not a bug??????
Secondly am I missing something :S
 _________________ Steve F AKA Superfraggle
http://r.yuwie.com/superfraggle |
|
| Back to top |
|
 |
heresy
Joined: 11 Mar 2008 Posts: 132
|
Posted: Mon May 12, 2008 2:13 am Post subject: |
|
|
| Superfraggle wrote: | | Not a bug?????? |
sorry wrong posting.
i was trying to post at Wishlist
to moderator : please move it to Wishlist, i can't delete it cause someone replied it
[ Moderator!: Moved. ] _________________ let's support Wiki
automation helper for beginners |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2364 Location: Australia, Qld
|
Posted: Mon May 12, 2008 9:09 am Post subject: |
|
|
| I was under the impression that the default Windows behaviour is to make each new process a child of the process that created it... |
|
| Back to top |
|
 |
heresy
Joined: 11 Mar 2008 Posts: 132
|
Posted: Wed May 14, 2008 6:04 am Post subject: |
|
|
| Lexikos wrote: | | make each new process a child of the process that created it... |
currently the process launched by Run command doesn't dependent on script right?
what i meant was make RunChild command to do the job.
| Code: | Run, Notepad.exe
Exitapp ;launched notepad remains
;--------------------------------------
RunChild, Notepad.exe
Exitapp ;launched notepad will be closed automatically cause it has dependency on script |
_________________ let's support Wiki
automation helper for beginners |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2364 Location: Australia, Qld
|
Posted: Wed May 14, 2008 9:45 am Post subject: |
|
|
| That doesn't seem like a Windows feature. Why don't you just use WinClose/Process,Close? |
|
| Back to top |
|
 |
heresy
Joined: 11 Mar 2008 Posts: 132
|
Posted: Wed May 14, 2008 11:28 am Post subject: |
|
|
oh i thought it was an windows feature cause PSPad does it
by the way i found little trick
| Code: | DetectHiddenWindows, On
Gui, +LastFound
Gui, Show, Center w640 h480
uid1 := WinExist()
Run, Notepad.exe,,Hide
WinWait, ahk_class Notepad
uid2 := WinExist()
DllCall("SetParent", "uint", uid2, "uint", uid1)
Return
GuiClose:
ExitApp |
run it and look for these processes on task manager or process explorer
then close it. notepad will be closed together
this is what i was talking about
since people using command line utilites with Hide option
i just thought like it would be good if it can be done via single command RunChild
for saving lines and script safeness? _________________ let's support Wiki
automation helper for beginners |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2364 Location: Australia, Qld
|
Posted: Wed May 14, 2008 9:59 pm Post subject: |
|
|
If a window is closed, it also closes its child windows/controls. When the Notepad window is closed, notepad.exe exits. It won't necessarily happen with all programs.
| Quote: | | oh i thought it was an windows feature cause PSPad does it | Perhaps PSPad simply terminates the process - i.e. the way Process,Close would... |
|
| Back to top |
|
 |
|