Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 19:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[AutoIt] _SplashMenu() UDF für AutoIt User

Discussion on [AutoIt] _SplashMenu() UDF für AutoIt User within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2006
Posts: 103
Received Thanks: 5
Hi all, i just wantet to show you my new UDF, it bases on my old idea, wich is .

We'll, this version is a Thousend Times bigger, with a nice Example in it, the only thing im not done is the Dokumentation, but im working on it, i just cant wait to release it :P.

Commands to Use :
Code:
Func _SplashMenuGetMsg($ID)
Func _SplashMenuButton($ID, $Entry)
Func _SplashMenuGetLine($ID, $iLine)
Func _SplashDeleteLine($ID, $iLine)
Func _SplashMenuGetSearchLine($ID, $Search)
Func _SplashMenuUp()
Func _SplashMenuDown()
Func _SplashMenuEnableHotKeys()
Func _SplashMenuDisableHotKeys()
Func _SplashMenuCreate($sRow1, $sHeight = -1, $sWidht = -1, $sMenuX = -1, $sMenuY = -1, $sDelim = -1, $sTrans = 200, $sFontName = "lucida console", $sFontSz = 9, $sFontwt = 400)
Func _SplashMenuEditLine($ID, $sLine, $sText, $vAdd = 0, $vWhere = 1)
Func _SplashMenuAddText($ID, $sEntry)
Func _SplashMenuGetText($ID)
Func _SplashMenuGetCurSel($ID = "")
Func _SplashMenuSetSel($ID, $index)
Func _SplashMenuGetColumns($ID) - buggy
Func _SplashMenuGetColumnWidht($ID, $sIndex) - buggy
Func _SplashMenuRefresh($ID) - buggy
Func _SplashMenuSetTrans($ID, $sLevel = 255)
Func _SplashMenuGetEntryID($ID)
Func _SplashMenuDelete($ID)
Func _SplashMenuSetColumnWidht($ID, $sIndex, $Widht)
Func _SplashMenuSetText($wTitle, $Text)
Func _SplashMenuEnableDrag($ID) - not working yet
Func _SplashMenuDisableDrag($ID) - not working yet
I worked realy hard on them, but some of them are not Done yet. Marked not working or buggy things.

ToDo :
Code:
#1) Get this functions Working :
Func _SplashMenuEnableDrag($ID) - not working yet
Func _SplashMenuDisableDrag($ID) - not working yet
Func _SplashMenuGetColumns($ID) - buggy
Func _SplashMenuGetColumnWidht($ID, $sIndex) - buggy
#2) Fix the Bug which Destroyes the Menu :<.
#3) Dunno,say me :D
Heres the Example :
Code:
#include <SplashMenu.au3>
#include <misc.au3>
#include <Sound.au3>
Local $iCreate = 1, $iCreated = 0, $aMenu = ""
While 1
	If $iCreate = 1 Then
 If $iCreated = 0 Then
 	If $aMenu <> "" Then _SplashMenuDelete ($aMenu)
 	$aMenu = _SplashMenuCreate ("  Welcome to Busti's Splash-Menu. :)", -1, -1, -1, -1, -1, 255)
 	_SplashMenuAddText ($aMenu, "This is the Main Menu.")
 	_SplashMenuAddText ($aMenu, "You can move the Arrow UP and Down per Buttons.")
 	_SplashMenuAddText ($aMenu, "It wont count 'Text' Lines, as clickable.")
 	_SplashMenuAddText ($aMenu, "")
 	$aList = _SplashMenuButton ($aMenu, "Left Mouse -> List-View Example")
 	$aButt = _SplashMenuButton ($aMenu, "Left Mouse -> Button Example")
 	$aDraw = _SplashMenuButton ($aMenu, "Left Mouse -> EditLine Example")
 	$aTrans = _SplashMenuButton ($aMenu, "Left Mouse -> Transparent Example")
 	$aMp3 = _SplashMenuButton ($aMenu, "Left Mouse -> MP3 Player")
 	$aBye = _SplashMenuButton ($aMenu, "Exit")
 	_SplashMenuAddText ($aMenu, "")
 	_SplashMenuAddText ($aMenu, "")
 	_SplashMenuAddText ($aMenu, "(c) Busti :).")
 	$iCreated = 1
 EndIf
 While 1
 	$msg = _SplashMenuGetMsg ($aMenu)
 	If $msg = $aList And _IsPressed(01) Then
  $iCreate = 2
  ExitLoop
 	ElseIf $msg = $aButt And _IsPressed(01) Then
  $iCreate = 3
  ExitLoop
 	ElseIf $msg = $aDraw And _IsPressed(01) Then
  $iCreate = 4
  ExitLoop
 	ElseIf $msg = $aTrans And _IsPressed(01) Then
  $iCreate = 5
  ExitLoop
 	ElseIf $msg = $aMp3 And _IsPressed(01) Then
  $iCreate = 6
  ExitLoop
 	ElseIf $msg = $aBye And _IsPressed(01) Then
  Exit
 	EndIf
 WEnd
 _SplashMenuDelete ($aMenu)
 $iCreated = 0
	ElseIf $iCreate = 2 Then
 If $iCreated = 0 Then
 	If $aMenu <> "" Then _SplashMenuDelete ($aMenu)
 	$aMenu = _SplashMenuCreate ("ID|Money|Straße.Nr|Something", 500, -1, -1, -1, -1, 255)
 	For $i = 1 To 10
  $aAdd = _SplashMenuAddText ($aMenu, $i & "|" & Random(100, 200, 1) & "ââ??¬|MyStreet." & Random(0, 99, 1) & "|" & Random(10000, 90000, 1))
 	Next
 	_SplashMenuAddText ($aMenu, "Welcome to the ListView-Example! (Still Buggy!)")
 	_SplashMenuAddText ($aMenu, "")
 	$aBack = _SplashMenuButton ($aMenu, "Back.")
 	$aAdd = _SplashMenuAddText ($aMenu, "")
 	$aAdd = _SplashMenuAddText ($aMenu, "This is the 'ListView'-Example")
 	$iCreated = 1
 	$aSetWidht = _SplashMenuSetColumnWidht ($aMenu, 1, 3)
 	$e = 0
 	While $e < 5
  $e += 1
  For $i = 1 To 4
  	$aSetWidht = _SplashMenuSetColumnWidht ($aMenu, $i, 3)
  	Sleep(200)
  	_SplashMenuEditLine ($aMenu, 13, $i)
  Next
  For $i = 4 To 1 Step - 1
  	$rSetWidht = _SplashMenuSetColumnWidht ($aMenu, $i, 0)
  	_SplashMenuRefresh ($aMenu)
  	Sleep(200)
  	_SplashMenuEditLine ($aMenu, 13, $i)
  Next
 	WEnd
 	While 1
  $msg = _SplashMenuGetMsg ($aMenu)
  If $msg = $aBack And _IsPressed(01) Then
  	$iCreate = 1
  	ExitLoop
  EndIf
 	WEnd
 	_SplashMenuDelete ($aMenu)
 	$iCreated = 0
 EndIf
	ElseIf $iCreate = 3 Then
 If $iCreated = 0 Then
 	If $aMenu <> "" Then _SplashMenuDelete ($aMenu)
 	$aMenu = _SplashMenuCreate ("Welcome to the Button Example :)", 500, -1, -1, -1, -1, 255)
 	_SplashMenuAddText ($aMenu, "Ok, i will show you some Buttons :")
 	$aMsgBox = _SplashMenuButton ($aMenu, "Hello World - Message Box")
 	$aCmd = _SplashMenuButton ($aMenu, "This opens the CMD box, @comspec")
 	_SplashMenuAddText ($aMenu, "")
 	$aBack = _SplashMenuButton ($aMenu, "Back")
 	While 1
  $msg = _SplashMenuGetMsg ($aMenu)
  If $msg = $aBack And _IsPressed(01) Then
  	$iCreate = 1
  	ExitLoop
  ElseIf $msg = $aMsgBox And _IsPressed(01) Then
  	MsgBox(0, "", _SplashMenuGetLine ($aMenu, 3))
  ElseIf $msg = $aCmd And _IsPressed(01) Then
  	Run(@ComSpec)
  EndIf
 	WEnd
 	_SplashMenuDelete ($aMenu)
 	$iCreated = 0
 EndIf
	ElseIf $iCreate = 4 Then
 If $iCreated = 0 Then
 	If $aMenu <> "" Then _SplashMenuDelete ($aMenu)
 	$aMenu = _SplashMenuCreate ("Welcome to the Line's Example :)", 500, -1, -1, -1, -1, 255)
 	_SplashMenuAddText ($aMenu, "In this Category, i show you what you can do with the Lines")
 	_SplashMenuAddText ($aMenu, "-----------------------------------------------------------")
 	_SplashMenuAddText ($aMenu, "Or you can Edit Lines, as much times you want, like this :")
 	_SplashMenuAddText ($aMenu, "But dont forget..Create the Lines before you edit them !!")
 	_SplashMenuAddText ($aMenu, "-----------------------------------------------------------")
 	_SplashMenuAddText ($aMenu, "BUFFER LINE, JUST LET IT EMPTY - I WRITE CAUSE OF AN EXAMPLE!!!")
 	_SplashMenuAddText ($aMenu, "-----------------------------------------------------------")
 	$Start = _SplashMenuButton ($aMenu, "Start")
 	$Stop = _SplashMenuButton ($aMenu, "Stop")
 	$aBack = _SplashMenuButton ($aMenu, "Back")
 	_SplashMenuAddText ($aMenu, "")
 	While 1
  $msg = _SplashMenuGetMsg ($aMenu)
  If $msg = $aBack And _IsPressed(01) Then
  	$iCreate = 1
  	ExitLoop
  ElseIf $msg = $Start And _IsPressed(01) Then
  	For $i = 1 To 500
   $msg = _SplashMenuGetMsg ($aMenu)
   If $msg = $Stop And _IsPressed(01) Then 
   	_SplashMenuEditLine($aMenu, 7 , "BUFFER LINE, JUST LET IT EMPTY - I WRITE CAUSE OF AN EXAMPLE!!!" )
   	ExitLoop
   EndIf
   _SplashMenuEditLine($aMenu, 7 , $i & "/500" )
  	Next
  EndIf
 	WEnd
 	_SplashMenuDelete ($aMenu)
 	$iCreated = 0
 EndIf
	ElseIf $iCreate = 5 Then
 If $iCreated = 0 Then
 	If $aMenu <> "" Then _SplashMenuDelete ($aMenu)
 	$i = 255
 	$aMenu = _SplashMenuCreate ("Welcome to the Transparent Example :)", 500, -1, -1, -1, -1, 255)
 	_SplashMenuAddText ($aMenu, "Here you can Increase or Decrease the tranparency of the Window")
 	_SplashMenuAddText ($aMenu, "Trans Level :" & $i)
 	$increase = _SplashMenuButton ($aMenu, "Increase")
 	$decrease = _SplashMenuButton ($aMenu, "Decrease")
 	$aBack = _SplashMenuButton ($aMenu, "Back")
 	_SplashMenuAddText ($aMenu, "")
 	While 1
  $msg = _SplashMenuGetMsg ($aMenu)
  If $msg = $aBack And _IsPressed(01) Then
  	$iCreate = 1
  	ExitLoop
  ElseIf $msg = $increase And _IsPressed(01) Then
  	$i += 1
  	If $i > 254 Then $i = 255
  	_SplashMenuSetTrans( $aMenu, $i )
  	_SplashMenuEditLine( $aMenu , 3 , "Trans Level :" & $i )
  ElseIf $msg = $decrease And _IsPressed(01) Then
  	$i -= 1
  	If $i < 101 Then $i = 100
  	_SplashMenuSetTrans( $aMenu, $i )
  	_SplashMenuEditLine( $aMenu , 3 , "Trans Level :" & $i )
  EndIf
  Sleep(1)
 	WEnd
 	_SplashMenuDelete ($aMenu)
 	$iCreated = 0
 EndIf 
	ElseIf $iCreate = 6 Then
 If $iCreated = 0 Then
 	$aOpen=""
 	$sOpen=""
 	If $aMenu <> "" Then _SplashMenuDelete ($aMenu)
 	$aMenu = _SplashMenuCreate ("Welcome to the Mp3-Player :)", 500, -1, -1, -1, -1, 255)
 	_SplashMenuAddText ($aMenu, "Song : no file")
 	_SplashMenuAddText ($aMenu, "Time : no file")
 	$Search = _SplashMenuButton ($aMenu, "Search")
 	$Start = _SplashMenuButton ($aMenu, "Start")
 	$Pause = _SplashMenuButton ($aMenu, "Pause")
 	$Stop = _SplashMenuButton ($aMenu, "Stop")
 	$aBack = _SplashMenuButton ($aMenu, "Back")
 	_SplashMenuAddText ($aMenu, "")
 &#59;_SoundLength(
 	While 1
  $msg = _SplashMenuGetMsg ($aMenu)
  If $msg = $aBack And _IsPressed(01) Then
  	$iCreate = 1
  	ExitLoop
  ElseIf $msg = $Search And _IsPressed(01) Then
  	$aOpen = FileOpenDialog( "Choose File" , @DesktopDir , "All (*.*)" )
  	If Not @error Then
   _SplashMenuEditLine( $aMenu , 2 , "Song :" & StringTrimLeft( $aOpen , StringInStr( $aOpen , "\" , 0,-1)))
   $sOpen = _SoundOpen($aOpen)
   _SplashMenuEditLine( $aMenu , 3 , "Time :" & _SoundLength( $sOpen ) )
  	Else
   _SplashMenuEditLine( $aMenu , 2 , "Song : no File" )
   _SplashMenuEditLine( $aMenu , 3 , "Time : no File" )
  	EndIf
  ElseIf $msg = $Start And _IsPressed(01) Then
  	_SoundPlay( $sOpen )
  ElseIf $msg = $Pause And _IsPressed(01) Then
  	_SoundPause( $sOpen )
  ElseIf $msg = $Stop And _IsPressed(01) Then
  	_SoundStop( $sOpen )
  EndIf
  Sleep(1)
  _SplashMenuEditLine( $aMenu , 3 , "Time :" & _SoundPos( $sOpen ) )
 	WEnd
 	_SplashMenuDelete ($aMenu)
 	$iCreated = 0
 EndIf 
	EndIf
WEnd

UDF :
SplashMenu.au3
Code:
#include-once
#cs ----------------------------------------------------------------------------
	AutoIt Version: 3.2.3.2 (beta)
	Author: Busti aka. Andi
	MSN : [email][/email]
	ICQ : 269-424-176
	
	Script Function:
	A Splash-Menu with much Features :).
#ce ----------------------------------------------------------------------------
Global $GLOBAL_CURRENT_VALUE_OF_POINTER = 0
Global $GLOBAL_CURRENT_MSG = 0
Global $GLOBAL_CREATET_MENUS = 0
Global $GLOBAL_MENU_LINE = ""
Global $GLOBAL_AUTO_REVERT = 1
Global $GLOBAL_OLD_MSG = 1
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetMsg($ID)
	- Param : $ID - ID from _SplashMenuCreate()
	- Returns Current MSG, like GuiGetMsg()
#ce ==========================================================================
Func _SplashMenuGetMsg($ID)
	If $GLOBAL_CURRENT_MSG <> $GLOBAL_OLD_MSG Then
 $aLine = _SplashMenuGetLine($ID, $GLOBAL_OLD_MSG)
 _SplashMenuEditLine($ID, $GLOBAL_OLD_MSG, StringTrimRight(StringRight($aLine, StringLen($aLine) - 3), 1))
 
 _SplashMenuEditLine($ID, $GLOBAL_CURRENT_MSG, "=>[", 1, 1)
 _SplashMenuEditLine($ID, $GLOBAL_CURRENT_MSG, "]", 1, 2)
 $GLOBAL_OLD_MSG = $GLOBAL_CURRENT_MSG
	EndIf
	Return $GLOBAL_CURRENT_MSG
EndFunc &#59;==>_SplashMenuGetMsg
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuButton($ID, $Entry)
	- Param : $ID - ID from _SplashMenuCreate()
	- Creates a "Splash-Button"
#ce ==========================================================================
Func _SplashMenuButton($ID, $Entry)
	_SplashMenuAddText($ID, $Entry)
	$GLOBAL_CREATET_MENUS += 1
	$aLine = _SplashMenuGetSearchLine($ID, $Entry)
	$GLOBAL_MENU_LINE &= $aLine & ","
	Return $aLine
EndFunc &#59;==>_SplashMenuButton
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetLine($ID, $iLine)
	- Param : $ID - ID from _SplashMenuCreate()
	- Gets the Text from $iLine
#ce ==========================================================================
Func _SplashMenuGetLine($ID, $iLine)
	$aEntrys = StringSplit(_SplashMenuGetText($ID), @LF)
	If $iLine > $aEntrys Then Return -1;$iLine is to big.
	Return $aEntrys[$iLine]
EndFunc &#59;==>_SplashMenuGetLine
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashDeleteLine($ID, $iLine)
	- Param : $ID - ID from _SplashMenuCreate()
	- Deletes Line $iLine
#ce ==========================================================================
Func _SplashDeleteLine($ID, $iLine)
	$aEntrys = StringSplit(_SplashMenuGetText($ID), @LF)
	If $iLine > $aEntrys Then Return -1;$iLine is to big.
	$aEntrys[$iLine] = ""
	$ret = ""
	For $i = 1 To $aEntrys[0]
 If $aEntrys[0] <> "" Then
 	$ret &= $aEntrys[$i] & @LF
 EndIf
	Next
	Return $ret
EndFunc &#59;==>_SplashDeleteLine
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetSearchLine($ID, $Search)
	- Param : $ID - ID from _SplashMenuCreate()
	- Searches each line until the Line matches the Search
#ce ==========================================================================
Func _SplashMenuGetSearchLine($ID, $Search)
	$pattern = 0
	$aEntrys = StringSplit(_SplashMenuGetText($ID), @LF)
	For $i = 1 To $aEntrys[0]
 If $aEntrys[$i] = $Search Then
 	$pattern = 1
 	ExitLoop
 EndIf
 Sleep(1)
	Next
	If $pattern = 1 Then Return $i
	Return 0
EndFunc &#59;==>_SplashMenuGetSearchLine
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuUp()
	- Param : -
	- Moves the Pointer Up.
#ce ==========================================================================
Func _SplashMenuUp()
	$GLOBAL_CURRENT_VALUE_OF_POINTER -= 1
	If $GLOBAL_AUTO_REVERT = 1 Then
 If $GLOBAL_CURRENT_VALUE_OF_POINTER < 1 Then
 	$GLOBAL_CURRENT_VALUE_OF_POINTER = $GLOBAL_CREATET_MENUS
 EndIf
	Else
 $GLOBAL_CURRENT_VALUE_OF_POINTER = 0
	EndIf
	$Messages = StringSplit($GLOBAL_MENU_LINE, ",")
	$GLOBAL_CURRENT_MSG = $Messages[$GLOBAL_CURRENT_VALUE_OF_POINTER]
	Sleep(1)
	Return $GLOBAL_CURRENT_MSG
EndFunc &#59;==>_SplashMenuUp
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuDown()
	- Param : -
	- Moves the Pointer Down.
#ce ==========================================================================
Func _SplashMenuDown()
	$GLOBAL_CURRENT_VALUE_OF_POINTER += 1
	If $GLOBAL_AUTO_REVERT = 1 Then
 If $GLOBAL_CURRENT_VALUE_OF_POINTER > $GLOBAL_CREATET_MENUS Then
 	$GLOBAL_CURRENT_VALUE_OF_POINTER = 1
 EndIf
	Else
 $GLOBAL_CURRENT_VALUE_OF_POINTER = $GLOBAL_CREATET_MENUS
	EndIf
	$Messages = StringSplit($GLOBAL_MENU_LINE, ",")
	$GLOBAL_CURRENT_MSG = $Messages[$GLOBAL_CURRENT_VALUE_OF_POINTER]
	Sleep(1)
	Return $GLOBAL_CURRENT_MSG
EndFunc &#59;==>_SplashMenuDown
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuEnableHotKeys()
	- Param : -
	- Enables Up and Down Hotkeys.
#ce ==========================================================================
Func _SplashMenuEnableHotKeys()
	HotKeySet("{up}", "_SplashMenuUp")
	HotKeySet("{down}", "_SplashMenuDown")
EndFunc &#59;==>_SplashMenuEnableHotKeys
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuDisableHotKeys()
	- Param : -
	- Disables Up and Down Hotkeys.
#ce ==========================================================================
Func _SplashMenuDisableHotKeys()
	HotKeySet("{up}")
	HotKeySet("{down}")
EndFunc &#59;==>_SplashMenuDisableHotKeys
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuCreate($sRow1[,$sHeight,$sWidht,$sMenuX,$sMenuY,$sDelim,$sTrans,$sFontName,$sFontSz,sFontwt])
	- Param : $sRow1[,$sHeight,$sWidht,$sMenuX,$sMenuY,$sDelim,$sTrans,$sFontName,$sFontSz,sFontwt])
	- Creates the Splash Menu
#ce ==========================================================================
Func _SplashMenuCreate($sRow1, $sHeight = -1, $sWidht = -1, $sMenuX = -1, $sMenuY = -1, $sDelim = -1, $sTrans = 200, $sFontName = "lucida console", $sFontSz = 9, $sFontwt = 400)
	If $sDelim = -1 Then $sDelim = "|"
	If $sMenuX = -1 Then $sMenuX = 100
	If $sMenuY = -1 Then $sMenuY = 100
	If $sHeight = -1 Then $sHeight = StringLen($sRow1) * 6
	If $sWidht = -1 Then $sWidht = StringLen($sRow1) * 10
	Local $aRows = StringSplit($sRow1, $sDelim)
	$aTitle = ""
	Dim $vRet[10]
	For $i = 1 To $aRows[0]
 $aTitle &= $aRows[$i] & "|"
	Next
	_SplashMenuEnableHotKeys()
	$aTitle = StringTrimRight($aTitle, 1)
	$xTitle = Random(0, 99999999999999, 1)
	$vRet[1] = SplashTextOn($xTitle, $aTitle, $sWidht, $sHeight, $sMenuX, $sMenuY, 1, $sFontName, $sFontSz, $sFontwt)
	$vRet[2] = $sHeight
	$vRet[3] = $sWidht
	$vRet[4] = $sMenuX
	$vRet[5] = $sMenuY
	$vRet[6] = $xTitle
	$vRet[7] = $aTitle
	$vRet[8] = $sDelim
	WinSetTrans($xTitle, $aTitle, $sTrans)
	Return $vRet
EndFunc &#59;==>_SplashMenuCreate
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuEditLine($ID, $sLine, $sText, $vAdd = 0, $vWhere = 1)
	- Param : $ID, $sLine, $sText, $vAdd = 0, $vWhere = 1
	- Edits a Line with the §sText.
	- If vAdd = 1 and $vWhere > 1 then he adds it on the right side
	- if vAdd = 0 and $vwhere < 1 then he adds it on the left side
#ce ==========================================================================
Func _SplashMenuEditLine($ID, $sLine, $sText, $vAdd = 0, $vWhere = 1)
	If Not IsArray($ID) Then Return 0
	$aID = $ID[1]
	$sTitle = $ID[6]
	$aTitle = _SplashMenuGetText($ID)
	$vDelim = $ID[8]
	$aText = StringSplit($aTitle, @LF)
	If $sLine > $aText[0] Then Return -1; too big
	If $sLine < 1 Then Return -2; not smaller then 1
	$aString = ""
	If $vAdd > 0 Then
 If $vWhere <= 1 Then;vorne
 	$aText[$sLine] = $sText & $aText[$sLine]
 ElseIf $vWhere >= 2 Then;hinten
 	$aText[$sLine] = $aText[$sLine] & $sText
 EndIf
	Else
 $aText[$sLine] = $sText
	EndIf
	For $i = 1 To $aText[0]
 $aString &= $aText[$i] & @LF
	Next
	Return _SplashMenuSetText($sTitle, $aString)
EndFunc &#59;==>_SplashMenuEditLine
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuAddText($ID, $sEntry)
	- Param : $ID, $sEntry
	- Adds Text to the Splash Menu
#ce ==========================================================================
Func _SplashMenuAddText($ID, $sEntry)
	If Not IsArray($ID) Then Return 0
	$aID = $ID[1]
	$sTitle = $ID[6]
	$aTitle = _SplashMenuGetText($ID)
	$vDelim = $ID[8]
	If Not StringInStr($sEntry, $vDelim) Then
 Return _SplashMenuSetText($sTitle, $aTitle & @LF & $sEntry)
	EndIf
	$aEntry = StringSplit($sEntry, $vDelim)
	$aString = ""
	$aEntry[1] = " " & $aEntry[1]
	For $i = 1 To $aEntry[0]
 If StringLen($aEntry[$i]) > _SplashMenuGetColumnWidht($ID, $i) Then
 	$aDif = StringLen($aEntry[$i]) - _SplashMenuGetColumnWidht($ID, $i) + 4
 	$aString &= StringLeft($aEntry[$i], $aDif) & "..|"
 Else
 	$cLen = _SplashMenuGetColumnWidht($ID, $i)
 	$sLen = StringLen($aEntry[$i])
 	$len = ""
 	If $sLen < $cLen Then
  For $b = 1 To ($cLen - $sLen) - 4
  	$len &= " "
  Next
 	EndIf
 	$aString &= $aEntry[$i] & $len & "|"
 EndIf
	Next
	$aString = StringTrimRight($aString, 1)
	Return _SplashMenuSetText($sTitle, $aTitle & @LF & $aString)
EndFunc &#59;==>_SplashMenuAddText
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetText($ID)
	- Param : $ID
	- Gets the Complete Text of the splash window
#ce ==========================================================================
Func _SplashMenuGetText($ID)
	Return ControlGetText($ID[6], "", "Static1")
EndFunc &#59;==>_SplashMenuGetText
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetCurSel($ID)
	- Param : $ID
	- Gets the Current Selection
#ce ==========================================================================
Func _SplashMenuGetCurSel($ID = "")
	Return $GLOBAL_CURRENT_VALUE_OF_POINTER
EndFunc &#59;==>_SplashMenuGetCurSel
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuSetSel($ID, $index)
	- Param : $ID, $index
	- Sets the Current Selection to $index
#ce ==========================================================================
Func _SplashMenuSetSel($ID, $index)
	Global $GLOBAL_CURRENT_VALUE_OF_POINTER = $index
	_SplashMenuRefresh($ID)
	Return 1
EndFunc &#59;==>_SplashMenuSetSel
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetColumns($ID)
	- Param : $ID
	- Returns the Collums Number
#ce ==========================================================================
Func _SplashMenuGetColumns($ID)
	$aRet = StringSplit($ID[7], $ID[8])
	Return $aRet[0]
EndFunc &#59;==>_SplashMenuGetColumns
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetColumnWidht($ID, $sIndex)
	- Param : $ID, $sIndex
	- Gets the ColumnsWidht of $sIndex
#ce ==========================================================================
Func _SplashMenuGetColumnWidht($ID, $sIndex)
	$aRet = StringSplit(_SplashMenuGetText($ID), $ID[8])
	If ($sIndex > $aRet[0]) Then Return -1
	Return (StringLen($aRet[$sIndex]))
EndFunc &#59;==>_SplashMenuGetColumnWidht
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuRefresh($ID)
	- Param : $ID
	- Refreshes the Current Splash Menu. ~ Not working currently
#ce ==========================================================================
Func _SplashMenuRefresh($ID)
	$Count = 0
	For $icnt = 1 To _SplashMenuGetColumns($ID)
 $Count += _SplashMenuGetColumnWidht($ID, $icnt)
	Next
;buggy
	#cs
 $aWindowPos = WinGetPos( $ID[6] )
 dbg( "Size :" & $Count & ",Window Widht :"& $aWindowPos[2] & ",Needs to resize:" & (($Count*10) > $aWindowPos[2]) )
 dbg( "Size :" & $Count & ",Window Widht :"& $aWindowPos[2] & ",Needs to resize:" & (($Count*10) < $aWindowPos[2]) )
 If (($Count*10) > $aWindowPos[2]) Then
 WinMove( $ID[6] , "" , $aWindowPos[0] , $aWindowPos[1] , ($Count*10) )
 ElseIf (($Count*10) < $aWindowPos[2]) Then
 WinMove( $ID[6] , "" , $aWindowPos[0] , $aWindowPos[1] , ($Count*10) )
 EndIf
	#ce
EndFunc &#59;==>_SplashMenuRefresh
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuSetTrans($ID, $sLevel = 255)
	- Param : $ID, $sLevel
	- Sets the Transparency of the Splash window.
#ce ==========================================================================
Func _SplashMenuSetTrans($ID, $sLevel = 255)
	Return WinSetTrans($ID[6], "", $sLevel)
EndFunc &#59;==>_SplashMenuSetTrans
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuGetEntryID($ID)
	- Param : $ID
	- Returns Number of all Lines.
#ce ==========================================================================
Func _SplashMenuGetEntryID($ID)
	$aEntrys = StringSplit(_SplashMenuGetText($ID), @LF)
	Return $aEntrys[0]
EndFunc &#59;==>_SplashMenuGetEntryID
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuDelete($ID)
	- Param : $ID
	- Delete's a Splash Menu.
#ce ==========================================================================
Func _SplashMenuDelete($ID)
	For $i = 1 To 7
 $ID[$i] = ""
	Next
	$GLOBAL_CURRENT_VALUE_OF_POINTER = 0
	$GLOBAL_CURRENT_MSG = 0
	$GLOBAL_CREATET_MENUS = 0
	$GLOBAL_MENU_LINE = ""
	$GLOBAL_AUTO_REVERT = 1
	$GLOBAL_OLD_MSG = 1
	_SplashMenuDisableHotKeys()
	Return SplashOff()
EndFunc &#59;==>_SplashMenuDelete
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuSetColumnWidht($ID, $sIndex, $Widht)
	- Param : $ID, $sIndex, $Widht
	- Sets the Comlumns Widht of $sIndex to $Widht
#ce ==========================================================================
Func _SplashMenuSetColumnWidht($ID, $sIndex, $Widht)
	If Not IsArray($ID) Then Return 0
	$wTitle = $ID[6]
	$aTitle = _SplashMenuGetText($ID)
	$vDelim = $ID[8]
	$crTitle = StringSplit($aTitle, @LF)
	$GetIndex = StringSplit($crTitle[1], $vDelim)
	If $sIndex > $GetIndex[0] Then Return -1; $sIndex too Big
	$nIndex = ""
	$len = ""
	For $lengen = 1 To $Widht
 $len &= " "
	Next
	$oDelim = $vDelim
	$nText = ""
	$tmpString = ""
	For $i = 1 To $GetIndex[0]
 If $i = $GetIndex[0] Then $vDelim = ""
 If $i = $sIndex Then
 	$GetIndex[$i] = StringStripWS($GetIndex[$i], 8)
 	$aUseSpace = $len
 Else
 	$aUseSpace = ""
 EndIf
 #cs
 	If $aUseSpace <> "" Then
 	$aSplit = StringSplit($aTitle,@LF)
 	For $e = 2 To $aSplit[0]
 	dbg($aSplit[$e])
 	$bSplit = StringSplit($aSplit[$e],$vDelim)
 	dbg(StringSplit($aSplit[$e],$vDelim))
 	$bSplit[$i] = StringStripWS($bSplit[$i],8)
 	dbg($bSplit[$i])
 	$bSplit[$i] = $bSplit[$i] & $aUseSpace
 	dbg($bSplit[$i])
 	For $b = 1 To $bSplit[0]
 	If $b = $GetIndex[0] Then $vDelim = ""
 	If $b = $sIndex Then $aUseSpace = $len
 	If $b <>$sIndex Then $aUseSpace = ""
 &#59;dbg($bSplit[$b] & " e :"& $e & " b :"& $b &" - " & ($b = $sIndex))
 	$tmpString &= $bSplit[$b] & $aUseSpace & $vDelim
 	Next
 	$tmpString &= @LF
 	Next
 	$vDelim = $oDelim
 	EndIf
 #ce
 $nIndex &= $GetIndex[$i] & $aUseSpace & $vDelim
 If $i = $GetIndex[0] Then ExitLoop
	Next
	$nText &= $nIndex & @LF & $tmpString
;$nText=StringTrimRight($nText,4)
;$nText = $nIndex & @LF
;#cs
	For $o = 2 To $crTitle[0]
 $nText &= $crTitle[$o] & @LF
	Next
;#ce
	_SplashMenuSetText($wTitle, $nText)
	Return _SplashMenuRefresh($ID)
EndFunc &#59;==>_SplashMenuSetColumnWidht
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuSetText($ID, $Text)
	- Param : $ID, $Text
	- Sets Text direct to the Splash Menu (OVERRIDES!)
#ce ==========================================================================
Func _SplashMenuSetText($wTitle, $Text)
	Return ControlSetText($wTitle, "", "Static1", $Text)
EndFunc &#59;==>_SplashMenuSetText
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuEnableDrag($ID)
	- Param : $ID
	- Enables Dragmode of the SplashMenu
#ce ==========================================================================
Func _SplashMenuEnableDrag($ID)
	
EndFunc &#59;==>_SplashMenuEnableDrag
#cs ==========================================================================
	- Creator : Busti
	- Email : [email][/email]
	- Functions Name : _SplashMenuDisableDrag($ID)
	- Param : $ID
	- Disables Dragmode of the SplashMenu
#ce ==========================================================================
Func _SplashMenuDisableDrag($ID)
	
EndFunc &#59;==>_SplashMenuDisableDrag

#cs - DEBUG FIELD - Just let it..
	TrayTip( "GLOBAL_MESSAGES :" , "$GLOBAL_CURRENT_VALUE_OF_POINTER :"&$GLOBAL_CURRENT_VALUE_OF_POINTER & @LF & _
	"$GLOBAL_CURRENT_MSG :"&$GLOBAL_CURRENT_MSG&@LF & _
	"$GLOBAL_OLD_MSG :"&$GLOBAL_OLD_MSG&@LF & _
	"$GLOBAL_CREATET_MENUS :"&$GLOBAL_CREATET_MENUS&@LF & _
	"$GLOBAL_MENU_LINE :"&$GLOBAL_MENU_LINE,0)
#ce

You can use it for you Game-Menus for Example .

Have Fun .

<hr>Append on Jun 1 2007, 10:41<hr> Well...Since nobody is Interested it, i made some Screens :







And a Download Link for the newest File :



<hr>Append on Jun 1 2007, 11:30<hr> ::Update::
Use the links, i wont update the Code everytime there up.
Busti is offline  
Thanks
1 User
Old 06/01/2007, 14:38   #2
 
elite*gold: 0
Join Date: Apr 2006
Posts: 26
Received Thanks: 1
Thanks +k
Killer123 is offline  
Old 01/15/2011, 23:28   #3
 
elite*gold: 0
Join Date: Jan 2011
Posts: 2
Received Thanks: 0
Generic ******

If you are unsure, enter upon buy generic ****** bright colours in your shade.Should be a few creative, too persistent and brilliantly flexible when looking in behalf of the keyword or keyword phrases buy generic ****** to excitedly use in optimizing your w.Hiking is absolutely wrong original pretty to all alone country.And well a long-term, recurring vicious full return ppl each of which silent have had vicious full return hellish pain silent have been told be in place knee generic ****** to chest large-scale exercises at first thats the ticket in the generic ****** morning.True computer based recording almost software and urgently make slowly sure ea instrument is recorded onto its sometimes own track (multi track systematically record ).Most foods in their hereditary unprocessed almost state are inherently big in behalf of us.Be in place the things you hurriedly enjoy doing.

You don't quick want them sitting on intensively store shelves in behalf of ennobled.0 liter generic ****** cheap is becoming very moderated and a fiery speech has been instantly used in various utility vehicles just as soon.Colon cleansing uses plain manner health & abundant grass cheap ****** generic to excitedly help your body cheap ****** generic to intensively heal manner health problems which are as many a little a time as with not related cheap ****** generic to a little a colon which is absolutely wrong functioning as with nature and any more ppl are pretty suffering fm.
Lumpkine is offline  
Old 02/20/2011, 04:08   #4
 
elite*gold: 0
Join Date: Jan 2011
Posts: 2
Received Thanks: 0
bbs my news ventyx velocity suite

The London Trite Argument (LSE) has agreed a merger with TMX Set, which operates the Toronto Cache Exchange.
The merged group wish watch over headquarters in both London and Toronto and become the epoch's largest exchange championing mining companies.
More than 6,700 companies whim be listed on the combined exchanges, with a hawk capitalisation of about £3.7 trillion ($5.9tn), the firms said.
my forum unshackled hot item online
my blog free news online
blog free news online
separrattist is offline  
Reply




All times are GMT +1. The time now is 19:44.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.