Beiträge von Xenobiologist
-
-
Run oder Shellexecute! Und lies mal was in diesem Forum zu Bots!!!
-
Nimm einem regülären Ausdruck
-
Wenn du ein Beispiel findest, dann könnte man es versuchen. (Vb, Autoit, etc.)
-
[autoit]
$str = 'Hallo 2 3 4 5 6 7 ' & @CRLF & " . ... "
[/autoit]
MsgBox(0, 'Wortzahl', 'Der String enthält: ' & UBound(StringRegExp($str, '\S+', 3)) & ' Worte.') -
Spoiler anzeigen
[autoit]#include<Array.au3>
[/autoit] [autoit][/autoit] [autoit]
Global $str1 = '23, 129,45,67,23,768,45,878,34,67,34 / 34,45,23,57,34,789,46,78,345,768,89,34 / 12'
MsgBox(0, "Am Häufgisten oder bei Gleichheit am Größten ist :", _occurrence($str1))Func _occurrence($sString)
[/autoit] [autoit][/autoit] [autoit]
Local $splitted = StringRegExp(StringStripWS($sString, 8), '\d+', 3)
Local $result[UBound($splitted)][2]
For $i = 0 To UBound($splitted) - 1
StringReplace($str1, $splitted[$i], '')
$result[$i][1] = @extended
$result[$i][0] = Number($splitted[$i])
Next
If $result[0][1] = 1 Then Return _ArrayMax($splitted, 1, 0)
_ArraySort($result, 1, 0, 0, 1); 1, 0, 0, 2, 1)
_ArrayDblDel($result)
_ArrayDisplay($result)
Return $result[0][0]
EndFunc ;==>_occurrence;----------------------------------------------------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]
; Function _ArrayDblDel(ByRef $ARRAY [, $CASESENS=0])
;
; Description - From an 1D/2D Array will delete double entries (2D -> combination by '[n][0]' and '[n][1]').
; - Autodetection 1D/2D Array
; - By using string, you can choose case sensitivity.
;
; Parameter $ARRAY: Array to sort
; optional $CASESENS: Case sensitivity off[0] or on[1] (default 0)
;
; Return Success -1 ByRef Array without doubles
; Failure 0 @error = 1, given Array is not Array
;
; Requirements Only 2 occurences in the second dimension
; #include <array.au3>
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;----------------------------------------------------------------------------------------------------------------------Func _ArrayDblDel(ByRef $ARRAY, $CASESENS = 0)
[/autoit]
If (Not IsArray($ARRAY)) Then
SetError(1)
Return 0
EndIf
Local $iDIM, $arTmp1D[1], $arTmp2D[1][2], $dbl = 0
UBound($ARRAY, 2)
If @error = 2 Then
$iDIM = 1
Else
$iDIM = 2
EndIf
$arTmp1D[0] = ""
$arTmp2D[0][0] = ""
Switch $iDIM
Case 1 ; 1D
For $i = 0 To UBound($ARRAY) - 1
$dbl = 0
For $k = 0 To UBound($arTmp1D) - 1
Switch $CASESENS
Case 0
If $arTmp1D[$k] = $ARRAY[$i] Then $dbl = 1
Case 1
If $arTmp1D[$k] == $ARRAY[$i] Then $dbl = 1
EndSwitch
Next
If $dbl = 0 Then
If $arTmp1D[0] = "" Then
$arTmp1D[0] = $ARRAY[$i]
Else
_ArrayAdd($arTmp1D, $ARRAY[$i])
EndIf
Else
$dbl = 0
EndIf
Next
$ARRAY = $arTmp1D
Case 2 ; 2D
For $i = 0 To UBound($ARRAY) - 1
$dbl = 0
For $k = 0 To UBound($arTmp2D) - 1
Switch $CASESENS
Case 0
If ($arTmp2D[$k][0] = $ARRAY[$i][0]) And _
($arTmp2D[$k][1] = $ARRAY[$i][1]) Then $dbl = 1
Case 1
If ($arTmp2D[$k][0] == $ARRAY[$i][0]) And _
($arTmp2D[$k][1] == $ARRAY[$i][1]) Then $dbl = 1
EndSwitch
Next
If $dbl = 0 Then
If $arTmp2D[0][0] = "" Then
$arTmp2D[0][0] = $ARRAY[$i][0]
$arTmp2D[0][1] = $ARRAY[$i][1]
Else
ReDim $arTmp2D[UBound($arTmp2D) + 1][2]
$arTmp2D[UBound($arTmp2D) - 1][0] = $ARRAY[$i][0]
$arTmp2D[UBound($arTmp2D) - 1][1] = $ARRAY[$i][1]
EndIf
Else
$dbl = 0
EndIf
Next
$ARRAY = $arTmp2D
EndSwitch
Return -1
EndFunc ;==>_ArrayDblDel -
Hi,
geht
Spoiler anzeigen
[autoit]#include <Sound.au3>
[/autoit] [autoit][/autoit] [autoit]
$Sound = _SoundOpen("c:\Toll.mp3"); Pick a song that is at least 1 minute long
_SoundPlay($Sound)ConsoleWrite(@CRLF & @CRLF & "First: Volume...")
[/autoit] [autoit][/autoit] [autoit]For $i = 1000 To 0 Step -1
[/autoit] [autoit][/autoit] [autoit]
_SoundVolume($Sound, $i)
ConsoleWrite("Leiser " & $i & @CRLF)
Sleep(1)
Next
For $i = 0 To 1000
_SoundVolume($Sound, $i)
Sleep(1)
NextConsoleWrite(@CRLF & @CRLF & "Second: Pan...")
[/autoit] [autoit][/autoit] [autoit]For $i = 0 To 1000 Step 5
[/autoit] [autoit][/autoit] [autoit]
_SoundPanLeft($Sound, $i)
_SoundPanRight($Sound, 1000 - $i)
Sleep(1)
Next
For $i = 0 To 1000 Step 5
_SoundPanLeft($Sound, 1000 - $i)
_SoundPanRight($Sound, $i)
Sleep(1)
Next_SoundPanRight($Sound, 1000); normal
[/autoit] [autoit][/autoit] [autoit]
_SoundPanLeft($Sound, 1000); normalConsoleWrite(@CRLF & @CRLF & "Third: Speed...")
[/autoit] [autoit][/autoit] [autoit]_SoundSpeed($Sound, 500)
[/autoit] [autoit][/autoit] [autoit]
Sleep(3000)
_SoundSpeed($Sound, 800)
Sleep(3000)
_SoundSpeed($Sound, 1500)
Sleep(3000)
_SoundSpeed($Sound, 2200)
Sleep(3000)
_SoundSpeed($Sound, 1000); normalConsoleWrite(@CRLF & @CRLF & "Fourth: Info,")
[/autoit] [autoit][/autoit] [autoit]$Info = _SoundInfo($Sound, "Speed")
[/autoit] [autoit][/autoit] [autoit]
ConsoleWrite(@CRLF & "Current speed: " & $Info)$Info = _SoundInfo($Sound, "Volume")
[/autoit] [autoit][/autoit] [autoit]
ConsoleWrite(@CRLF & "Current volume: " & $Info)ConsoleWrite(@CRLF & @CRLF & "Done! Enjoy the rest of the song." & @CRLF & @CRLF)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]WEnd
[/autoit] [autoit][/autoit] [autoit]Func _SoundTimeToMs($Hours, $Minutes, $Seconds)
[/autoit] [autoit][/autoit] [autoit]Return ($Hours * 3600000) + ($Minutes * 60000) + ($Seconds * 1000)
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_SoundTimeToMs
[/autoit] [autoit][/autoit] [autoit]Func _SoundMsToTime($ms)
[/autoit] [autoit][/autoit] [autoit]
Local $Return[3]
If $ms >= 3600000 Then; 1000*60*60 = 3600000
$Hours = Floor($ms / 3600000)
$Rest = $ms - ($Hours * 3600000)
Else
$Hours = 0
$Rest = $ms
EndIfIf $Rest >= 60000 Then; 1000*60 = 60000
[/autoit] [autoit][/autoit] [autoit]
$Minutes = Floor($Rest / 60000)
$Rest = $Rest - ($Minutes * 60000)
Else
$Minutes = 0
$Rest = $ms
EndIf$Seconds = Round($Rest / 1000)
[/autoit] [autoit][/autoit] [autoit]$Return[0] = $Hours
[/autoit] [autoit][/autoit] [autoit]
$Return[1] = $Minutes
$Return[2] = $SecondsReturn $Return
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_SoundMsToTime
[/autoit] [autoit][/autoit] [autoit]
Func _SoundInfo($sSnd_id, $Parameter); look at "http://msdn2.microsoft.com/en-us/library/ms713277(VS.85).aspx" at the table "digitalvideo" for possible parametersIf StringInStr($sSnd_id, '!') Then Return SetError(3, 0, 0); invalid file/alias
[/autoit] [autoit][/autoit] [autoit];return status
[/autoit] [autoit][/autoit] [autoit]
Return mciSendString("status " & FileGetShortName($sSnd_id) & " " & $Parameter)
EndFunc ;==>_SoundInfo
Func _SoundSpeed($sSnd_id, $Speed); $Speed: 0 - 2267, 1000= normal
;Declare variables
Local $iRetIf StringInStr($sSnd_id, '!') Then Return SetError(3, 0, 0); invalid file/alias
[/autoit] [autoit][/autoit] [autoit]If $Speed < 0 Or $Speed > 2267 Then Return SetError(1, 0, 0)
[/autoit] [autoit][/autoit] [autoit]$iRet = mciSendString("set " & FileGetShortName($sSnd_id) & " speed " & $Speed)
[/autoit] [autoit][/autoit] [autoit]
;return
If $iRet = 0 Then
Return 1
Else
Return SetError(1, 0, 0)
EndIf
EndFunc ;==>_SoundSpeed
Func _SoundPanLeft($sSnd_id, $Pan); $Pan: 0 - 1000, 1000= normal
;Declare variables
Local $iRetIf StringInStr($sSnd_id, '!') Then Return SetError(3, 0, 0); invalid file/alias
[/autoit] [autoit][/autoit] [autoit]If $Pan < 0 Or $Pan > 1000 Then Return SetError(1, 0, 0)
[/autoit] [autoit][/autoit] [autoit]$iRet = mciSendString("setaudio " & FileGetShortName($sSnd_id) & " left volume to " & $Pan)
[/autoit] [autoit][/autoit] [autoit]
;return
If $iRet = 0 Then
Return 1
Else
Return SetError(1, 0, 0)
EndIf
EndFunc ;==>_SoundPanLeftFunc _SoundPanRight($sSnd_id, $Pan); $Pan: 0 - 1000, 1000= normal
[/autoit] [autoit][/autoit] [autoit]
;Declare variables
Local $iRetIf StringInStr($sSnd_id, '!') Then Return SetError(3, 0, 0); invalid file/alias
[/autoit] [autoit][/autoit] [autoit]If $Pan < 0 Or $Pan > 1000 Then Return SetError(1, 0, 0)
[/autoit] [autoit][/autoit] [autoit]$iRet = mciSendString("setaudio " & FileGetShortName($sSnd_id) & " right volume to " & $Pan)
[/autoit] [autoit][/autoit] [autoit]
;return
If $iRet = 0 Then
Return 1
Else
Return SetError(1, 0, 0)
EndIf
EndFunc ;==>_SoundPanRightFunc _SoundVolume($sSnd_id, $Volume); $Volume: 0 - 1000, 1000= normal
[/autoit] [autoit][/autoit] [autoit]
;Declare variables
Local $iRetIf StringInStr($sSnd_id, '!') Then Return SetError(3, 0, 0); invalid file/alias
[/autoit] [autoit][/autoit] [autoit]If $Volume < 0 Or $Volume > 1000 Then Return SetError(1, 0, 0)
[/autoit] [autoit][/autoit] [autoit]$iRet = mciSendString("setaudio " & FileGetShortName($sSnd_id) & " volume to " & $Volume)
[/autoit] [autoit][/autoit] [autoit]
;return
If $iRet = 0 Then
Return 1
Else
Return SetError(1, 0, 0)
EndIf
EndFunc ;==>_SoundVolume;~ _SoundInfo()
[/autoit]
;~ Parameters:
;~ audio
;~ audio alignment
;~ audio bitspersample
;~ audio breaks
;~ audio bytespersec
;~ audio input
;~ audio record
;~ audio source
;~ audio samplespersec
;~ audio stream
;~ bass
;~ bitsperpel
;~ brightness
;~ color
;~ contrast
;~ current track
;~ file completion
;~ file format
;~ file mode
;~ forward
;~ frames skipped
;~ gamma
;~ input
;~ left volume
;~ length
;~ media present
;~ mode
;~ monitor
;~ monitor method
;~ nominal
;~ nominal frame rate
;~ nominal record frame rate
;~ number of tracks
;~ output
;~ palette handle
;~ pause mode
;~ play speed
;~ position
;~ ready
;~ record frame rate
;~ reserved size
;~ right volume
;~ seek exactly
;~ sharpness
;~ smpte
;~ speed
;~ start position
;~ still file format
;~ time format
;~ tint
;~ treble
;~ unsaved
;~ video
;~ video key index
;~ video key color
;~ video record
;~ video source
;~ video source number
;~ video stream
;~ volume
;~ window handle
;~ window visible
;~ window minimized
;~ window maximizedMega
-
Guck mal in der sound.au3 udf
-
SubItem auf 1 setzen
-
Such mal nach winlock.dll
Mega
-
Hi,
URL
Textdateiusw.
alles was man zum Test braucht.
Mega
P.S.: Das kriegen wir ohne Bezahlung hin. Deshalb verschiebe ich es in Support.
-
HI,
ich bin auch von einer gleichmäßig aufgebauten Datei ausgegangen. Du musst mir evtl. mal die richtige Datei zeigen.
Mega
-
[autoit]
;FileConvert Volumeman
[/autoit][autoit][/autoit][autoit]$fh = FileOpen(@TempDir & '\grunddatei.txt', 0)
[/autoit][autoit][/autoit][autoit]
If $fh = -1 Then ConsoleWrite('! ERROR 1' & @CRLF)
$content = FileRead($fh)
$re = StringRegExp($content, '\w+', 3)
FileClose($fh)$fh = FileOpen(@TempDir & '\grunddatei2.txt', 2)
[/autoit][autoit][/autoit][autoit]
If $fh = -1 Then ConsoleWrite('! ERROR 2' & @CRLF)For $i = 0 To UBound($re)-1 Step 2
[/autoit]
FileWrite($fh, $re[$i] & '^' & StringTrimRight($re[$i + 1], 1) & @CRLF)
ConsoleWrite($re[$i] & '^' & StringTrimRight($re[$i + 1], 1) & @CRLF)
Next
FileClose($fh) -
Nicht, wenn ich das nicht will.
Dann verbietet man einfach den Affengriff auch noch. -
Äh wie bitte? Was soll es werden ? PC blocken durch USB Stick?
-
Hi,
wenn die Datei dort liegt ja. Ansonsten FileInstall nutzen und die Bider mit in die exe nehmen. Dann entpacken und und anziehen.
Mega
-
Vor allem ist deine Logik nicht ganz umgesetzt. Ich hätte es so verstanden.
Suche in einer Endlosschleife nach einer Frabe. Wenn die Farbe gefunden wird, dann drücke 60 Sekunden lang linke Maustaste an einer bestimmten Stelle, wenn die Farbe nicht gefunden wurde, dann drück 1 mal c und such weiter.

-
Hi,
wie wäre es mit sourceforge.net?
Mega
-
Hi,
Beta unter Macros.
Mega
-
Hi,
versuch mal so:
Spoiler anzeigen
[autoit]#include <EditConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\end.kxf
$Form1 = GUICreate("helfer", 629, 529, 205, 129)
$Tab1 = GUICtrlCreateTab(0, 0, 625, 521)
$TabSheet1 = GUICtrlCreateTabItem("Netzwerk-Tool")
$Button2 = GUICtrlCreateButton("registerdns", 393, 51, 65, 17, 0)
$Button1 = GUICtrlCreateButton("flushdns", 321, 51, 65, 17, 0)
$Button3 = GUICtrlCreateButton("displaydns", 241, 51, 65, 17, 0)
$Button4 = GUICtrlCreateButton("renew", 161, 51, 65, 17, 0)
$Button5 = GUICtrlCreateButton("release", 89, 51, 65, 17, 0)
$Button6 = GUICtrlCreateButton("all", 17, 51, 65, 17, 0)
$Button10 = GUICtrlCreateButton("-e", 16, 105, 65, 17, 0)
$Button8 = GUICtrlCreateButton("-r", 88, 105, 65, 17, 0)
$Button7 = GUICtrlCreateButton("-n", 160, 105, 65, 17, 0)
$Button9 = GUICtrlCreateButton("-a", 240, 105, 65, 17, 0)
$Button11 = GUICtrlCreateButton("-a", 19, 165, 65, 17, 0)
$Button12 = GUICtrlCreateButton("-d", 91, 165, 65, 17, 0)
$Button13 = GUICtrlCreateButton("nslookup", 206, 165, 65, 17, 0)
$Button14 = GUICtrlCreateButton("net time", 278, 165, 65, 17, 0)
$Button15 = GUICtrlCreateButton("net view", 350, 165, 65, 17, 0)
$Button16 = GUICtrlCreateButton("host name", 422, 165, 65, 17, 0)
$Button17 = GUICtrlCreateButton("net share", 494, 165, 65, 17, 0)
$Label1 = GUICtrlCreateLabel("ipconfig", 16, 32, 593, 17)
GUICtrlSetBkColor(-1, 0xB9D1EA)
$Label2 = GUICtrlCreateLabel("netstat", 14, 86, 596, 17)
GUICtrlSetBkColor(-1, 0xB9D1EA)
$Label3 = GUICtrlCreateLabel("arp und sonnstige", 17, 145, 592, 17)
GUICtrlSetBkColor(-1, 0xB9D1EA)
$edit = GUICtrlCreateEdit("", 12, 193, 604, 317, $ES_AUTOVSCROLL + $WS_VSCROLL+ $ES_WANTRETURN +$ES_MULTILINE)
GUICtrlSetFont(-1, 8, 300, 0, "Arial")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet4 = GUICtrlCreateTabItem("ip-scanner")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
;beginn Tab 1
Case $Button1
GUICtrlSetData($edit, _getDOSOutput('ipconfig /flushdns'))
;~ ConsoleWrite(_getDOSOutput('ipconfig /flushdns') & @CRLF)
Case $Button2
GUICtrlSetData($edit, _getDOSOutput('ipconfig /registerdns'))
;~ ConsoleWrite(_getDOSOutput('ipconfig /registerdns') & @CRLF)
Case $Button3
GUICtrlSetData($edit, _getDOSOutput('ipconfig /displaydns'))
;~ ConsoleWrite(_getDOSOutput('ipconfig /displaydns') & @CRLF)
Case $Button4
GUICtrlSetData($edit, _getDOSOutput('ipconfig /renew'))
;~ ConsoleWrite(_getDOSOutput('ipconfig /renew') & @CRLF)
Case $Button5
GUICtrlSetData($edit, _getDOSOutput('ipconfig /release'))
;~ ConsoleWrite(_getDOSOutput('ipconfig /release') & @CRLF)
Case $Button6
GUICtrlSetData($edit, _getDOSOutput('ipconfig /all'))
ConsoleWrite(_getDOSOutput('ipconfig /all'))
Case $Button7
GUICtrlSetData($edit, _getDOSOutput('netstat -n'))
;~ ConsoleWrite(_getDOSOutput('netstat -n') & @CRLF)
Case $Button8
GUICtrlSetData($edit, _getDOSOutput('netstat -r'))
;~ ConsoleWrite(_getDOSOutput('netstat -r') & @CRLF)
Case $Button9
GUICtrlSetData($edit, _getDOSOutput('netstat -a'))
;~ ConsoleWrite(_getDOSOutput('netstat -a') & @CRLF)
Case $Button10
GUICtrlSetData($edit, _getDOSOutput('netstat -e'))
;~ ConsoleWrite(_getDOSOutput('netstat -e') & @CRLF)
Case $Button11
GUICtrlSetData($edit, _getDOSOutput('arp -a'))
;~ ConsoleWrite(_getDOSOutput('arp -a') & @CRLF)
Case $Button12
GUICtrlSetData($edit, _getDOSOutput('arp -d'))
;~ ConsoleWrite(_getDOSOutput('arp -d') & @CRLF)
Case $Button13
GUICtrlSetData($edit, _getDOSOutput('nslookup'))
;~ ConsoleWrite(_getDOSOutput('nslookup') & @CRLF)
Case $Button14
GUICtrlSetData($edit, _getDOSOutput('net time'))
;~ ConsoleWrite(_getDOSOutput('net time') & @CRLF)
Case $Button15
GUICtrlSetData($edit, _getDOSOutput('net view'))
;~ ConsoleWrite(_getDOSOutput('net view') & @CRLF)
Case $Button16
GUICtrlSetData($edit, _getDOSOutput('host name'))
;~ ConsoleWrite(_getDOSOutput('host name') & @CRLF)
Case $Button17
GUICtrlSetData($edit, _getDOSOutput('net share'))
;~ ConsoleWrite(_getDOSOutput('net share') & @CRLF)
;ende Tab 1EndSwitch
[/autoit]
WEnd
Func _getDOSOutput($command)
Local $text = '', $Pid = Run('"' & @ComSpec & '" /c ' & $command, '', @SW_HIDE, 2 + 4)
While 1
$text &= StdoutRead($Pid, False, False) & @CR
If @error Then ExitLoop
Sleep(10)
WEnd
;~ Return StringReplace(StringReplace(StringStripWS($text, 7), @CR, @CRLF), @LF, @CRLF)
Return StringStripWS($text, 3)
EndFunc ;==>_getDOSOutputMega