Sign in to follow this  
Followers 0
Azu

kill/start process based on checkbox

15 posts in this topic

I wander to make a checkbox with text next to it and have it so the checkbox starts out unchecked, and when you check it it kills explorer.exe, and when you uncheck it starts explorer.exe, and it will be on a dialog box not a gui.

Can you please tell me how to do this? Thanks!

Oh and having the text "Kill explorer.exe" next to the checkbox would also be nice but not necasarry

Share this post


Link to post
Share on other sites



checkboxes are not available on a dialog box.. a GUI is necessary

and...

try killing the explorer.exe with the task manager.. see what happens

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

What Valuater is say is that if you kill the explorer.exe process you loss all your program windows. You would have to manualy start explorer.exe from task manager to bring it back.

Share this post


Link to post
Share on other sites

Awww I really wanted to have it on the dialog box but having it on the gui would be better then nothing..

Here's my current script..

#include <GUIConstants.au3>

#include <string.au3>

#notrayicon

HotKeySet("{ESC}", "_Exit")

HotKeySet("!{F4}", "_Exit")

Func _Exit()

Exit

EndFunc

$inipath="Auto Login Settings.txt"

$readini = IniReadSectionNames($inipath)

Func DAAutoLogin()

$DARunPath = IniRead($inipath, "DA", "Path", "")

If $DARunPath = "" Then

_Change()

Else

EndIf

Run($DARunPath)

WinWaitActive("Darkages")

Sleep(100)

WinWaitActive("Darkages")

Sleep(100)

Send("{ESC}")

$x = 0

$y = 0

$checksum = 1010249294

While $checksum <> PixelChecksum(528 + $x,451 + $y, 612 + $x,470 + $y)

Sleep(100)

WEnd

MouseClick("left", 168 + $x, 205 + $y, 2)

$checksum = PixelChecksum(505 + $x,386 + $y, 532 + $x,402 + $y)

While $checksum = PixelChecksum(505 + $x,386 + $y, 532 + $x,402 + $y)

Sleep(50)

WEnd

MouseClick("left", 232 + $x, 391 + $y, 1)

Sleep(100)

MouseClick("left", 108 + $x, 318 + $y, 1)

MouseClick("left", 302 + $x, 253 + $y, 1)

$DARunName = IniRead($inipath, "DA", "Name", "")

Send($DARunName)

Send("{Enter}")

$DARunPassword = IniRead($inipath, "DA", "Password", "")

ClipPut($DARunPassword)

Send($DARunPassword)

Send("{Enter}")

Exit

EndFunc

Func ROAutoLogin()

$RORunPath = IniRead($inipath, "RO", "Path", "")

If $RORunPath = "" Then

_Change()

Else

EndIf

Run($RORunPath)

WinWait ( "Ragnarok" )

Sleep ( 500 )

WinWait ( "Ragnarok" )

Sleep ( 500 )

$RORunName = IniRead($inipath, "RO", "Name", "")

Send($RORunName)

Send("{Tab}")

$RORunPassword = IniRead($inipath, "RO", "Password", "")

Send($RORunPassword)

Send("{Enter}")

for $x = 1 to 15

Sleep ( 100 )

Send ( "{ENTER}" )

Next

Exit

EndFunc

Func WoWAutoLogin()

$WoWRunPath = IniRead($inipath, "WoW", "Path", "")

If $WoWRunPath = "" Then

_Change()

Else

EndIf

Run($WoWRunPath)

WinWait ( "World of Warcraft" )

Sleep ( 400 )

WinWait ( "World of Warcraft" )

Sleep ( 400 )

$WoWRunName = IniRead($inipath, "WoW", "Name", "")

Send($WoWRunName)

Send("{Tab}")

$WoWRunPassword = IniRead($inipath, "WoW", "Password", "")

Send ($WoWRunPassword)

Send("{Enter}")

Sleep ( 8500 )

Send ("{ENTER}")

Exit

EndFunc

Dim $ScanMsgBox = _MainPanel(4, '-=Auto Login Control Panel=-', 'Welcome to Auto Login!')

If $ScanMsgBox = 6 Then

DAAutoLogin()

EndIf

If $ScanMsgBox = 7 Then

ROAutoLogin()

EndIf

If $ScanMsgBox = 8 Then

WoWAutoLogin()

EndIf

If $ScanMsgBox = 9 Then

_Change()

EndIf

If $ScanMsgBox = 10 Then

_Change()

EndIf

Func _Change()

GuiCreate("Auto Login Editer", 368, 66)

GuiSetIcon(@SystemDir & "\mspaint.exe", 0)

GuiCtrlCreateTab(1, 0, 368, 23)

GuiCtrlCreateTabItem("DA")

GuiCtrlCreateLabel("Username:", 0, 25)

$DARunName=IniRead($inipath, "DA", "Name", "")

$DAName=GuiCtrlCreateInput($DARunName, 51, 23, 130, 20)

GuiCtrlCreateLabel("Password:", 188, 25)

$DARunPassword=IniRead($inipath, "DA", "Password", "")

$DAPassword=GuiCtrlCreateInput($DARunPassword, 238, 23, 130, 20)

GuiCtrlCreateLabel("Path:", 0, 50)

$DARunPath=IniRead($inipath, "DA", "Path", "")

$DAPath=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20)

$BrowseDA=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)

GuiCtrlCreateTabItem("RO")

GuiCtrlCreateLabel("Username:", 0, 25)

$RORunName=IniRead($inipath, "RO", "Name", "")

$ROName=GuiCtrlCreateInput($RORunName, 51, 23, 130, 20)

GuiCtrlCreateLabel("Password:", 188, 25)

$RORunPassword=IniRead($inipath, "RO", "Password", "")

$ROPassword=GuiCtrlCreateInput($RORunPassword, 238, 23, 130, 20)

GuiCtrlCreateLabel("Path:", 0, 50)

$RORunPath=IniRead($inipath, "RO", "Path", "")

$ROPath=GuiCtrlCreateInput($RORunPath, 26, 48, 280, 20)

$BrowseRO=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)

GuiCtrlCreateTabItem("WoW")

GuiCtrlCreateLabel("Username:", 0, 25)

$WoWRunName=IniRead($inipath, "WoW", "Name", "")

$WoWName=GuiCtrlCreateInput($WoWRunName, 51, 23, 130, 20)

GuiCtrlCreateLabel("Password:", 188, 25)

$WoWRunPassword=IniRead($inipath, "WoW", "Password", "")

$WoWPassword=GuiCtrlCreateInput($WoWRunPassword, 238, 23, 130, 20)

GuiCtrlCreateLabel("Path:", 0, 50)

$WoWRunPath=IniRead($inipath, "WoW", "Path", "")

$WoWPath=GuiCtrlCreateInput($WoWRunPath, 26, 48, 280, 20)

$BrowseWoW=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)

GuiCtrlCreateTabItem("")

$Apply=GuiCtrlCreateButton("Apply", 310, 0, 59, 20)

GuiSetState()

Do

$msg = GUIGetMsg()

Select

Case $msg= $BrowseDA

$DA = FileOpenDialog("Browse to DA", "", "Dark Ages (*.exe)","", "DA.exe" )

IniWrite($inipath, "DA", "Path", $DA)

GuiCtrlSetData($DAPath,$DA)

Case $msg= $BrowseRO

$RO = FileOpenDialog("Browse to RO", "", "Ragnarok Online (*.exe)","", "RO.exe" )

IniWrite($inipath, "RO", "Path", $RO)

GuiCtrlSetData($ROPath,$RO)

Case $msg= $BrowseWoW

$WoW = FileOpenDialog("Browse to WoW", "", "World of Warcraft (*.exe)","", "WoW.exe" )

IniWrite($inipath, "WoW", "Path", $WoW)

GuiCtrlSetData($WoWPath,$WoW)

Case $msg= $Apply

$DA = GuiCtrlRead($DAPath)

IniWrite($inipath, "DA", "Path", $DA)

$DAPassword = GuiCtrlRead($DAPassword)

IniWrite($inipath, "DA", "Password", $DAPassword)

$DAName = GuiCtrlRead($DAName)

IniWrite($inipath, "DA", "Name", $DAName)

$RO = GuiCtrlRead($ROPath)

IniWrite($inipath, "RO", "Path", $RO)

$ROPassword = GuiCtrlRead($ROPassword)

IniWrite($inipath, "RO", "Password", $ROPassword)

$ROName = GuiCtrlRead($ROName)

IniWrite($inipath, "RO", "Name", $ROName)

$WoW = GuiCtrlRead($WoWPath)

IniWrite($inipath, "WoW", "Path", $WoW)

$WoWPassword = GuiCtrlRead($WoWPassword)

IniWrite($inipath, "WoW", "Password", $WoWPassword)

$WoWName = GuiCtrlRead($WoWName)

IniWrite($inipath, "WoW", "Name", $WoWName)

EndSelect

Until $msg = $GUI_EVENT_CLOSE

EndFunc

Func _MainPanel($mb_Icon, $mb_Title, $mb_Text, $mb_Time = '')

Local $StrnLenText = MsgLongestString($mb_Text)

Local $NumberOfLines = (UBound(StringSplit($mb_Text, @CRLF)) - 1) * 5

Local $MsgValue = 0

Local $Timer = ''

$iMsgBox = GUICreate($mb_Title, $StrnLenText + 190, 100 + $NumberOfLines, -1, -1, 0x00400000, 0x00000008)

GUICtrlCreateLabel($mb_Text, 60, 10)

GUICtrlCreateIcon(@SystemDir & "\User32.dll", $mb_Icon, 10, 10, 35, 35)

$DA = GUICtrlCreateButton("DA", 0 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen("DA"), 25)

$RO = GUICtrlCreateButton("RO", 65 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen("RO"), 25)

$WoW = GUICtrlCreateButton("WoW", 130 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen("WoW"), 25)

$Reset = GUICtrlCreateButton("Reset", 69 + ($StrnLenText / 2), 25 + $NumberOfLines, 50 + StringLen("Reset"), 17)

$Info = GUICtrlCreateButton("Change", 134 + ($StrnLenText / 2), 25 + $NumberOfLines, 50 + StringLen("_Change"), 17)

GUISetState()

If $mb_Time <> '' Then $Timer = TimerInit()

While 1

$imsg = GUIGetMsg()

Select

Case $imsg = $DA

$MsgValue = 6

ExitLoop

Case $imsg = $RO

$MsgValue = 7

ExitLoop

Case $imsg = $WoW

$MsgValue = 8

ExitLoop

Case $imsg = $Reset

$MsgValue = 9

ExitLoop

Case $imsg = $Info

$MsgValue = 10

ExitLoop

Case $mb_Time <> ''

If TimerDiff($Timer) / 1000 >= $mb_Time Then ExitLoop

EndSelect

WEnd

GUIDelete($iMsgBox)

Return $MsgValue

EndFunc

Func MsgLongestString($sText)

Local $sSplit = StringSplit($sText, @CRLF)

Local $Times = ''

If Not @error Then

ArraySortByLen($sSplit)

If StringLen($sSplit[1]) <= 100 Then $Times = 2.25

If StringLen($sSplit[1]) >= 101 And StringLen($sSplit[1]) <= 150 Then $Times = 2.5

If StringLen($sSplit[1]) >= 151 And StringLen($sSplit[1]) <= 201 Then $Times = 3

If StringLen($sSplit[1]) >= 202 Then $Times = 3.25

Return Round(StringLen($sSplit[1])*$Times)

Else

If StringLen($sText) <= 100 Then $Times = 2.25

If StringLen($sText) >= 101 And StringLen($sText) <= 150 Then $Times = 2.5

If StringLen($sText) >= 151 And StringLen($sText) <= 201 Then $Times = 3

If StringLen($sText) >= 202 Then $Times = 3.25

Return Round(StringLen($sText)*$Times)

EndIf

EndFunc

Func ArraySortByLen(ByRef $nArray, $Start = 1)

For $i = $Start To UBound($nArray) - 2

Local $SE = $i

For $x = $i To UBound($nArray) - 1

If StringLen($nArray[$SE]) < StringLen($nArray[$x]) Then $SE = $x

Next

Local $HLD = $nArray[$i]

$nArray[$i] = $nArray[$SE]

$nArray[$SE] = $HLD

Next

EndFunc

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Are hotkeys good?

HotKeySet("^+e", "Taskmanager"); CTRL + SHIFT + e

While True
    Sleep(60000)
WEnd

Func Taskmanager()
    If ProcessExists("explorer.exe") Then
        ProcessClose("explorer.exe")
    Else
        Run(@WindowsDir & "\explorer.exe")
    EndIf
EndFunc

Edited by gamerman2360

Share this post


Link to post
Share on other sites

I don't understand what the sleep is for ?

Does the ctrl shift e toggle explorer.exe on/off ?

Share this post


Link to post
Share on other sites

Well Process close dosnt seem to do it. The sleep is so the script dosnt get to the end of the script and close.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

???

Why would it close?

:S

I opened up my script and turned of explorer.exe and it didn't close

Maybe it's differant on windows vista or something?

I'm confused

lol

Edited by Azu

Share this post


Link to post
Share on other sites

Please someone answer my question :o

Share this post


Link to post
Share on other sites

uh.. explorer.exe turns back on as soon as I release the hotkeys.. how to fix this? o.0

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>
#include <string.au3>
#notrayicon
HotKeySet("{ESC}", "_Exit")
HotKeySet("!{F4}", "_Exit")
HotKeySet("^+a", "_kill")
Func _Exit()
Exit
EndFunc
$inipath="Auto Login Settings.txt"
$readini = IniReadSectionNames($inipath)
Func DAAutoLogin()
$DARunPath = IniRead($inipath, "DA", "Path", "")
If $DARunPath = "" Then
_Change()
Else
EndIf
Run($DARunPath)
WinWaitActive("Darkages")
Sleep(100)
WinWaitActive("Darkages")
Sleep(100)
Send("{ESC}")
$x = 0
$y = 0
$checksum = 1010249294
While $checksum <> PixelChecksum(528 + $x,451 + $y, 612 + $x,470 + $y)
Sleep(100)
WEnd
MouseClick("left", 168 + $x, 205 + $y, 2)
$checksum = PixelChecksum(505 + $x,386 + $y, 532 + $x,402 + $y)
While $checksum = PixelChecksum(505 + $x,386 + $y, 532 + $x,402 + $y)
Sleep(50)
WEnd
MouseClick("left", 232 + $x, 391 + $y, 1)
Sleep(100)
MouseClick("left", 108 + $x, 318 + $y, 1)
MouseClick("left", 302 + $x, 253 + $y, 1)
$DARunName = IniRead($inipath, "DA", "Name", "")
Send($DARunName)
Send("{Enter}")
$DARunPassword = IniRead($inipath, "DA", "Password", "")
ClipPut($DARunPassword)
Send($DARunPassword)
Send("{Enter}")
Exit
EndFunc
Func ROAutoLogin()
$RORunPath = IniRead($inipath, "RO", "Path", "")
If $RORunPath = "" Then
_Change()
Else
EndIf
Run($RORunPath)
WinWait ( "Ragnarok" )
Sleep ( 500 )
WinWait ( "Ragnarok" )
Sleep ( 500 )
$RORunName = IniRead($inipath, "RO", "Name", "")
Send($RORunName)
Send("{Tab}")
$RORunPassword = IniRead($inipath, "RO", "Password", "")
Send($RORunPassword)
Send("{Enter}")
for $x = 1 to 15
     Sleep ( 100 )
     Send ( "{ENTER}" )
Next
Exit
EndFunc
Func WoWAutoLogin()
$WoWRunPath = IniRead($inipath, "WoW", "Path", "")
If $WoWRunPath = "" Then
_Change()
Else
EndIf
Run($WoWRunPath)
WinWait ( "World of Warcraft" )
Sleep ( 400 )
WinWait ( "World of Warcraft" )
Sleep ( 400 )
$WoWRunName = IniRead($inipath, "WoW", "Name", "")
Send($WoWRunName)
Send("{Tab}")
$WoWRunPassword = IniRead($inipath, "WoW", "Password", "")
Send ($WoWRunPassword)
Send("{Enter}")
Sleep ( 8500 )
Send ("{ENTER}")
Exit
EndFunc
Dim $ScanMsgBox = _MainPanel(4, '-=Auto Login Control Panel=-', 'Welcome to Auto Login!')
If $ScanMsgBox = 6 Then
DAAutoLogin()
EndIf
If $ScanMsgBox = 7 Then
ROAutoLogin()
EndIf
If $ScanMsgBox = 8 Then
WoWAutoLogin()
EndIf
If $ScanMsgBox = 9 Then
_Change()
EndIf
If $ScanMsgBox = 10 Then
_Change()
EndIf
Func _Change()
GuiCreate("Auto Login Editer", 368, 66)
GuiSetIcon(@SystemDir & "\mspaint.exe", 0)
GuiCtrlCreateTab(1, 0, 368, 23)
GuiCtrlCreateTabItem("DA")
GuiCtrlCreateLabel("Username:", 0, 25)
$DARunName=IniRead($inipath, "DA", "Name", "")
$DAName=GuiCtrlCreateInput($DARunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$DARunPassword=IniRead($inipath, "DA", "Password", "")
$DAPassword=GuiCtrlCreateInput($DARunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$DARunPath=IniRead($inipath, "DA", "Path", "")
$DAPath=GuiCtrlCreateInput($DARunPath, 26, 48, 280, 20)
$BrowseDA=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("RO")
GuiCtrlCreateLabel("Username:", 0, 25)
$RORunName=IniRead($inipath, "RO", "Name", "")
$ROName=GuiCtrlCreateInput($RORunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$RORunPassword=IniRead($inipath, "RO", "Password", "")
$ROPassword=GuiCtrlCreateInput($RORunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$RORunPath=IniRead($inipath, "RO", "Path", "")
$ROPath=GuiCtrlCreateInput($RORunPath, 26, 48, 280, 20)
$BrowseRO=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("WoW")
GuiCtrlCreateLabel("Username:", 0, 25)
$WoWRunName=IniRead($inipath, "WoW", "Name", "")
$WoWName=GuiCtrlCreateInput($WoWRunName, 51, 23, 130, 20)
GuiCtrlCreateLabel("Password:", 188, 25)
$WoWRunPassword=IniRead($inipath, "WoW", "Password", "")
$WoWPassword=GuiCtrlCreateInput($WoWRunPassword, 238, 23, 130, 20)
GuiCtrlCreateLabel("Path:", 0, 50)
$WoWRunPath=IniRead($inipath, "WoW", "Path", "")
$WoWPath=GuiCtrlCreateInput($WoWRunPath, 26, 48, 280, 20)
$BrowseWoW=GuiCtrlCreateButton("Browse", 310, 48, 59, 20)
GuiCtrlCreateTabItem("")
$Apply=GuiCtrlCreateButton("Apply", 310, 0, 59, 20)
GuiSetState()
Do
$msg = GUIGetMsg()
Select
Case $msg= $BrowseDA
$DA = FileOpenDialog("Browse to DA", "", "Dark Ages (*.exe)","", "DA.exe" )
IniWrite($inipath, "DA", "Path", $DA)
GuiCtrlSetData($DAPath,$DA)
Case $msg= $BrowseRO
$RO = FileOpenDialog("Browse to RO", "", "Ragnarok Online (*.exe)","", "RO.exe" )
IniWrite($inipath, "RO", "Path", $RO)
GuiCtrlSetData($ROPath,$RO)
Case $msg= $BrowseWoW
$WoW = FileOpenDialog("Browse to WoW", "", "World of Warcraft (*.exe)","", "WoW.exe" )
IniWrite($inipath, "WoW", "Path", $WoW)
GuiCtrlSetData($WoWPath,$WoW)
Case $msg= $Apply
$DA = GuiCtrlRead($DAPath)
IniWrite($inipath, "DA", "Path", $DA)
$DAPassword = GuiCtrlRead($DAPassword)
IniWrite($inipath, "DA", "Password", $DAPassword)
$DAName = GuiCtrlRead($DAName)
IniWrite($inipath, "DA", "Name", $DAName)
$RO = GuiCtrlRead($ROPath)
IniWrite($inipath, "RO", "Path", $RO)
$ROPassword = GuiCtrlRead($ROPassword)
IniWrite($inipath, "RO", "Password", $ROPassword)
$ROName = GuiCtrlRead($ROName)
IniWrite($inipath, "RO", "Name", $ROName)
$WoW = GuiCtrlRead($WoWPath)
IniWrite($inipath, "WoW", "Path", $WoW)
$WoWPassword = GuiCtrlRead($WoWPassword)
IniWrite($inipath, "WoW", "Password", $WoWPassword)
$WoWName = GuiCtrlRead($WoWName)
IniWrite($inipath, "WoW", "Name", $WoWName)
EndSelect
Until $msg = $GUI_EVENT_CLOSE
EndFunc
Func _MainPanel($mb_Icon, $mb_Title, $mb_Text, $mb_Time = '')
Local $StrnLenText = MsgLongestString($mb_Text)
Local $NumberOfLines = (UBound(StringSplit($mb_Text, @CRLF)) - 1) * 5
Local $MsgValue = 0
Local $Timer = ''
$iMsgBox = GUICreate($mb_Title, $StrnLenText + 190, 100 + $NumberOfLines, -1, -1, 0x00400000, 0x00000008)
GUICtrlCreateLabel($mb_Text, 60, 10)
GUICtrlCreateIcon(@SystemDir & "\User32.dll", $mb_Icon, 10, 10, 35, 35)
$DA = GUICtrlCreateButton("DA", 0 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen("DA"), 25)
$RO = GUICtrlCreateButton("RO", 65 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen("RO"), 25)
$WoW = GUICtrlCreateButton("WoW", 130 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen("WoW"), 25)
$Reset = GUICtrlCreateButton("Reset", 69 + ($StrnLenText / 2), 25 + $NumberOfLines, 50 + StringLen("Reset"), 17)
$Info = GUICtrlCreateButton("Change", 134 + ($StrnLenText / 2), 25 + $NumberOfLines, 50 + StringLen("_Change"), 17)
GUISetState()
If $mb_Time <> '' Then $Timer = TimerInit()
While 1
$imsg = GUIGetMsg()
Select
Case $imsg = $DA
$MsgValue = 6
ExitLoop
Case $imsg = $RO
$MsgValue = 7
ExitLoop
Case $imsg = $WoW
$MsgValue = 8
ExitLoop
Case $imsg = $Reset
$MsgValue = 9
ExitLoop
Case $imsg = $Info
$MsgValue = 10
ExitLoop
Case $mb_Time <> ''
If TimerDiff($Timer) / 1000 >= $mb_Time Then ExitLoop
EndSelect
WEnd
GUIDelete($iMsgBox)
Return $MsgValue
EndFunc
Func MsgLongestString($sText)
Local $sSplit = StringSplit($sText, @CRLF)
Local $Times = ''
If Not @error Then
ArraySortByLen($sSplit)
If StringLen($sSplit[1]) <= 100 Then $Times = 2.25
If StringLen($sSplit[1]) >= 101 And StringLen($sSplit[1]) <= 150 Then $Times = 2.5
If StringLen($sSplit[1]) >= 151 And StringLen($sSplit[1]) <= 201 Then $Times = 3
If StringLen($sSplit[1]) >= 202 Then $Times = 3.25
Return Round(StringLen($sSplit[1])*$Times)
Else
If StringLen($sText) <= 100 Then $Times = 2.25
If StringLen($sText) >= 101 And StringLen($sText) <= 150 Then $Times = 2.5
If StringLen($sText) >= 151 And StringLen($sText) <= 201 Then $Times = 3
If StringLen($sText) >= 202 Then $Times = 3.25
Return Round(StringLen($sText)*$Times)
EndIf
EndFunc
Func ArraySortByLen(ByRef $nArray, $Start = 1)
For $i = $Start To UBound($nArray) - 2
Local $SE = $i
For $x = $i To UBound($nArray) - 1
If StringLen($nArray[$SE]) < StringLen($nArray[$x]) Then $SE = $x
Next
Local $HLD = $nArray[$i]
$nArray[$i] = $nArray[$SE]
$nArray[$SE] = $HLD
Next
EndFunc
Func _kill()
    If ProcessExists("explorer.exe") Then
        ProcessClose("explorer.exe")
    Else
        Run("explorer.exe")
    EndIf
EndFunc

Share this post


Link to post
Share on other sites

please someone answer :o

Share this post


Link to post
Share on other sites

.....................

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