Hi,
ja sicher geht das.
So long,
Mega
P.S: Nein ich frage nicht nach dem Sinn. ![]()
Hi,
ja sicher geht das.
So long,
Mega
P.S: Nein ich frage nicht nach dem Sinn. ![]()
Hi,
#include <GUIConstants.au3>
Global $status = True
GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered
Opt("GUICoordMode", 2)
$Button_1 = GUICtrlCreateButton("Button zeigen/verstecken", 10, 30, 150)
$Button_2 = GUICtrlCreateButton("Button Test", 0, -1)
GUISetState() ; will display an dialog box with 2 button
[/autoit] [autoit][/autoit] [autoit]; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
If $status Then GUICtrlSetState($Button_2, $GUI_HIDE)
If Not $status Then GUICtrlSetState($Button_2, $GUI_SHOW)
$status = Not $status
Case $msg = $Button_2
MsgBox(0, 'Testing', 'Button 2 was pressed') ; Will demonstrate Button 2 being pressed
EndSelect
WEnd
So long,
Mega
Hi,
was wird denn im Explorer angezeigt? Irgendwie musst du ja drauf zugreifen.
So long,
Mega
Hi,
#include-once
[/autoit] [autoit][/autoit] [autoit]; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.0
; Language: English
; Description: Functions that assist with Media Manipulation.
;
; Notes: To create the Player Object - $pObj = ObjCreate("WMPlayer.OCX" )
; ------------------------------------------------------------------------------
; ====================================================================================================
; Description ..: Opens The Media file in The Player Object
; Parameters ...: $pObj - The Player Object to open the file in.
; $sFilename - Filename of the Media to Open
; Return values : Song Object to be used in other functions
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMOpenFile($pObj, $sFilename)
Return $pObj.newMedia($sFilename)
EndFunc
; ====================================================================================================
; Description ..: Sets the Volume of the Player.
; Parameters ...: $pObj - The Player Object
; $iVol - New Volume ( 0 - 100 )
; Return values :
; Author .......: CFire
; Notes ........: Does Not Affect System/Wave Volumes!!
; ====================================================================================================
Func WMSetVolume($pObj, $iVol)
$pObj.settings.volume = $iVol
EndFunc
; ====================================================================================================
; Description ..: Returns the Current Volume of The Player
; Parameters ...: $pObj - The Player Object
; Return values : Current Volume ( 0 - 100 )
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMGetVolume($pObj)
Return $pObj.settings.volume
EndFunc
; ====================================================================================================
; Description ..: Fast Forwards the Current Playing Media
; Parameters ...: $pObj - The Player Object
; Return values :
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMFastForward($pObj)
$pObj.controls.fastForward()
EndFunc
; ====================================================================================================
; Description ..: Rewinds the Current Playing Media
; Parameters ...: $pObj - The Player Object
; Return values :
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMReverse($pObj)
$pObj.controls.fastReverse()
EndFunc
; ====================================================================================================
; Description ..: Plays a Media for the first time
; Parameters ...: $pObj - The Player Object
; $sFilename - Filename of the Media to Play
; Return values :
; Author .......: CFire
; Notes ........: This needs to be called only once during the Duration of any Media
; ====================================================================================================
Func WMPlay($pObj, $sFilename)
$pObj.url = $sFilename
while not WMGetState($pObj) = "Playing"
sleep(100)
WEnd
EndFunc
; ====================================================================================================
; Description ..: Pauses the Current Playing Media
; Parameters ...: $pObj - The Player Object
; Return values :
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMPause($pObj)
$pObj.controls.pause()
EndFunc
; ====================================================================================================
; Description ..: Resumes a Stopped or Paused Media
; Parameters ...: $pObj - The Player Object
; Return values :
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMResume($pObj)
$pObj.controls.play()
EndFunc
; ====================================================================================================
; Description ..: Stops the Current Playing Media
; Parameters ...: $pObj - The Player Object
; Return values :
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMStop($pObj)
$pObj.controls.stop()
EndFunc
; ====================================================================================================
; Description ..: Sets the Position of the Media
; Parameters ...: $pObj - The Player Object
; $iPos - Position in Seconds
; Return values :
; Author .......: CFire
; Notes ........: No need to call a WMPlay(). This will continue play at the new Position
; ====================================================================================================
Func WMSetPosition($pObj, $iPos)
$pObj.controls.currentPosition = $iPos
EndFunc
; ====================================================================================================
; Description ..: Returns the Current Position in the Media
; Parameters ...: $pObj - The Player Object
; Return values : Position in Seconds
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMGetPosition($pObj)
Return $pObj.controls.currentPosition
EndFunc
; ====================================================================================================
; Description ..: Returns the Duration / Length of the Media
; Parameters ...: $sObj - The Song Object returned from WMOpenFile()
; Return values : Duration in Seconds
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMGetDuration($sObj)
Return $sObj.GetItemInfo("Duration")
EndFunc
; ====================================================================================================
; Description ..: Functions that Get a Property of the Media
; Parameters ...: $sObj - The Song Object returned from WMOpenFile()
; Return values : Specific Property
; Author .......: CFire
; Notes ........:
; ====================================================================================================
Func WMGetArtist($sObj)
Return $sObj.GetItemInfo("Artist")
EndFunc
Func WMGetTitle($sObj)
Return $sObj.GetItemInfo("Title")
EndFunc
Func WMGetAlbum($sObj)
Return $sObj.GetItemInfo("Album")
EndFunc
Func WMGetBitrate($sObj)
Return $sObj.GetItemInfo("Bitrate")
EndFunc
Func WMGetMediaType($sObj)
Return $sObj.GetItemInfo("MediaType")
EndFunc
Func WMGetFileSize($sObj)
Return $sObj.GetItemInfo("FileSize")
EndFunc
Func WMGetFileType($sObj)
Return $sObj.GetItemInfo("FileType")
EndFunc
Func WMGetCategory($sObj)
Return $sObj.GetItemInfo("WM/Category")
EndFunc
Func WMGetGenre($sObj)
Return $sObj.GetItemInfo("WM/Genre")
EndFunc
Func WMGetYear($sObj)
Return $sObj.GetItemInfo("WM/Year")
EndFunc
Func WMGetState($pObj)
$sStates = "Undefined,Stopped,Paused,Playing,ScanForward,ScanReverse,Buffering,"
$sStates &= "Waiting,MediaEnded,Transitioning,Ready,Reconnecting"
$aStates = StringSplit($sStates,",")
$iState = $pObj.playState()
return $aStates[$iState]
EndFunc
So long,
Mega
Hi,
das kannst du aus dem Seitenquelltext rauslesen.
So long,
Mega
Hi,
;===============================================================================
;
; Function Name: _MediaOpen()
; Description: Opens a media file.
; Parameter(s): $s_location - Location of the media file
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns Media ID needed for the other media functions
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaOpen($s_location, $h_guihandle = 0)
If Not IsDeclared("i_MediaCount") Then Global $i_MediaCount=0
$i_MediaCount=$i_MediaCount+1
DllCall("winmm.dll","int","mciSendString","str","open "&FileGetShortName($s_location)&" alias media"&String($i_MediaCount),"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return String($i_MediaCount)
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaCreate()
; Description: Creates a new media for recording, capturing etc.
; Parameter(s): $s_format - Format of the file.
; 0 = CD Audio
; 1 = Digital video
; 2 = Overlay
; 3 = sequencer
; 4 = Vcr
; 5 = Video disc
; 6 = Wave Audio
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns Media ID needed for the other media functions
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaCreate($s_format)
If Not IsDeclared("i_MediaCount") Then Global $i_MediaCount=0
$i_MediaCount=$i_MediaCount+1
If $s_format=0 Then
$s_Use="cdaudio"
ElseIf $s_format=1 Then
$s_Use="digitalvideo"
ElseIf $s_format=2 Then
$s_Use="overlay"
ElseIf $s_format=3 Then
$s_Use="sequencer"
ElseIf $s_format=4 Then
$s_Use="vcr"
ElseIf $s_format=5 Then
$s_Use="videodisc"
ElseIf $s_format=6 Then
$s_Use="waveaudio"
EndIf
DllCall("winmm.dll","int","mciSendString","str","open new type "&$s_Use&" alias media"&String($i_MediaCount),"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return String($i_MediaCount)
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaPlay()
; Description: Plays a opened media file.
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; [optional] $i_From - Sets time in seconds where to begin playing
; [optional] $i_To - Sets time in seconds where to bstop playing
; [optional] $i_Speed - Sets the speed to play with
; [optional] $f_Fast - When 1 it will play faster then normal
; [optional] $f_Slow - When 1 it will play slower then normal
; [optional] $f_Fullscreen - When 1 movies will play fullscreen
; [optional] $f_Repeat - When 1 it will keep repeating
; [optional] $f_Reverse - When 1 the movie will been played reversed
; [optional] $f_Scan - When 1 plays as fast as possible
; The default value of all the optional parameters is 0.
; Some file formats dont understand some of the optional functions
; Experimate with it.
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaPlay($i_MediaId,$i_From = 0,$i_To = 0,$i_Speed = 0,$f_Fast = 0,$f_Slow = 0,$f_Fullscreen = 0,$f_Repeat=0,$f_Reverse=0,$f_Scan = 0)
$s_Parameters=""
If $i_From Then $s_Parameters=$s_Parameters&" from "&$i_From
If $i_To Then $s_Parameters=$s_Parameters&" to "&$i_To
If $i_Speed Then $s_Parameters=$s_Parameters&" speed "&$i_Speed
If $f_Fast Then $s_Parameters=$s_Parameters&" fast"
If $f_Fullscreen Then $s_Parameters=$s_Parameters&" fullscreen"
If $f_Repeat Then $s_Parameters=$s_Parameters&" repeat"
If $f_Reverse Then $s_Parameters=$s_Parameters&" reverse"
If $f_Scan Then $s_Parameters=$s_Parameters&" scan"
If $f_Slow Then $s_Parameters=$s_Parameters&" slow"
DllCall("winmm.dll","int","mciSendString","str","play media"&$i_MediaId&$s_Parameters,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaRecord()
; Description: Records from a microphone
; Stop recording with _MediaStop()
; (choose position with _MediaSeek())
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaRecord($i_MediaId)
DllCall("winmm.dll","int","mciSendString","str","record media"&$i_MediaId,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaCut()
; Description: Cuts a specified part of the movie to the clipboard.
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; $i_From - From time in seconds
; $i_To - To time in seconds
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaCut($i_MediaId,$i_From,$i_To)
DllCall("winmm.dll","int","mciSendString","str","cut media"&$i_MediaId&" from "&$i_From&" to "&$i_To,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaCopy()
; Description: Copies a specified part of the movie to the clipboard.
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; $i_From - From time in seconds
; $i_To - To time in seconds
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaCopy($i_MediaId,$i_From,$i_To)
DllCall("winmm.dll","int","mciSendString","str","copy media"&$i_MediaId&" from "&$i_From&" to "&$i_To,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaPaste()
; Description: Paste media from the clipboard.
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaPaste($i_MediaId,$i_From,$i_To)
DllCall("winmm.dll","int","mciSendString","str","paste media"&$i_MediaId,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaDelete()
; Description: Deletes a specified part of the movie.
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; $i_From - From time in seconds
; $i_To - To time in seconds
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaDelete($i_MediaId,$i_From,$i_To)
DllCall("winmm.dll","int","mciSendString","str","delete media"&$i_MediaId&" from "&$i_From&" to "&$i_To,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaCapture()
; Description: Copies the contents of the frame buffer and stores it in the
; specified file.
; Stop recording with _MediaStop()
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; $s_Location - Location where to store the file.
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaCapture($i_MediaId,$s_Location)
DllCall("winmm.dll","int","mciSendString","str","capture media"&$i_MediaId&" "&FileGetShortName($s_Location),"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaStop()
; Description: Stops playing/recording of a Media ID
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaStop($i_MediaId)
DllCall("winmm.dll","int","mciSendString","str","stop media"&$i_MediaId,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaSeek()
; Description: Moves to a specified Position and stops.
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; $i_Position - Position in seconds to move to, -1 goes to start
; -2 goes to end
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaSeek($i_MediaId,$i_Position)
If $i_Position = -1 Then
$s_Position = "end"
ElseIf $i_Position = -2 Then
$s_Position = "begin"
Else
$s_Position = String($i_Position)
EndIf
DllCall("winmm.dll","int","mciSendString","str","seek media"&$i_MediaId&" to "&$s_Position,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaPause()
; Description: Pauses playing/recording of a Media ID
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaPause($i_MediaId)
DllCall("winmm.dll","int","mciSendString","str","pause media"&$i_MediaId,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaResume()
; Description: Resumes playing/recording of a Media ID
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaResume($i_MediaId)
DllCall("winmm.dll","int","mciSendString","str","resume media"&$i_MediaId,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaSave()
; Description: Saves a opened Media ID to the selected file
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; $s_Location - Location to save to (must be full path)
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaSave($i_MediaId,$s_Location)
DllCall("winmm.dll","int","mciSendString","str","save media"&$i_MediaId&" "&FileGetShortName($s_Location),"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
;===============================================================================
;
; Function Name: _MediaClose()
; Description: Closes a existing Media ID
; Parameter(s): $i_MediaId - Media ID returned by _MediaOpen()/MediaCreate()
; Requirement(s): AutoIt
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR = 1
; Author(s): svennie
;
;===============================================================================
Func _MediaClose($i_MediaId)
DllCall("winmm.dll","int","mciSendString","str","close media"&$i_MediaId,"str","","int",65534,"hwnd",0)
If @error Then
SetError(1)
Return 0
Else
Return 1
EndIf
EndFunc
So long,
Mega
Hi,
hat BugFix doch drin :
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit(0)
So long,
Mega
Hi,
#include <IE.au3>
$sUsername = "Username"
$sPassword = "Password"
$sUrl = "https://www.google.com/accounts/ServiceLoginAuth"
$oIE = _IECreate ($sUrl,0,1,1,0)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState ($oHWND, "", @SW_MAXIMIZE )
$oForm = _IEFormGetCollection ($oIE, 0)
$oUsername = _IEFormElementGetObjByName ($oForm, "Email")
$oPassword = _IEFormElementGetObjByName ($oForm, "Passwd")
_IEFormElementSetValue ($oUsername, $sUsername)
_IEFormElementSetValue ($oPassword, $sPassword)
_IEFormSubmit ($oForm)
So long,
Mega
HI,
google und wiki werden dir helfen die Bedeutung zu eruieren. ![]()
Welche Möglichkeit?
So long,
Mega
Hi,
mach doch gleich Labels Die kannst du freigestalten. (es sei denn du willst den Buttontext variieren)
2) und 3) GUICtrlSetState
So long,
Mega
Hi,
guck dir einen Befehl nach dem nächsten an und wenn fragen sind dann bitte konkret und nicht : Erkläre mir dir Welt. ![]()
Dann machst du es allen leichter.
So long,
Mega
Hi,
du kannst auch alles in ein iniFile packen und die Sprachen durch Sektionen unterscheiden. +Geschmackssache+
Starte doch einfach mal. ![]()
So long,
Mega
Hi,
ja such dir einen Trigger aus. Datei vorhanden, Uhrzeit, Tastendruck usw. irgendwas muss das beenden auslösen.
So long,
Mega
Hi,
na dann viel Spaß. Es gibt hier schon einige Bsp mit Logins für Seiten. Einfach mal suchen, probieren und dann fragen wenn es Probleme gibt.
So long,
Mega
Hi,
obfuscate deine Code und ändere die Beschreibung, ansonsten eher schlechte Karten.
So long,
Mega
Hi,
du kannst auch einach gleich ne Funktion nutzen, um eine Mail zu versenden.
So long,
Mega
Hi,
hmmh? Alles was ersetzt werden soll muss in Variablen gespeichert werden und wird dann in der Schleife aktualisiert. Damit meinte ich auch sowas.
So long,
Mega
Hi,
naja sollte aber gehen:
Prüfen ob Datei vorhanden
Prüfen ob Datei konform
Datei lesen
Array der GUI-Elemente durchlaufen und neue Werte setzen
fertig.
So long,
Mega
HI,
oder so:
Opt("WinTitleMatchMode", 2)
[/autoit] [autoit][/autoit] [autoit]HotKeySet("^5", '_end')
HotKeySet("^2", '_show')
Global $status = True, $i = 0
[/autoit] [autoit][/autoit] [autoit]While 1
If Not WinExists("Internet Explorer") Or WinExists("teiltitel") Then
If FileExists("programm.exe") Then Run("programm.exe")
$i += 1
EndIf
Sleep(1000)
WEnd
Func _show()
If $status Then
ConsoleWrite($i & @CRLF)
ToolTip('Crashes : ' & $i, 0, 0)
Else
ToolTip('')
EndIf
$status = Not $status
EndFunc ;==>_show
Func _end()
Exit (0)
EndFunc ;==>_end
So long,
Mega
Hi,
paßt zu meinem Tag
Heute geht die Sonne auf und scheint nur für mich. ![]()
So long,
Mega
P.S: Morgen ist Feiertag in NRW!
![]()