Jump to content
Sign in to follow this  
Y3llo

Suspend a process

Recommended Posts

Y3llo
Hello, I started in AutoIt and I would have a little help to suspend a process because I can not do it: (.
Made in what I want in the end is that my script running a small window with a button (made with Koda Form Designer) that that clicking it suspends the desired process. But I do not know what to put in it: '(
Here is what I have done:
 
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Hychigo = GUICreate("By Hychigo", 301, 121, 192, 124)
GUISetBkColor(0x99B4D1)
$Button1 = GUICtrlCreateButton("Arrêter", 8, 16, 281, 89)
GUICtrlSetFont(-1, 50, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x000000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            <I do not know what I should put here.>
    EndSwitch
WEnd

Func <I do not know what I should put here.>
_processussuspend (<The process that I want>)
EndFunc

Thank for help

 

Share this post


Link to post
Share on other sites
Y3llo

Hello thank you for the answer but on this I do not know where to put the name of my process?

Share this post


Link to post
Share on other sites
Unc3nZureD

Func _ProcessSuspend($process)

As you can see, the func starts that way.

Just simply copy the function to the end of your script, and use _ProcessSuspend("rainbowdash.exe") inside your script.

Edited by Unc3nZureD

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  

×