Jump to content
Sign in to follow this  
eracross

How to add more parameters in a function?

Recommended Posts

eracross

How to add more parameters in a function?

Ex.

ProcessClose("example1.exe")

ProcessClose("example2.exe")

in this..

ProcessClose("example1.exe"&"example2.exe") or ProcessClose("example1.exe"|"example2.exe") is it possible i tried it but not working.. :graduated:

Share this post


Link to post
Share on other sites
water

ProcessClose accepts one parameter (according to the help file).

To close multiple processes you have to call the function multiple times.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
eracross

ProcessClose accepts one parameter (according to the help file).

To close multiple processes you have to call the function multiple times.

Oh so its not possible btw thanks :graduated:

Share this post


Link to post
Share on other sites
hannes08

Oh so its not possible btw thanks :graduated:

Why not write your own Function?

_MyProcessClose("process1.exe|process2.exe|process3.exe")

Func _MyProcessClose($processes)
    $aProcesses = StringSplit($processes,"|")
    If IsArray($aProcesses) Then
        For $i  = 0  To $aProcesses[0]
            ProcessClose($aProcesses[$i])
        Next
    Else
        ProcessClose($processes)
    EndIf
EndFunc

Regards,

Hannes


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites
eracross

Omg :( yeah but im not at that level yet btw thanks!.. :graduated:

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.