Sign in to follow this  
Followers 0
fi3ldy

StringSplit While problem!

4 posts in this topic

thanks to "Danny35b" i solved my StringSplit problem, but now it gets a little more complicated :P

I have a file which contains a list, e.g 1.exe|2.exe|3.exe|4.exe|5.exe|6.exe

Now i know i could get how many seperate strings there are, and i could get the seperate strings..like this example from Danny35b...

$id = StringSplit(1|username|et34t3454t4564, '|')

$id[0] = 3

$id[1] = 1

$id[2] = username

$id[3] = et34t3454t4564

I need to search each file to see if the ProcessExists..without having to type out ...

If ProcessExists($process[1]) Then

;do somthing

EndIf

If ProcessExists($process[2]) Then

;do somthing

EndIf

If ProcessExists($process[3]) Then

;do somthing

EndIf

As i have 25 seperate strings inside the file...is there an array i could do ?!?! to make it count up...

All help appriciated, thanks alot guys! Love you all :D

Share this post


Link to post
Share on other sites



Hi,

; If Process exists
HotKeySet("1", "_check")
Global $exe_A[3] = ["autoit.exe", "Test.exe", "svchost.exe"]
Global $out_A[3] = ["Hello", "Muha", "Host"]

While 1
    Sleep(100)
WEnd

Func _check()
    For $i = 0 To UBound($exe_A) - 1
        If ProcessExists($exe_A[$i]) Then MsgBox(0, "Info", $out_A[$i])
    Next
EndFunc   ;==>_check

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

; If Process exists
HotKeySet("1", "_check")
Global $exe_A[3] = ["autoit.exe", "Test.exe", "svchost.exe"]
Global $out_A[3] = ["Hello", "Muha", "Host"]

While 1
    Sleep(100)
WEnd

Func _check()
    For $i = 0 To UBound($exe_A) - 1
        If ProcessExists($exe_A[$i]) Then MsgBox(0, "Info", $out_A[$i])
    Next
EndFunc   ;==>_check

So long,

Mega

thanks alot, got it working after a lil editing, all i needed was the For function :P

Share this post


Link to post
Share on other sites

Hi,

glad I could help.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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  
Followers 0