Mit dem vierten Array von
[autoit]GUIGetCursorInfo
[/autoit]könntest du das MouseOver Event machen oder?
Mit dem vierten Array von
[autoit]GUIGetCursorInfo
[/autoit]könntest du das MouseOver Event machen oder?
Aha und wieso nicht
[autoit]Ping ( "address/hostname" [, timeout] )
If @error then blaa..
?
Damit kannst du die Admin rechte auch im späteren Scriptverlauf setzen
Func RunReqAdmin($Autoit3Commands, $prompt = 1)
Local $temp_Script = _TempFile(@TempDir, "~", ".au3")
Local $temp_check = _TempFile(@TempDir, "~", ".chk")
FileWriteLine($temp_check, 'TempFile')
FileWriteLine($temp_Script, '#NoTrayIcon')
If Not IsAdmin() Then
FileWriteLine($temp_Script, '#RequireAdmin')
If $prompt = 1 Then MsgBox(262144, "Need Admin mode", "Admin mode is needed for this update. Asnwer the following prompts to allow the update.")
EndIf
FileWriteLine($temp_Script, $Autoit3Commands)
FileWriteLine($temp_Script, "FileDelete('" & $temp_check & "')")
RunWait('"' & @ScriptFullPath & '" /AutoIt3ExecuteScript "' & $temp_Script & '"')
While FileExists($temp_check)
Sleep(50)
WEnd
FileDelete($temp_Script)
EndFunc ;==>RunReqAdmin
Was meinst du mit
Zitateinen ping mit run
?
Wurde am anfang des Scriptes ein
[autoit]#RequireAdmin
[/autoit]gesetzt?
ZitatGenutzt werden dürfen wieder die Standard-Includings, jedoch keine Dlls, die nicht zur AutoIt-Installation gehören
Ich denke damit ist GDI+ erlaubt ![]()
Oh ja das hätte ich auch dazu schreiben können ![]()
Naja hauptsache es läuft , stell den thread mal auf gelöst ![]()
Die funktioniert schon
nur ist das mit dem Bass_init immer bisschen heikel ![]()
Suchst du
[autoit]WinActivate
[/autoit]![]()
Bevor du diese "Aktion" für das Programmfenster aufrufst machst du
[autoit]WinActivate("Fenstertitel")
[/autoit]und fertig...
Ja das Problem ist das
[autoit]SoundsetWaveVolume
[/autoit]nicht mehr funktioniert , sobald man die Lautstärke ändern will
muss man mit der bass.dll arbeiten , darüber durfte ich mich auch schon ärgern ![]()
Also Bass.dll benutzen ( also fürs MasterVolume)
Hi und viel Spaß ![]()
Hi und viel Spaß ![]()
@All , ich hab das hier nicht gepostet weil ich zu faul bin mir ne API zu schreiben sondern weil ichs einfach nicht kann ![]()
SEuBo ich danke dir , getcurrenttime und getduration scheint noch nicht zu funzen
Hier ein script zum testen
#include "IE Youtube API.au3"
[/autoit] [autoit][/autoit] [autoit]OnAutoItExitRegister("free")
[/autoit] [autoit][/autoit] [autoit]Global $oIE, $url = "http://www.youtube.com/watch?v=wEdhtDob3Rg"
[/autoit] [autoit][/autoit] [autoit]$oIE = _IECreate ("www.google.de",0,1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]HotKeySet("{F1} ", "navi")
HotKeySet("{F2} ", "pause")
HotKeySet("{F3} ", "play")
While Sleep(50)
If Not IsObj($oIE) Then Exit
$currenttime = _IE_YT($oIE,"getcurrenttime")
ToolTip($currenttime)
WEnd
Func navi()
_IENavigate ($oIE,$url)
EndFunc
Func pause()
_IE_YT($oIE,"pausevideo")
EndFunc
Func play()
_IE_YT($oIE,"playvideo")
EndFunc
Func free()
If IsObj($oIE) Then _IEQuit($oIE)
EndFunc
Guck dir das mal an DS Engine![]()
dann mach einfach nur
[autoit]ShellExecute("Link")
[/autoit]#Include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
; Code Anfang (Design)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 453, 260, 346, 178)
$Button1 = GUICtrlCreateButton("EXIT BUTTON", 24, 152, 393, 81)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("START BUTTON", 24, 24, 393, 81)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
EndSwitch
WEnd
Moritz ist momentan im Urlaub oder ?
![]()
Hallo Leute ,
ich bräuchte dringend eine Youtube API für IE.
Es ginge mir dabei hauptsächlich um folgende Funktionen:
playVideo
pauseVideo
setVolume
getCurrentTime
getDuration
seekTo
Für FF gibt es ja bereits eine von Stilgar:
#include-once
#include <FF.au3>
; #FUNCTION# ===================================================================
; Name ..........: _FF_YT
; Description ...: YouTube API for FF.au3
; AutoIt Version : V3.3.0.0
; Requirement(s).: FF.au3 > V0.5.3.x / MozRepl
; Syntax ........: _FF_YT(ByRef $Socket[, $sCommand = "playVideo"[, $vArg1 = ""[, $vArg2 = ""[, $sPlayerID = "movie_player"]]]])
; Parameter(s): .: $sCommand - Optional: (Default = "playVideo") :
; | loadWait / $vArg1 = TimeOut in ms (int), Default = 10000
; | playVideo
; | pauseVideo
; | stopVideo
; | clearVideo
; | getVideoBytesLoaded
; | getvideobytestotal
; | getVideoStartBytes
; | mute
; | unMute
; | isMuted
; | setVolume / $vArg1 = Volume (int) (min=0, max=100)
; | getVolume
; | seekTo / $vArg1 = Secs (int), $vArg2 = allowSeekAhead (boolean), Default = true
; | getPlayerState
; | getCurrentTime
; | getDuration
; | setSize / $vArg1 = height (int), $vArg2 = width (int) (min=50)
; | getVideoUrl
; | getVideoEmbedCode
; | loadVideoById / $vArg1 = id (string), $vArg2 = start (int)
; | cueVideoById / $vArg1 = id (string), $vArg2 = start (int)
; $vArg1 - Optional: (Default = "") :
; $vArg2 - Optional: (Default = "") :
; $sPlayerID - Optional: (Default = "movie_player") :
; Return Value ..: Success - Deppending on the function call
; Failure - Deppending on the function call and sets
; @ERROR - 1 = error while sending command to player or no player found
; | 2 = wrong value or datatype of $vArg1 or $vArg2
; | 3 = wrong or unsupported $sCommand
; | 4 = wrong datatype returned from API
; | 5 = TimeOut from "loadWait"
; Author(s) .....: Thorsten Willert, iLoveAU3 (loadVideoById, cueVideoById)
; Remarks .......: Currently not supported: setSize (Video), addEventListener, all events
; Date ..........: Tue Apr 28 22:20:44 CEST 2009 @889 /Internet Time/
; Link ..........: http://code.google.com/intl/de-DE/api…_reference.html
; Example .......: _FF_YT($Socket,"pauseVideo"), _FF_YT($Socket,"setSize",480,385)
; ==============================================================================
Func _FF_YT($sCommand = "playVideo", $vArg1 = "", $vArg2 = "", $sPlayerID = "movie_player")
Local $iRet
Switch StringLower($sCommand)
Case "loadwait"
;dummy
Case "playvideo"
$sCommand = "playVideo()"
$iRet = 0
Case "pausevideo"
$sCommand = "pauseVideo()"
$iRet = 0
Case "stopvideo"
$sCommand = "stopVideo()"
$iRet = 0
Case "clearvideo"
$sCommand = "clearVideo()"
$iRet = 0
Case "getvideobytesloaded"
$sCommand = "getVideoBytesLoaded()"
$iRet = 1
Case "getvideobytestotal"
$sCommand = "getVideoBytesTotal()"
$iRet = 1
Case "getvideostartbytes"
$sCommand = "getVideoStartBytes()"
$iRet = 1
Case "mute"
$sCommand = "mute()"
$iRet = 0
Case "unmute"
$sCommand = "unMute()"
$iRet = 0
Case "ismuted"
$sCommand = "isMuted()"
$iRet = 1
Case "setvolume"
$vArg1 = Number($vArg1)
If IsInt($vArg1) And $vArg1 >= 0 And $vArg1 <= 100 Then
$sCommand = "setVolume(" & $vArg1 & ")"
Else
SetError(2)
Return -2
EndIf
$iRet = 0
Case "getvolume"
$sCommand = "getVolume()"
$iRet = 1
Case "seekto"
$vArg1 = Number($vArg1)
If $vArg2 = "" Or $vArg2 = Default Then $vArg2 = True
If IsInt($vArg1) And IsBool($vArg2) Then
$vArg2 = __FFB2S($vArg2)
$sCommand = "seekTo(" & $vArg1 & "," & $vArg2 & ")"
Else
SetError(2)
Return -2
EndIf
$iRet = 0
Case "getplayerstate"
$sCommand = "getPlayerState()"
$iRet = 1
Case "getcurrenttime"
$sCommand = "getCurrentTime()"
$iRet = 1
Case "getduration"
$sCommand = "getDuration()"
$iRet = 1
Case "setsize"
$vArg1 = Number($vArg1)
$vArg2 = Number($vArg2)
If $vArg2 = 0 Or $vArg2 = Default Then $vArg2 = $vArg1
If IsInt($vArg1) And IsInt($vArg2) And $vArg1 > 50 And $vArg2 > 50 Then
$sCommand = "setSize(" & $vArg1 & "," & $vArg2 & ")"
Else
SetError(2)
Return -2
EndIf
$iRet = 0
Case "getvideourl"
$sCommand = "getVideoUrl()"
$iRet = 2
Case "getvideoembedcode"
$sCommand = "getVideoEmbedCode()"
$iRet = 2
Case "loadVideoById"
$vArg1 = String($vArg1)
$vArg2 = Number($vArg2)
If $vArg2 = Default Or $vArg2 = "" Then $vArg2 = 0
If IsString($vArg1) And IsNumber($vArg2) Then
$sCommand = "loadVideoById('" & $vArg1 & "'," & $vArg2 & ")"
Else
SetError(2)
Return -2
EndIf
Case "cueVideoById"
$vArg1 = String($vArg1)
$vArg2 = Number($vArg2)
If $vArg2 = Default Or $vArg2 = "" Then $vArg2 = 0
If IsString($vArg1) And IsNumber($vArg2) Then
$sCommand = 'cueVideoById("' & $vArg1 & '",' & $vArg2 & ")"
Else
SetError(2)
Return -2
EndIf
Case Else
SetError(3)
Return -2
EndSwitch
If $sCommand <> "loadwait" Then
Local $vRetVal = _FFCmd(StringFormat("try{window.content.wrappedJSObject.document.getElementById('%s').%s;}catch(e){'_FF_YT_Error'}", $sPlayerID, $sCommand))
If Not @error And $vRetVal <> "_FF_YT_Error" Then
Switch $iRet
Case 0
If $vRetVal = "" Then
Return $vRetVal
Else
SetError(4)
Return ""
EndIf
Case 1
If IsNumber(Number($vRetVal)) Then
Return $vRetVal
Else
SetError(4)
Return -2
EndIf
Case 2
If IsString($vRetVal) Then
Return $vRetVal
Else
SetError(4)
Return ""
EndIf
EndSwitch
Else
SetError(1)
Return -2
EndIf
Else
If $vArg1 = "" Or Not IsInt(Number($vArg1)) Then $vArg1 = 10000
Local $TimeOutTimer = TimerInit()
Local $sState
Do
$sState = _FF_YT("getPlayerState")
If @error Then Return 0
Sleep(500)
If TimerDiff($TimeOutTimer) > $vArg1 Then
SetError(5)
Return 0
EndIf
Until $sState <= 3 Or $sState = "_FF_YT_Error"
Return 1
EndIf
EndFunc ;==>_FF_YT
[/autoit]Falls jemand Interesse hat nur zu ![]()
Das kommt bei mir auch ab und zu mal vor aber schon ab 30.000 aufwärts
Außerdem wird man bei benutzung von rakete oder Propeller noch ins Loch gezogen.
Meint ihr das QD was Performance an geht besser für Doodle Jump geeignet ist?
Wenn man das so macht klappts einwanfrei
[autoit]$Pic1 = GUICtrlCreatePic(@ScriptDir & "\GuiPic.jpg", 0, 0, 197, 115)
GUICtrlSetState(-1,$GUI_DISABLE)