Jump to content
Sign in to follow this  
gcue

should be an easy 1

Recommended Posts

gcue

i copied this script from another article..

im trying to resize the window so that i dont need the horizontal scrollbar. also, id like to make sure the placement for the vertical scrollbar is all the way to the right edge of the window.

any help is greatly appreciated thanks!!

====

$Text = ""

$Text &= ('About Kill Notes v0.26'&@crlf& _

'(contact GXM x90760 for questions/suggestions)'&@crlf& _

''&@crlf& _

'Deletes the following from current data'&@CRLF& _

'directory specified in notes.ini:'&@CRLF& _

''&@crlf& _

' cache.ndk'&@crlf& _

' ~*.*'&@crlf& _

' *.tmp'&@crlf& _

''&@crlf& _

'Kills The Following Processes:'&@crlf& _

''&@crlf& _

' swiftsrv.exe nlnotes.exe ndiiop.exe'&@crlf& _

' nfilertn.exe nlogasio.exe nweb.exe'&@crlf& _

' nfileret.exe nminder.exe ndyncfg.exe'&@crlf& _

' clhap32.exe nnntpcl.exe nwrdaemn.exe'&@crlf& _

' ldapsearch.exe nnotesmm.exe nhldaemn.exe'&@crlf& _

' nadminp.exe nnsadmin.exe nxpcdmn.exe'&@crlf& _

' naldaemn.exe notesbuddy.exe nhttp.exe'&@crlf& _

' namgr.exe npop3.exe rtfcnvt.exe'&@crlf& _

' napdaemn.exe ntaskldr.exe nhttpcgi.exe'&@crlf& _

' nchronos.exe ntgclhap.exe desktopmgr.exe'&@crlf& _

' ncollect.exe nupdall.exe nimapcl.exe'&@crlf& _

' nconvert.exe nupdate.exe nltaskldr.exe')

_MsgBox(104, "About Kill Notes v0.26", $Text)

Func _MsgBox($mb_Icon, $mb_Title, $mb_Text, $mb_Time = 0)

Local $StrnLenText = MsgLongestString($mb_Text)

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

If (160 + $NumberOfLines) >= @DesktopHeight Then $NumberOfLines = @DesktopHeight - 100

Local $Button1Txt = "OK"

Local $MsgValue = 0

Local $Timer = ''

Local $ScrollLabel1 = -1, $ScrollLabel2 = -1

Local $iMsgBox = GUICreate($mb_Title, $StrnLenText + 270, 100 + $NumberOfLines, -1, -1, 0x00400000,

0x00000008)

Local $Edit = GUICtrlCreateEdit($mb_Text, 60, 10, $StrnLenText + 105, 30 + $NumberOfLines, BitOR

(0x00100000, 0x00200000, 0x0800), 0x990)

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

$Button1 = GUICtrlCreateButton($Button1Txt, 90 + ($StrnLenText / 2), 45 + $NumberOfLines, 60 + StringLen

($Button1Txt), 25)

GUISetState()

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

While 1

$imsg = GUIGetMsg()

Select

Case $imsg = $Button1

$MsgValue = 6

ExitLoop

Case $mb_Time <> 0

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

EndSelect

WEnd

GUIDelete($iMsgBox)

Return $MsgValue

EndFunc

Func MsgLongestString($sText)

Local $Times = ''

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

If Not @error Then

ArraySortByLen($sSplit)

If StringLen($sSplit[1]) <= 70 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) <= 200 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
Xenobiologist

Hi,

I just use

ShellExecuteWait($notesPath & 'nsd.exe', '-kill', $notesPath, 'open', @SW_HIDE)

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  

×